28 Jun, 2017

1 commit


09 Jun, 2017

1 commit


08 Jun, 2017

4 commits


23 Feb, 2017

1 commit


06 Jan, 2017

2 commits

  • commit f06f35c66fdbd5ac38901a3305ce763a0cd59375 upstream.

    This patch fixes a off-by-one in the "watchdog: qcom: add option for
    standalone watchdog not in timer block" patch that causes the
    following panic on boot:

    > Unhandled fault: external abort on non-linefetch (0x1008) at 0xc8874002
    > pgd = c0204000
    > [c8874002] *pgd=87806811, *pte=0b017653, *ppte=0b017453
    > Internal error: : 1008 [#1] SMP ARM
    > CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.8.6 #0
    > Hardware name: Generic DT based system
    > PC is at 0xc02222f4
    > LR is at 0x1
    > pc : [] lr : [] psr: 00000113
    > sp : c782fc98 ip : 00000003 fp : 00000000
    > r10: 00000004 r9 : c782e000 r8 : c04ab98c
    > r7 : 00000001 r6 : c8874002 r5 : c782fe00 r4 : 00000002
    > r3 : 00000000 r2 : c782fe00 r1 : 00100000 r0 : c8874002
    > Flags: nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
    > Control: 10c5387d Table: 8020406a DAC: 00000051
    > Process swapper/0 (pid: 1, stack limit = 0xc782e210)
    > Stack: (0xc782fc98 to 0xc7830000)
    > [...]

    The WDT_STS (status) needs to be translated via wdt_addr as well.

    fixes: f0d9d0f4b44a ("watchdog: qcom: add option for standalone watchdog not in timer block")
    Signed-off-by: Christian Lamparter
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Christian Lamparter
     
  • commit 9eff1140a82db8c5520f76e51c21827b4af670b3 upstream.

    Systemd on reboot enables shutdown watchdog that leaves the watchdog
    device open to ensure that even if power down process get stuck the
    platform reboots nonetheless.
    The iamt_wdt is an alarm-only watchdog and can't reboot system, but the
    FW will generate an alarm event reboot was completed in time, as the
    watchdog is not automatically disabled during power cycle.
    So we should request stop watchdog on reboot to eliminate wrong alarm
    from the FW.

    Signed-off-by: Alexander Usyskin
    Signed-off-by: Tomas Winkler
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Alexander Usyskin
     

26 Nov, 2016

1 commit


22 Nov, 2016

1 commit

  • The WDAT watchdog driver uses functionality provided by the watchdog timer
    core but it did not select it explicitly. This results following linker
    error when only WDAT_WDT is enabled in Kconfig:

    drivers/built-in.o: In function `wdat_wdt_probe':
    drivers/watchdog/wdat_wdt.c:444: undefined reference to `devm_watchdog_register_device'

    Fix this by explicitly selecting WATCHDOG_CORE when WDAT watchdog driver is
    enabled.

    Fixes: 058dfc767008 (ACPI / watchdog: Add support for WDAT hardware watchdog)
    Reported-by: Vegard Nossum
    Signed-off-by: Mika Westerberg
    Reviewed-by: Guenter Roeck
    Signed-off-by: Rafael J. Wysocki

    Mika Westerberg
     

22 Oct, 2016

1 commit


21 Oct, 2016

1 commit

  • It turns out we need to ping the watchdog hardware on resume when we
    re-program it. Otherwise this causes inadvertent reset to trigger
    right after the resume is complete.

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

    Mika Westerberg
     

14 Oct, 2016

1 commit

  • Pull watchdog updates from Wim Van Sebroeck:

    - a new watchdog pretimeout governor framework

    - support to upload the firmware on the ziirave_wdt

    - several fixes and cleanups

    * git://www.linux-watchdog.org/linux-watchdog: (26 commits)
    watchdog: imx2_wdt: add pretimeout function support
    watchdog: softdog: implement pretimeout support
    watchdog: pretimeout: add pretimeout_available_governors attribute
    watchdog: pretimeout: add option to select a pretimeout governor in runtime
    watchdog: pretimeout: add panic pretimeout governor
    watchdog: pretimeout: add noop pretimeout governor
    watchdog: add watchdog pretimeout governor framework
    watchdog: hpwdt: add support for iLO5
    fs: compat_ioctl: add pretimeout functions for watchdogs
    watchdog: add pretimeout support to the core
    watchdog: imx2_wdt: use preferred BIT macro instead of open coded values
    watchdog: st_wdt: Remove support for obsolete platforms
    watchdog: bindings: Remove obsolete platforms from dt doc.
    watchdog: mt7621_wdt: Remove assignment of dev pointer
    watchdog: rt2880_wdt: Remove assignment of dev pointer
    watchdog: constify watchdog_ops structures
    watchdog: tegra: constify watchdog_ops structures
    watchdog: iTCO_wdt: constify iTCO_wdt_pm structure
    watchdog: cadence_wdt: Fix the suspend resume
    watchdog: txx9wdt: Add missing clock (un)prepare calls for CCF
    ...

    Linus Torvalds
     

12 Oct, 2016

1 commit

  • Pull uaccess.h prepwork from Al Viro:
    "Preparations to tree-wide switch to use of linux/uaccess.h (which,
    obviously, will allow to start unifying stuff for real). The last step
    there, ie

    PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*'
    sed -i -e "s!$PATT!#include !" \
    `git grep -l "$PATT"|grep -v ^include/linux/uaccess.h`

    is not taken here - I would prefer to do it once just before or just
    after -rc1. However, everything should be ready for it"

    * 'work.uaccess2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    remove a stray reference to asm/uaccess.h in docs
    sparc64: separate extable_64.h, switch elf_64.h to it
    score: separate extable.h, switch module.h to it
    mips: separate extable.h, switch module.h to it
    x86: separate extable.h, switch sections.h to it
    remove stray include of asm/uaccess.h from cacheflush.h
    mn10300: remove a bogus processor.h->uaccess.h include
    xtensa: split uaccess.h into C and asm sides
    bonding: quit messing with IOCTL
    kill __kernel_ds_p off
    mn10300: finish verify_area() off
    frv: move HAVE_ARCH_UNMAPPED_AREA to pgtable.h
    exceptions: detritus removal

    Linus Torvalds
     

08 Oct, 2016

7 commits

  • The change adds watchdog pretimeout notification handling to imx2_wdt
    driver, if device data contains information about a valid interrupt.

    It is unlikely but still possible (e.g. through a software limitation)
    that only a subset of watchdogs on SoC has interrupt lines, hence
    functionally the devices from these two groups have different
    capabilities, and this is reflected in different watchdog_info
    structs assigned to the devices.

    Signed-off-by: Vladimir Zapolskiy
    Reviewed-by: Guenter Roeck
    Reviewed-by: Wolfram Sang
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Vladimir Zapolskiy
     
  • Give devices which do not have hardware support for pretimeout at least a
    software version of it.

    Signed-off-by: Wolfram Sang
    Signed-off-by: Vladimir Zapolskiy
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Wolfram Sang
     
  • The change adds an option to a user with CONFIG_WATCHDOG_SYSFS and
    CONFIG_WATCHDOG_PRETIMEOUT_GOV enabled to get information about all
    registered watchdog pretimeout governors by reading watchdog device
    attribute named "pretimeout_available_governors".

    Signed-off-by: Vladimir Zapolskiy
    Reviewed-by: Guenter Roeck
    Reviewed-by: Wolfram Sang
    Tested-by: Wolfram Sang
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Vladimir Zapolskiy
     
  • The change converts watchdog device attribute "pretimeout_governor" from
    read-only to read-write type to allow users to select a desirable
    watchdog pretimeout governor in runtime, e.g.

    % echo -n panic > /sys/..../watchdog/watchdog0/pretimeout

    To get this working a list of registered pretimeout governors is created
    and a new helper function watchdog_pretimeout_governor_set() is exported
    to watchdog_dev.c.

    If a selected governor is gone, a watchdog device pretimeout notification
    is delegated to a default built-in pretimeout governor.

    Signed-off-by: Vladimir Zapolskiy
    Reviewed-by: Guenter Roeck
    Reviewed-by: Wolfram Sang
    Tested-by: Wolfram Sang
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Vladimir Zapolskiy
     
  • The change adds panic watchdog pretimeout governor, on watchdog
    pretimeout event the kernel shall panic. In general watchdog
    pretimeout event means that something essentially bad is going on the
    system, for example a process scheduler stalls or watchdog feeder is
    killed due to OOM, so printing out information attendant to panic and
    before likely unavoidable reboot caused by a watchdog may help to
    determine a root cause of the issue.

    Signed-off-by: Vladimir Zapolskiy
    Reviewed-by: Guenter Roeck
    Reviewed-by: Wolfram Sang
    Tested-by: Wolfram Sang
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Vladimir Zapolskiy
     
  • The change adds noop watchdog pretimeout governor, only an
    informational message is printed to the kernel log buffer when a
    watchdog triggers a pretimeout event.

    While introducing the first pretimeout governor the selected design
    assumes that the default pretimeout governor is selected by its name
    and it is always built-in, thus the default pretimeout governor can
    not be unregistered and the correspondent check can be removed from
    the watchdog_unregister_governor() function.

    Signed-off-by: Vladimir Zapolskiy
    Reviewed-by: Guenter Roeck
    Reviewed-by: Wolfram Sang
    Tested-by: Wolfram Sang
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Vladimir Zapolskiy
     
  • The change adds a simple watchdog pretimeout framework infrastructure,
    its purpose is to allow users to select a desired handling of watchdog
    pretimeout events, which may be generated by some watchdog devices.

    A user selects a default watchdog pretimeout governor during
    compilation stage.

    Watchdogs with WDIOF_PRETIMEOUT capability now have one more device
    attribute in sysfs, pretimeout_governor attribute is intended to display
    the selected watchdog pretimeout governor.

    The framework has no impact at runtime on watchdog devices with no
    WDIOF_PRETIMEOUT capability set.

    Signed-off-by: Vladimir Zapolskiy
    Reviewed-by: Guenter Roeck
    Reviewed-by: Wolfram Sang
    Tested-by: Wolfram Sang
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Vladimir Zapolskiy
     

06 Oct, 2016

1 commit


04 Oct, 2016

1 commit

  • Pull usb/phy/extcon updates from Greg KH:
    "Here is the big USB, and PHY, and extcon, patchsets for 4.9-rc1.

    Full details are in the shortlog, but generally a lot of new hardware
    support, usb gadget updates, and Wolfram's great cleanup of USB error
    message handling, making the kernel image a tad bit smaller.

    All of this has been in linux-next with no reported issues"

    * tag 'usb-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (343 commits)
    Revert "usbtmc: convert to devm_kzalloc"
    USB: serial: cp210x: Add ID for a Juniper console
    usb: Kconfig: using select for USB_COMMON dependency
    bluetooth: bcm203x: don't print error when allocating urb fails
    mmc: host: vub300: don't print error when allocating urb fails
    usb: hub: change CLEAR_FEATURE to SET_FEATURE
    usb: core: Introduce a USB port LED trigger
    USB: bcma: drop Northstar PHY 2.0 initialization code
    usb: core: hcd: add missing header dependencies
    usb: musb: da8xx: fix error handling message in probe
    usb: musb: Fix session based PM for first invalid VBUS
    usb: musb: Fix PM runtime for disconnect after unconfigure
    musb: Export musb_root_disconnect for use in modules
    usb: misc: legousbtower: Fix NULL pointer deference
    cdc-acm: hardening against malicious devices
    Revert "usb: gadget: NCM: Protect dev->port_usb using dev->lock"
    include: extcon: Fix compilation error caused because of incomplete merge
    MAINTAINERS: add tree entry for USB Serial
    phy-twl4030-usb: initialize charging-related stuff via pm_runtime
    phy-twl4030-usb: better handle musb_mailbox() failure
    ...

    Linus Torvalds
     

03 Oct, 2016

1 commit

  • iLO5 will offer the same watchdog timer as previous generations, but the
    PCI subsystem vendor ID will be PCI_VENDOR_ID_HP_3PAR (0x1590) instead of
    PCI_VENDOR_ID_HP (0x103c). Add 0x1590 to the whitelist and be more
    specific when ignoring the 103c,1979 device.

    Signed-off-by: Brian Boylston
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Brian Boylston
     

29 Sep, 2016

2 commits


24 Sep, 2016

13 commits

  • Since the watchdog framework centrializes the IOCTL interfaces of device
    drivers now, SETPRETIMEOUT and GETPRETIMEOUT need to be added in the
    common code.

    Signed-off-by: Robin Gong
    Signed-off-by: Wolfram Sang
    [vzapolskiy: added conditional pretimeout sysfs attribute visibility]
    Signed-off-by: Vladimir Zapolskiy
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Wolfram Sang
     
  • This is a nonfunctional change, declare register bit values with BIT()
    helper macro.

    The issues are reported by checkpatch:

    CHECK: Prefer using the BIT macro
    #40: FILE: drivers/watchdog/imx2_wdt.c:40:
    +#define IMX2_WDT_WCR_WDA (1 << 5) /* -> External Reset WDOG_B */

    etc.

    Signed-off-by: Vladimir Zapolskiy
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Vladimir Zapolskiy
     
  • STiH415/6 SoC support is being removed from the kernel.
    This patch updates the watchdog driver to remove references
    to these obsolete platforms.

    Signed-off-by: Peter Griffin
    Cc:
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Peter Griffin
     
  • Commit 0254e953537c ("watchdog: Drop pointer to watchdog device from
    struct watchdog_device") removed the dev pointer from struct
    watchdog_device, but this driver was still assigning it, leading to
    a compilation error:

    drivers/watchdog/mt7621_wdt.c: In function 'mt7621_wdt_probe':
    drivers/watchdog/mt7621_wdt.c:142:16: error:
    'struct watchdog_device' has no member named 'dev'

    Fix this by removing the assignment.

    Fixes: 0254e953537c ("watchdog: Drop pointer to watchdog device ...")
    Signed-off-by: Guenter Roeck
    Cc: stable@vger.kernel.org # v4.5+
    Signed-off-by: Wim Van Sebroeck

    Guenter Roeck
     
  • Commit 0254e953537c ("watchdog: Drop pointer to watchdog device from
    struct watchdog_device") removed the dev pointer from struct
    watchdog_device, but this driver was still assigning it, leading to a
    compilation error:

    drivers/watchdog/rt2880_wdt.c: In function ‘rt288x_wdt_probe’:
    drivers/watchdog/rt2880_wdt.c:161:16: error: ‘struct watchdog_device’
    has no member named ‘dev’
    rt288x_wdt_dev.dev = &pdev->dev;
    ^
    scripts/Makefile.build:289: recipe for target
    'drivers/watchdog/rt2880_wdt.o' failed

    Fix this by removing the assignment.

    Fixes: 0254e953537c ("watchdog: Drop pointer to watchdog device ...")
    Signed-off-by: Matt Redfearn
    Cc: stable@vger.kernel.org # v4.5+
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Matt Redfearn
     
  • Check for watchdog_ops structures that are only stored in the ops field of
    a watchdog_device structure. This field is declared const, so watchdog_ops
    structures that have this property can be declared as const also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct watchdog_ops i@p = { ... };

    @ok@
    identifier r.i;
    struct watchdog_device e;
    position p;
    @@
    e.ops = &i@p;

    @bad@
    position p != {r.p,ok.p};
    identifier r.i;
    struct watchdog_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct watchdog_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Julia Lawall
     
  • Check for watchdog_ops structures that are only stored in the ops field of
    a watchdog_device structure. This field is declared const, so watchdog_ops
    structures that have this property can be declared as const also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct watchdog_ops i@p = { ... };

    @ok@
    identifier r.i;
    struct watchdog_device e;
    position p;
    @@
    e.ops = &i@p;

    @bad@
    position p != {r.p,ok.p};
    identifier r.i;
    struct watchdog_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct watchdog_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Acked-by: Thierry Reding
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Julia Lawall
     
  • iTCO_wdt_pm, of type struct dev_pm_ops, is never modified, so declare it as
    const.

    Done with the help of Coccinelle.

    Signed-off-by: Julia Lawall
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Julia Lawall
     
  • Currently even if no users are there the suspend tries to
    stop the watchdog and resume starts it.

    so after resume the watchdog starts and resets the board.
    Fix the same by adding a check for users.

    Reviewed-by: Guenter Roeck
    Signed-off-by: Shubhrajyoti Datta
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Shubhrajyoti Datta
     
  • 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
     
  • While the custom minimal TXx9 clock implementation doesn't need or use
    clock (un)prepare calls (they are dummies if !CONFIG_HAVE_CLK_PREPARE),
    they are mandatory when using the Common Clock Framework.

    Hence add them, to prepare for the advent of CCF.

    Signed-off-by: Geert Uytterhoeven
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Geert Uytterhoeven
     
  • The field "owner" is set by core. Thus delete an extra initialisation.

    Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
    Signed-off-by: Markus Elfring
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Markus Elfring
     
  • This patch adds and entry to the sysfs to start firmware upload process
    on the specified device with the requested firmware.

    The uploading of the firmware needs only to happen once per firmware
    upgrade, as the firmware is stored in persistent storage. If the
    firmware upload or the firmware verification fails then we print and
    error message and exit.

    Signed-off-by: Enric Balletbo i Serra
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Enric Balletbo i Serra