public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Driver callback routine when panic() is called
@ 2001-11-17  1:30 Pinyowattayakorn, Naris
  2001-11-17 11:38 ` Keith Owens
  0 siblings, 1 reply; 4+ messages in thread
From: Pinyowattayakorn, Naris @ 2001-11-17  1:30 UTC (permalink / raw)
  To: linux-kernel

Hi folks,

I don't know if this is an appropriate question to ask on this mailing list
but I have no idea where to ask. 

Is there any call that can be used for a driver to register system crash
callback routines. Thus, If panic( ) is called, such a callback can save
device-state information to be written into the system crash dump file. 

Thanks,
Naris

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Driver callback routine when panic() is called
  2001-11-17  1:30 Driver callback routine when panic() is called Pinyowattayakorn, Naris
@ 2001-11-17 11:38 ` Keith Owens
  2001-11-17 14:49   ` Georg Nikodym
  0 siblings, 1 reply; 4+ messages in thread
From: Keith Owens @ 2001-11-17 11:38 UTC (permalink / raw)
  To: Pinyowattayakorn, Naris; +Cc: linux-kernel

On Fri, 16 Nov 2001 20:30:23 -0500, 
"Pinyowattayakorn, Naris" <np151003@exchange.SanDiegoCA.NCR.COM> wrote:
>Is there any call that can be used for a driver to register system crash
>callback routines. Thus, If panic( ) is called, such a callback can save
>device-state information to be written into the system crash dump file. 

notifier_chain_register(&panic_notifier_list, ...)

See the kdb patch[1] for example code.  Remember that all but one cpus
are dead by the time you are called, I hope all your IRQs go to the
single live cpu.

[1] ftp://oss.sgi.com/projects/kdb/download/ix86


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Driver callback routine when panic() is called
  2001-11-17 11:38 ` Keith Owens
@ 2001-11-17 14:49   ` Georg Nikodym
  2001-11-18 18:36     ` Georg Nikodym
  0 siblings, 1 reply; 4+ messages in thread
From: Georg Nikodym @ 2001-11-17 14:49 UTC (permalink / raw)
  To: Pinyowattayakorn, Naris; +Cc: Linux Kernel List

On Sat, 2001-11-17 at 06:38, Keith Owens wrote:
> On Fri, 16 Nov 2001 20:30:23 -0500, 
> "Pinyowattayakorn, Naris" <np151003@exchange.SanDiegoCA.NCR.COM> wrote:
> >Is there any call that can be used for a driver to register system crash
> >callback routines. Thus, If panic( ) is called, such a callback can save
> >device-state information to be written into the system crash dump file. 
> 
> notifier_chain_register(&panic_notifier_list, ...)

Pat O'Rourke also posted a patch[1] that exposes this nicely
(panic_notifier_list is currently static in panic.c).

I've been using this on architectures for which I don't yet have kdb.

[1] http://www.uwsg.iu.edu/hypermail/linux/kernel/0106.1/0978.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Driver callback routine when panic() is called
  2001-11-17 14:49   ` Georg Nikodym
@ 2001-11-18 18:36     ` Georg Nikodym
  0 siblings, 0 replies; 4+ messages in thread
From: Georg Nikodym @ 2001-11-18 18:36 UTC (permalink / raw)
  To: Linux Kernel List

On Sat, 2001-11-17 at 09:49, Georg Nikodym wrote:

> Pat O'Rourke also posted a patch[1] that exposes this nicely
> (panic_notifier_list is currently static in panic.c).

Musta been smoking the good stuff.  panic_notifier_list is not static at
all and is extern'ed in kernel.h.  Pat's patch just adds a functional
interface...

Time to get the old eyes checked.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-11-18 18:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-17  1:30 Driver callback routine when panic() is called Pinyowattayakorn, Naris
2001-11-17 11:38 ` Keith Owens
2001-11-17 14:49   ` Georg Nikodym
2001-11-18 18:36     ` Georg Nikodym

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox