public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Levon <movement@marcelothewonderpenguin.com>
To: "Isabelle, Francois" <Francois.Isabelle@ca.kontron.com>
Cc: "Linux-Ha (E-mail)" <linux-ha@muc.de>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
Subject: Re: Handling NMI in a kernel module
Date: Tue, 23 Jul 2002 19:27:26 +0100	[thread overview]
Message-ID: <20020723182726.GA92574@compsoc.man.ac.uk> (raw)
In-Reply-To: <5009AD9521A8D41198EE00805F85F18F219A7E@sembo111.teknor.com>

On Tue, Jul 23, 2002 at 01:37:01PM -0400, Isabelle, Francois wrote:

> Is it possible to request_nmi() the way you can request_irq() from a kernel
> driver on the i386 arch?

Not currently, no.

> Our hardware watchdog is dual stage and can generate NMI on first stage ,
> our cPCI handle switch can also be used for Hot swap request via NMI.
> I'ld like to make use of this, I noticed cpqhealth module already
> implemented some nmi handling but this driver is close sourced.

You can do some horrible hack with sidt + _set_gate() to replace the NMI trap handler.

> Should we patch in i386/kernel/traps.c to add a callback to our stuff in
> unkown_nmi_error().
> 
> I'ld like my driver to register a callback there, what about maintaining a
> list of user callback functions which could be registered via:
>  
> request_nmi(int option, void (*hander)(void *dev_id, struct pt_regs *regs),
> unsigned long flags, const char *dev_name, void *dev_id);
> 
> where option could take meaning such as
>  - prepend   : place at start of nmi callback functions
>  - append    : place at end of nmi callback functions 
>  - truncate : replace callback chain

Why all three ? When would anything other than prepend be useful ? Each
handler must simply see if the NMI is their responsibility, and pass its
duty along to the next handler if not.

What is the purpose of dev_name, dev_id, and flags exactly ?
 
Personally, I'd like to see such a patch.

regards
john

-- 
"If you cannot convince them, confuse them."
	- Harry S. Truman

  reply	other threads:[~2002-07-23 18:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-23 17:37 Handling NMI in a kernel module Isabelle, Francois
2002-07-23 18:27 ` John Levon [this message]
2002-07-23 22:30 ` Alan Cox
2002-07-26 21:55 ` Alan Robertson
2002-07-27  2:05   ` Alan Cox
2002-07-27  3:30     ` Alan Robertson
2002-07-27 12:39       ` Alan Cox
2002-07-27 13:50         ` Alan Robertson
2002-07-27  3:44     ` Jonathan Lundell

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=20020723182726.GA92574@compsoc.man.ac.uk \
    --to=movement@marcelothewonderpenguin.com \
    --cc=Francois.Isabelle@ca.kontron.com \
    --cc=linux-ha@muc.de \
    --cc=linux-kernel@vger.kernel.org \
    /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