mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: linux-kernel@vger.kernel.org, greg@kroah.com, vojtech@suse.cz
Subject: Re: [RFC] Changing SysRq - show registers handling
Date: Thu, 3 Jun 2004 00:18:04 -0700	[thread overview]
Message-ID: <20040603001804.750b7fa5.akpm@osdl.org> (raw)
In-Reply-To: <200406030208.19612.dtor_core@ameritech.net>

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.

  reply	other threads:[~2004-06-03  7:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-03  6:34 Dmitry Torokhov
2004-06-03  6:53 ` Andrew Morton
2004-06-03  7:08   ` Dmitry Torokhov
2004-06-03  7:18     ` Andrew Morton [this message]
2004-06-03  7:27       ` Dmitry Torokhov
2004-06-03  7:39         ` Andrew Morton
2004-06-03  7:44         ` Oliver Neukum
2004-06-03 21:06           ` Theodore Ts'o
2004-06-03 22:21             ` Keith Owens
     [not found] <fa.jjf8osn.670mbt@ifi.uio.no>
2004-06-03  7:03 ` Andy Lutomirski
2004-06-03  7:15   ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040603001804.750b7fa5.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=dtor_core@ameritech.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®