<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/char/sysrq.c, branch linux-2.6.23.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.23.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.23.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2007-05-08T18:15:07Z</updated>
<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>
</author>
<published>2007-05-08T07:28:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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] Add SysRq-Q to print timer_list debug info</title>
<updated>2007-02-16T16:13:59Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2007-02-16T09:28:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=88ad0bf6890505cbd9ca1dbb79944a27b5c8697d'/>
<id>urn:sha1:88ad0bf6890505cbd9ca1dbb79944a27b5c8697d</id>
<content type='text'>
Add SysRq-Q to print pending timers and other timer info.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: john stultz &lt;johnstul@us.ibm.com&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>[PATCH] Fix SAK_work workqueue initialization.</title>
<updated>2007-02-14T00:07:36Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2007-02-13T21:38:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7f1f86a0d04e79f8165e6f50d329a520b8cd11e5'/>
<id>urn:sha1:7f1f86a0d04e79f8165e6f50d329a520b8cd11e5</id>
<content type='text'>
Somewhere in the rewrite of the work queues my cleanup of SAK handling
got broken.  Maybe I didn't retest it properly or possibly the API
was changing so fast I missed something.  Regardless currently
triggering a SAK now generates an ugly BUG_ON and kills the kernel.

Thanks to Alexey Dobriyan &lt;adobriyan@openvz.org&gt; for spotting this.

This modifies the use of SAK_work to initialize it when the data
structure it resides in is initialized, and to simply call
schedule_work when we need to generate a SAK.  I update both
data structures that have a SAK_work member for consistency.

All of the old PREPARE_WORK calls that are now gone.

If we call schedule_work again before it has processed it
has generated the first SAK it will simply ignore the duplicate
schedule_work request.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] vt: refactor console SAK processing</title>
<updated>2007-02-11T18:51:24Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2007-02-10T09:44:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b6312f4dcc1efe7975731b6c47dd134282bd9ac'/>
<id>urn:sha1:8b6312f4dcc1efe7975731b6c47dd134282bd9ac</id>
<content type='text'>
This does several things.
- It moves looking up of the current foreground console into process
  context where we can safely take the semaphore that protects this
  operation.
- It uses the new flavor of work queue processing.
- This generates a factor of do_SAK, __do_SAK that runs immediately.
- This calls __do_SAK with the console semaphore held ensuring nothing
  else happens to the console while we process the SAK operation.
- With the console SAK processing moved into process context this
  patch removes the xchg operations that I used to attempt to attomically
  update struct pid, because of the strange locking used in the SAK processing.
  With SAK using the normal console semaphore nothing special is needed.

Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.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] sysrq: showBlockedTasks is sysrq-W</title>
<updated>2007-02-02T00:22:42Z</updated>
<author>
<name>Randy Dunlap</name>
</author>
<published>2007-02-01T07:48:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d346cce308f7fc99c7ffdb62060ed404fa340a1c'/>
<id>urn:sha1:d346cce308f7fc99c7ffdb62060ed404fa340a1c</id>
<content type='text'>
Change SysRq showBlockedTasks from sysrq-X to sysrq-W and show that in the
Help message.

It was previously done via X, but X is already used for Xmon on ppc &amp; powerpc
platforms and this collision needs to be avoided.

All callers of register_sysrq_key() are now marked in the sysrq op/key table.
I didn't mark 'h' as Help because Help is just printed for any unknown key,
such as '?'.

Added some omitted sysrq key entries in the sysrq.txt file.

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] debug: add sysrq_always_enabled boot option</title>
<updated>2006-12-13T17:05:50Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2006-12-13T08:34:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d6f647fc6bb57377c9f417c4752e43189f56bb1'/>
<id>urn:sha1:5d6f647fc6bb57377c9f417c4752e43189f56bb1</id>
<content type='text'>
Most distributions enable sysrq support but set it to 0 by default.  Add a
sysrq_always_enabled boot option to always-enable sysrq keys.  Useful for
debugging - without having to modify the disribution's config files (which
might not be possible if the kernel is on a live CD, etc.).

Also, while at it, clean up the sysrq interfaces.

[bunk@stusta.de: make sysrq_always_enabled_setup() static]
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&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] SysRq-X: show blocked tasks</title>
<updated>2006-12-07T16:39:32Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2006-12-07T04:35:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e59e2ae2c29700117a54e85c106017c24837119f'/>
<id>urn:sha1:e59e2ae2c29700117a54e85c106017c24837119f</id>
<content type='text'>
Add SysRq-X support: show blocked (TASK_UNINTERRUPTIBLE) tasks only.

Useful for debugging IO stalls.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&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>WorkStruct: Pass the work_struct pointer instead of context data</title>
<updated>2006-11-22T14:55:48Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2006-11-22T14:55:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65f27f38446e1976cc98fd3004b110fedcddd189'/>
<id>urn:sha1:65f27f38446e1976cc98fd3004b110fedcddd189</id>
<content type='text'>
Pass the work_struct pointer to the work function rather than context data.
The work function can use container_of() to work out the data.

For the cases where the container of the work_struct may go away the moment the
pending bit is cleared, it is made possible to defer the release of the
structure by deferring the clearing of the pending bit.

To make this work, an extra flag is introduced into the management side of the
work_struct.  This governs auto-release of the structure upon execution.

Ordinarily, the work queue executor would release the work_struct for further
scheduling or deallocation by clearing the pending bit prior to jumping to the
work function.  This means that, unless the driver makes some guarantee itself
that the work_struct won't go away, the work function may not access anything
else in the work_struct or its container lest they be deallocated..  This is a
problem if the auxiliary data is taken away (as done by the last patch).

However, if the pending bit is *not* cleared before jumping to the work
function, then the work function *may* access the work_struct and its container
with no problems.  But then the work function must itself release the
work_struct by calling work_release().

In most cases, automatic release is fine, so this is the default.  Special
initiators exist for the non-auto-release case (ending in _NAR).


Signed-Off-By: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>[PATCH] sysrq: irq change build fix.</title>
<updated>2006-10-06T14:38:42Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2006-10-06T14:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2033b0c330d50d3f1cccd207147a10ad7f4f47f8'/>
<id>urn:sha1:2033b0c330d50d3f1cccd207147a10ad7f4f47f8</id>
<content type='text'>
drivers/char/sysrq.c: In function `sysrq_handle_crashdump':
drivers/char/sysrq.c:98: warning: implicit declaration of function `get_irq_regs'

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&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>
</author>
<published>2006-10-05T13:55:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>
</feed>
