Re: [RFC] Watchdog device class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rudolf Marek wrote:

>
> The char device of watchdog class is compatible with existing watchdog
> API,
> so no need to change the user applications. There is just one exception
> and this is temperature handling. I belive it should be implemented not
> via IOCTL but using the HWMON class. (100% compatibility can be restored
> with the ioctl class op)
>
> I have defined this class ops so far:
>
> struct watchdog_class_ops {
>     int (*enable)(struct device *);
>     int (*disable)(struct device *);
>     int (*ping)(struct device *);
>     int (*set_timeout)(struct device *, int sec);
>     int (*notify_reboot)(struct notifier_block *this, unsigned long code,
>             void *unused);
> };

Some watchdog devices have the ability to say "I'm about to reboot you,
do you want to do something about it?".  The IPMI watchdog calls this a
pretimeout, but I have seen this concept on at least two other watchdog
devices.  This can be delivered via an NMI or SMI and can be used to
inform the OS ahead of time that it's going to reboot the system.  This
is useful because you can panic, do a coredump, or perform other useful
operations instead of just rebooting.

Do you think this interface belongs in the structure?

-Corey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux