Re: Missing watchdog after ACPI watchdog creation failure

From: Takashi Iwai
Date: Wed Jan 10 2018 - 10:43:31 EST


On Wed, 10 Jan 2018 16:23:43 +0100,
Mika Westerberg wrote:
>
> On Wed, Jan 10, 2018 at 04:13:51PM +0100, Takashi Iwai wrote:
> > Hi,
> >
> > on the recent kernels, i2c-i801 skips the creation of iTCO wdt when
> > ACPI WDAT is present. It's fine when ACPI really creates the watchdog
> > device. But, we've got a report showing that the watchdog is missing
> > on some machines because ACPI failed to create, and yet i2c-i801 still
> > skips because acpi_has_watchdog() returns true.
> >
> > More specifically, the machine gets an error from acpi_watchdog.c
> > like:
> > platform wdat_wdt: failed to claim resource 3: [io 0x040a-0x040c]
> > ACPI: watchdog: Device creation failed: -16
> >
> > where the region was registered by pnp,
> > % cat /proc/ioports
> > ....
> > 0400-047f : pnp 00:01
> >
> >
> > One may say that BIOS sucks, but OTOH, the complete lack of watchdog
> > thereafter can be seen as a regression, too. It used to work on the
> > older kernel as iTCO wdt was provided by i2c-i801.
>
> Hmm, if the resource is already taken I wonder how iTCO can work? Are
> you sure iTCO works on those systems?

Yes, that's the reason we got a bug report :)
4.4 kernel worked, and 4.12 (and later) don't.

On 4.4.x,
% /proc/ioports
0000-0cf7 : PCI Bus 0000:00
...
0400-047f : pnp 00:01
0400-041f : iTCO_wdt
0400-041f : iTCO_wdt
0500-0503 : ACPI PM1a_EVT_BLK

On 4.12.x,
% /proc/ioports
0000-0cf7 : PCI Bus 0000:00
...
0400-047f : pnp 00:01
0500-053f : pnp 00:01

> > Shouldn't acpi_has_watchdog() rather checks whether the watchdog
> > device creation succeeded or not?
>
> Yes, or rather we should first figure out what the actual problem is ;-)
>
> Are you able to get acpidump from that system with full dmesg?

I'll ask the reporter.


thanks,

Takashi