lkml.org 
[lkml]   [2004]   [Jun]   [3]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 3 Jun 2004 00:18:04 -0700
FromAndrew Morton <>
SubjectRe: [RFC] Changing SysRq - show registers handling
Dmitry Torokhov <dtor_core@ameritech.net> wrote:
>
> > do_IRQ(...)
>  > {
>  > 	...
>  > 	struct pt_regs **cpu_regs_slot = __get_cpu_var(global_irq_regs);
>  > 	struct pt_regs *save = *cpu_regs_slot;
>  > 	*cpu_regs_slot = &regs;
>  > 	...
>  > 	*cpu_regs_slot = save;
>  > }
>  > 
>  > And to teach the sysrq code to grab *__get_cpu_var(global_irq_regs).
> 
>  Ok, so by making it a tad slower you can keep the old semantics - printing
>  registers right when keyboard interrupt is processed instead of waiting till
>  the next one arrives.
> 
>  Hmm... the path is pretty hot, I am not sure what is best.

Well bear in mind that we can then rip all the pt_regs passing out from
everywhere, so as long as you edit every IRQ handler in the kernel it's a
net win ;)

I _think_ it'll work - as long as all architectures go through a common
dispatch function like do_IRQ(), which surely they do.  The above code
could be an arch-neutral inline actually.

I'm not sure what's best really.  But something this general is more
attractive than something which is purely for sysrs-T.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [from the cache]
©2003-2008