linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tommy Reynolds <reynolds@redhat.com>
To: "Bloch, Jack" <Jack.Bloch@icn.siemens.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Device driver question
Date: Wed, 15 May 2002 08:36:45 -0500	[thread overview]
Message-ID: <20020515083645.7320aefa.reynolds@redhat.com> (raw)
In-Reply-To: <180577A42806D61189D30008C7E632E87938E1@boca213a.boca.ssc.siemens.com>

Uttered "Bloch, Jack" <Jack.Bloch@icn.siemens.com>, spoke thus:

> I have a specific case where our HW can generate a
>  special interrupt. In this case I simply want the ISR to halt the system
>  (i.e. take the same action as if I typed halt from the command line). How
>  can I from within my device driver cause a halt? Please CC me specifically
>  on any replies.

Check out the code for "sys_reboot" in "kernel/sys.c" for ideas on how to do
this.  I don't think you can invoke "sys_reboot" from inside an interrupt
handler, but you could probably do the same thing by calling the service
routines "sys_reboot" does.

If that doesn't shut your machine down gracefully, then you might resort to
"call_usermodehelper" in "kernel/kmod.c" to run "/sbin/shutdown -h now".  You
can't invoke "call_usermodehelper" from an interrupt top half, but it should
work find from a tasklett.

  reply	other threads:[~2002-05-15 13:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-15 13:17 Device driver question Bloch, Jack
2002-05-15 13:36 ` Tommy Reynolds [this message]
2002-05-15 15:03   ` Joe deBlaquiere
2002-05-15 15:13     ` Tommy Reynolds
2002-05-15 15:16     ` Tommy Reynolds
2002-05-16  0:18 ` jw schultz

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=20020515083645.7320aefa.reynolds@redhat.com \
    --to=reynolds@redhat.com \
    --cc=Jack.Bloch@icn.siemens.com \
    --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;
as well as URLs for NNTP newsgroup(s).