[lkml]   [2002]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Device driver question
    Uttered "Bloch, Jack" <>, 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.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:26    [W:0.026 / U:100.144 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site