]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
watchdog: diag288_wdt: Implement module autoload
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 10 Apr 2025 09:50:36 +0000 (11:50 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 16 Apr 2025 07:26:49 +0000 (09:26 +0200)
commit1c745df519d7b9ba7d3c5f9f40bf2f04ce955b39
tree5e0ad045f0db1985ae29fd8f3868005730cba76d
parent1468d6b1d3803bebd36ef61b705d2c5b97015713
watchdog: diag288_wdt: Implement module autoload

The s390 specific diag288_wdt watchdog driver makes use of the virtual
watchdog timer, which is available in most machine configurations.
If executing the diagnose instruction with subcode 0x288 results in an
exception the watchdog timer is not available, otherwise it is available.

In order to allow module autoload of the diag288_wdt module, move the
detection of the virtual watchdog timer to early boot code, and provide
its availability as a cpu feature.

This allows to make use of module_cpu_feature_match() to automatically load
the module iff the virtual watchdog timer is available.

Suggested-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Tested-by: Mete Durlu <meted@linux.ibm.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20250410095036.1525057-1-hca@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/boot/startup.c
arch/s390/include/asm/cpufeature.h
arch/s390/include/asm/diag288.h [new file with mode: 0644]
arch/s390/include/asm/machine.h
arch/s390/kernel/cpufeature.c
drivers/watchdog/diag288_wdt.c