This change adds a watchdog capability, activated with NMI_WATCHDOG kernel option, that does not depend on any specialized hardware (in x86 galaxy).
The watchdog delivers a non-maskable interrupt when it fires.
This is useful for debugging system lock-ups where regular interrupts cannot be delivered and, thus, SW_WATCHDOG does not help.
The new watchdog does not help with recovering from hardware issues (of course).
The change consists of several logical parts.
First, event timer interface is extended with methods to configure a timer for the NMI mode and to check whether the NMI timer has fired.
Second, an NMI watchdog driver is provided that can use any NMI capable event timer as a backend.
Third, HPET timer has grown the NMI mode support on x86 configurations with APIC support. The NMI mode is provided only if HPET supports FSB / MSI interrupt mode.
Additionally, x86 NMI handling code has been reorganized to support NMI_WATCHDOG.
Also, I added a knob for a quirk of AMD based hardware. For IO-APIC and MSI interrupts there is no translation of the delivery mode from the APIC format to the HyperTransport format.
So, the delivery mode has to be specified in the HyperTransport format.
I wrote this code for my own use and didn't really intend to upstream it.
That reflected on the design and the code quality.
Most of all I don't like how NMI mode is configured for HPET FSB interrupt delivery.
I am not sure if it would be worth adding another bus method method for that.
Maye it would be sufficient to expose a direct interface to the MSI code.
I am creating this review request to solicit feedback on th general usefulness of the new facility and to get comments on the design and the code.