Re: [PATCH] watchdog: diag288_wdt: Implement module autoload
From: Heiko Carstens
Date: Tue Apr 15 2025 - 12:25:23 EST
On Thu, Apr 10, 2025 at 05:10:50AM -0700, Guenter Roeck wrote:
> On 4/10/25 02:50, Heiko Carstens wrote:
> > 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@xxxxxxxxxxxxx>
> > Tested-by: Mete Durlu <meted@xxxxxxxxxxxxx>
> > Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
>
> Acked-by: Guenter Roeck <linux@xxxxxxxxxxxx>
>
> > ---
> > arch/s390/boot/startup.c | 17 ++++++++++
> > arch/s390/include/asm/cpufeature.h | 1 +
> > arch/s390/include/asm/diag288.h | 41 +++++++++++++++++++++++
> > arch/s390/include/asm/machine.h | 1 +
> > arch/s390/kernel/cpufeature.c | 5 +++
> > drivers/watchdog/diag288_wdt.c | 53 ++----------------------------
> > 6 files changed, 68 insertions(+), 50 deletions(-)
> > create mode 100644 arch/s390/include/asm/diag288.h
Guenter, Wim, I assume this can/should go upstream via the s390 tree?