<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/char/hangcheck-timer.c, branch v3.0.94</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/char/hangcheck-timer.c?h=v3.0.94</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/char/hangcheck-timer.c?h=v3.0.94'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-08-21T07:34:45Z</updated>
<entry>
<title>Input: sysrq - drop tty argument form handle_sysrq()</title>
<updated>2010-08-21T07:34:45Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2010-08-18T04:15:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f335397d177c906256ee1bba28e8c49e8ec63817'/>
<id>urn:sha1:f335397d177c906256ee1bba28e8c49e8ec63817</id>
<content type='text'>
Sysrq operations do not accept tty argument anymore so no need to pass
it to us.

[Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;: fix build breakage in drm code
 caused by sysrq using bool but not including linux/types.h]

[Sachin Sant &lt;sachinp@in.ibm.com&gt;: fix build breakage in s390 keyboadr
 driver]

Acked-by: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Acked-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>hangcheck-timer: fix x86_32 bugs</title>
<updated>2010-05-25T15:07:02Z</updated>
<author>
<name>Yury Polyanskiy</name>
<email>ypolyans@princeton.edu</email>
</author>
<published>2010-05-24T21:33:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=940370fc86b920b51a34217a1facc3e9e97c2456'/>
<id>urn:sha1:940370fc86b920b51a34217a1facc3e9e97c2456</id>
<content type='text'>
drivers/char/hangcheck-timer.c is doubly broken.  When the overflown value
of TIMER_FREQ is abnormally low, it spams the syslog with KERN_CRIT
messages "Hangcheck: hangcheck value past margin!" But whether it happens
or not depends on HZ and lpj in a complex way.  People have hit it
occasionally as far as google search can tell.

First, the following line overflows unsigned long:

# define TIMER_FREQ (HZ*loops_per_jiffy)

Second, and more importantly, loops_per_jiffy has little to do with the
con= version from the the time scale of get_cycles() (aka rdtsc) to the
time scale of jiffies.

The attached patch resolves both of the problems.

Acked-by: Joel Becker &lt;joel.becker@oracle.com&gt;
Cc: john stultz &lt;johnstul@us.ibm.com&gt;
Cc: Jan Glauber &lt;jan.glauber@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>drivers/char/: Spelling fixes</title>
<updated>2008-02-03T15:11:42Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2008-02-03T15:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8dfba4d71b77bca83a6f9943fc8e53439310cffd'/>
<id>urn:sha1:8dfba4d71b77bca83a6f9943fc8e53439310cffd</id>
<content type='text'>
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
</content>
</entry>
<entry>
<title>Detach sched.h from mm.h</title>
<updated>2007-05-21T16:18:19Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2007-05-20T21:22:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e8edc6e03a5c8562dc70a6d969f732bdb355a7e7'/>
<id>urn:sha1:e8edc6e03a5c8562dc70a6d969f732bdb355a7e7</id>
<content type='text'>
First thing mm.h does is including sched.h solely for can_do_mlock() inline
function which has "current" dereference inside. By dealing with can_do_mlock()
mm.h can be detached from sched.h which is good. See below, why.

This patch
a) removes unconditional inclusion of sched.h from mm.h
b) makes can_do_mlock() normal function in mm/mlock.c
c) exports can_do_mlock() to not break compilation
d) adds sched.h inclusions back to files that were getting it indirectly.
e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
   getting them indirectly

Net result is:
a) mm.h users would get less code to open, read, preprocess, parse, ... if
   they don't need sched.h
b) sched.h stops being dependency for significant number of files:
   on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
   after patch it's only 3744 (-8.3%).

Cross-compile tested on

	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
	alpha alpha-up
	arm
	i386 i386-up i386-defconfig i386-allnoconfig
	ia64 ia64-up
	m68k
	mips
	parisc parisc-up
	powerpc powerpc-up
	s390 s390-up
	sparc sparc-up
	sparc64 sparc64-up
	um-x86_64
	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

as well as my two usual configs.

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>header cleaning: don't include smp_lock.h when not used</title>
<updated>2007-05-08T18:15:07Z</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2007-05-08T07:28:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e63340ae6b6205fef26b40a75673d1c9c0c8bb90'/>
<id>urn:sha1:e63340ae6b6205fef26b40a75673d1c9c0c8bb90</id>
<content type='text'>
Remove includes of &lt;linux/smp_lock.h&gt; where it is not used/needed.
Suggested by Al Viro.

Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] time: x86_64: convert x86_64 to use GENERIC_TIME</title>
<updated>2007-02-16T16:14:00Z</updated>
<author>
<name>john stultz</name>
<email>johnstul@us.ibm.com</email>
</author>
<published>2007-02-16T09:28:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1489939f0ab64b96998e04068c516c39afe29654'/>
<id>urn:sha1:1489939f0ab64b96998e04068c516c39afe29654</id>
<content type='text'>
This patch converts x86_64 to use the GENERIC_TIME infrastructure and adds
clocksource structures for both TSC and HPET (ACPI PM is shared w/ i386).

[akpm@osdl.org: fix printk timestamps]
[akpm@osdl.org: fix printk ckeanups]
[akpm@osdl.org: hpet build fix]
Signed-off-by: John Stultz &lt;johnstul@us.ibm.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Andi Kleen &lt;ak@muc.de&gt;
Cc: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>IRQ: Maintain regs pointer globally rather than passing to IRQ handlers</title>
<updated>2006-10-05T14:10:12Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-10-05T13:55:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7d12e780e003f93433d49ce78cfedf4b4c52adc5'/>
<id>urn:sha1:7d12e780e003f93433d49ce78cfedf4b4c52adc5</id>
<content type='text'>
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells &lt;dhowells@redhat.com&gt;
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
</content>
</entry>
<entry>
<title>[PATCH] hangcheck: remove monotomic_clock on x86</title>
<updated>2006-06-26T16:58:20Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2006-06-26T07:25:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ede65f3926a284f07765b94d6d9fd10d63791174'/>
<id>urn:sha1:ede65f3926a284f07765b94d6d9fd10d63791174</id>
<content type='text'>
John's about to nuke x86's monotonic clock without grepping for it first.  The
patch lamely borrows the ppc64 code for x86.

hangcheck-timer shouldn't be doing it this way

a) HAVE_MONOTONIC should be CONFIG_MONOTONIC_CLOCK and it should be defined
   in arch/xxx/Kconfig.

b) That ifdef tangle shouldn't be in hangcheck-timer.c.  It should be using
   arch-provided helper functions, which CONFIG_MONOTONIC_CLOCK-enabling
   architectures implement in arch/something.c

Cc: john stultz &lt;johnstul@us.ibm.com&gt;
Acked-by: Joel Becker &lt;joel.becker@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] s390: hangcheck timer support</title>
<updated>2006-02-01T16:53:24Z</updated>
<author>
<name>Jan Glauber</name>
<email>jan.glauber@de.ibm.com</email>
</author>
<published>2006-02-01T11:06:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3633b0475eb269dcb85923b23b321505f06b9488'/>
<id>urn:sha1:3633b0475eb269dcb85923b23b321505f06b9488</id>
<content type='text'>
Remove useless s390 define from hangcheck-timer, remove wrong definition of a
TOD second and other s390 ifdefs.  Use monotonic_clock instead.

Add hangcheck-timer option, copied from drivers/char/Kconfig.  This is ugly
but unless we have a big Kconfig cleanup we cannot include
drivers/char/Kconfig...

Signed-off-by: Jan Glauber &lt;jan.glauber@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] s390: cleanup Kconfig</title>
<updated>2006-01-06T16:33:53Z</updated>
<author>
<name>Martin Schwidefsky</name>
<email>schwidefsky@de.ibm.com</email>
</author>
<published>2006-01-06T08:19:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=347a8dc3b815f0c0fa62a1df075184ffe4cbdcf1'/>
<id>urn:sha1:347a8dc3b815f0c0fa62a1df075184ffe4cbdcf1</id>
<content type='text'>
Sanitize some s390 Kconfig options.  We have ARCH_S390, ARCH_S390X,
ARCH_S390_31, 64BIT, S390_SUPPORT and COMPAT.  Replace these 6 options by
S390, 64BIT and COMPAT.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
