09 May, 2020

1 commit


14 Feb, 2020

1 commit

  • ACPI Generic Address Structure (GAS) access_width field is not in bytes
    as the driver seems to expect in few places so fix this by using the
    newly introduced macro ACPI_ACCESS_BYTE_WIDTH().

    Fixes: b1abf6fc4982 ("ACPI / watchdog: Fix off-by-one error at resource assignment")
    Fixes: 058dfc767008 ("ACPI / watchdog: Add support for WDAT hardware watchdog")
    Reported-by: Jean Delvare
    Signed-off-by: Mika Westerberg
    Reviewed-by: Jean Delvare
    Cc: 4.16+ # 4.16+
    Signed-off-by: Rafael J. Wysocki

    Mika Westerberg
     

10 Feb, 2020

1 commit


19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

24 May, 2018

1 commit

  • After we added quirk for Lenovo Z50-70 it turns out there are at least
    two more systems where WDAT table includes instructions accessing RTC
    SRAM. Instead of quirking each system separately, look for such
    instructions in the table and automatically prefer iTCO_wdt if found.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=199033
    Reported-by: Arnold Guy
    Reported-by: Alois Nespor
    Reported-by: Yury Pakin
    Reported-by: Ihor Chyhin
    Signed-off-by: Mika Westerberg
    Acked-by: Guenter Roeck
    Signed-off-by: Rafael J. Wysocki

    Mika Westerberg
     

24 Apr, 2018

1 commit

  • WDAT table on Lenovo Z50-70 is using RTC SRAM (ports 0x70 and 0x71) to
    store state of the timer. This conflicts with Linux RTC driver
    (rtc-cmos.c) who fails to reserve those ports for itself preventing RTC
    from functioning. In addition the WDAT table seems not to be fully
    functional because it does not reset the system when the watchdog times
    out.

    On this system iTCO_wdt works just fine so we simply prefer to use it
    instead of WDAT. This makes RTC working again and also results working
    watchdog via iTCO_wdt.

    Reported-by: Peter Milley
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=199033
    Signed-off-by: Mika Westerberg
    Signed-off-by: Rafael J. Wysocki

    Mika Westerberg
     

20 Mar, 2018

1 commit

  • The resource allocation in WDAT watchdog has off-one-by error, it sets
    one byte more than the actual end address. This may eventually lead
    to unexpected resource conflicts.

    Fixes: 058dfc767008 (ACPI / watchdog: Add support for WDAT hardware watchdog)
    Cc: 4.9+ # 4.9+
    Signed-off-by: Takashi Iwai
    Acked-by: Mika Westerberg
    Acked-by: Guenter Roeck
    Signed-off-by: Rafael J. Wysocki

    Takashi Iwai
     

19 Sep, 2017

1 commit

  • We copy a local resource structure into a list, but only
    initialize some of its members, as pointed out by gcc-4.4:

    drivers/acpi/acpi_watchdog.c: In function 'acpi_watchdog_init':
    drivers/acpi/acpi_watchdog.c:105: error: 'res.child' may be used uninitialized in this function
    drivers/acpi/acpi_watchdog.c:105: error: 'res.sibling' may be used uninitialized in this function
    drivers/acpi/acpi_watchdog.c:105: error: 'res.parent' may be used uninitialized in this function
    drivers/acpi/acpi_watchdog.c:105: error: 'res.desc' may be used uninitialized in this function
    drivers/acpi/acpi_watchdog.c:105: error: 'res.name' may be used uninitialized in this function

    Newer compilers can presumably optimize the uninitialized access
    away entirely and don't warn at all, but rely on the kzalloc()
    to zero the structure first. This adds an explicit initialization
    to force consistent behavior.

    Fixes: 058dfc767008 (ACPI / watchdog: Add support for WDAT hardware watchdog)
    Signed-off-by: Arnd Bergmann
    Acked-by: Guenter Roeck
    Acked-by: Mika Westerberg
    Signed-off-by: Rafael J. Wysocki

    Arnd Bergmann
     

26 Jul, 2017

1 commit


27 Dec, 2016

1 commit

  • If the platform device creation fails for whichever reason the driver
    prints out something like:

    [ 0.978837] ACPI: watchdog: Failed to create platform device

    However, that is quite confusing and does not include any information
    why it failed. To make it more understandable, reword it like:

    [ 0.978837] ACPI: watchdog: Device creation failed: -16

    Which tells that we failed to create the watchdog device because some of
    the resources were already reserved (-EBUSY).

    Signed-off-by: Mika Westerberg
    Signed-off-by: Rafael J. Wysocki

    Mika Westerberg
     

24 Sep, 2016

1 commit

  • Starting from Intel Skylake the iTCO watchdog timer registers were moved to
    reside in the same register space with SMBus host controller. Not all
    needed registers are available though and we need to unhide P2SB (Primary
    to Sideband) device briefly to be able to read status of required NO_REBOOT
    bit. The i2c-i801.c SMBus driver used to handle this and creation of the
    iTCO watchdog platform device.

    Windows, on the other hand, does not use the iTCO watchdog hardware
    directly even if it is available. Instead it relies on ACPI Watchdog Action
    Table (WDAT) table to describe the watchdog hardware to the OS. This table
    contains necessary information about the the hardware and also set of
    actions which are executed by a driver as needed.

    This patch implements a new watchdog driver that takes advantage of the
    ACPI WDAT table. We split the functionality into two parts: first part
    enumerates the WDAT table and if found, populates resources and creates
    platform device for the actual driver. The second part is the driver
    itself.

    The reason for the split is that this way we can make the driver itself to
    be a module and loaded automatically if the WDAT table is found. Otherwise
    the module is not loaded.

    Signed-off-by: Mika Westerberg
    Reviewed-by: Guenter Roeck
    Signed-off-by: Rafael J. Wysocki

    Mika Westerberg