31 May, 2019

1 commit

  • Based on 1 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 as published by
    the free software foundation either version 2 of the license or at
    your option any later version

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

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

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

    Thomas Gleixner
     

02 Oct, 2018

1 commit


25 Feb, 2017

2 commits

  • Declare watchdog_ops structures as const as they are only stored in the
    ops field of a watchdog_device structure. This field is of type const, so
    watchdog_ops structures having this property can be made const too.
    Done using Coccinelle:

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

    @ok@
    struct watchdog_device w;
    identifier r.x;
    position p;
    @@
    w.ops=&x@p;

    @bad@
    position p != {r.p,ok.p};
    identifier r.x;
    @@
    x@p

    @depends on !bad disable optional_qualifier@
    identifier r.x;
    @@
    +const
    struct watchdog_ops x;

    File size details before and after patching.
    First line of every .o file shows the file size before patching
    and second line shows the size after patching.

    text data bss dec hex filename

    1340 544 0 1884 75c drivers/watchdog/bcm_kona_wdt.o
    1436 440 0 1876 754 drivers/watchdog/bcm_kona_wdt.o

    1176 544 4 1724 6bc drivers/watchdog/digicolor_wdt.o
    1272 440 4 1716 6b4 drivers/watchdog/digicolor_wdt.o

    925 580 89 1594 63a drivers/watchdog/ep93xx_wdt.o
    1021 476 89 1586 632 drivers/watchdog/ep93xx_wdt.o

    4932 288 17 5237 1475 drivers/watchdog/s3c2410_wdt.o
    5028 192 17 5237 1475 drivers/watchdog/s3c2410_wdt.o

    1977 292 1 2270 8de drivers/watchdog/sama5d4_wdt.o
    2073 196 1 2270 8de drivers/watchdog/sama5d4_wdt.o

    1375 484 1 1860 744 drivers/watchdog/sirfsoc_wdt.o
    1471 380 1 1852 73c drivers/watchdog/sirfsoc_wdt.o

    Size remains the same for the files drivers/watchdog/diag288_wdt.o
    drivers/watchdog/asm9260_wdt.o and drivers/watchdog/atlas7_wdt.o

    The following .o files did not compile:
    drivers/watchdog/sun4v_wdt.o, drivers/watchdog/sbsa_gwdt.o,
    drivers/watchdog/rt2880_wdt.o, drivers/watchdog/booke_wdt.o
    drivers/watchdog/mt7621_wdt.o

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Guenter Roeck

    Bhumika Goyal
     
  • The object booke_wdt_info of watchdog_info structure is not
    modified after getting initialized by booke_wdt_init. Apart from getting
    referenced in init it is also stored in the info field of watchdog_device
    structure which is of type const struct watchdog_info *info. So, it
    becomes read only after init and therefore add __ro_after_init to it's
    declaration.

    Signed-off-by: Bhumika Goyal
    Reviewed-by: Guenter Roeck
    Signed-off-by: Guenter Roeck

    Bhumika Goyal
     

10 Sep, 2015

1 commit


21 Oct, 2014

1 commit


11 Jun, 2014

1 commit

  • Basically, this patch does the following:
    1. Move the codes of parsing boot parameters from setup-common.c
    to driver. In this way, code reader can know directly that
    there are boot parameters that can change the timeout.
    2. Make boot parameter 'booke_wdt_period' effective.
    currently, when driver is loaded, default timeout is always
    being used in stead of booke_wdt_period.
    3. Wrap up the watchdog timeout in device struct and clean up
    unnecessary codes.

    Signed-off-by: Tang Yuantian
    Acked-by: Scott Wood
    Reviewed-by: Li Yang
    Reviewed-by: Guenter Roeck
    Signed-off-by: Wim Van Sebroeck

    Tang Yuantian
     

20 Mar, 2014

1 commit


26 Jun, 2013

1 commit

  • Critical interrupts are not handled on PPC64 BookE machines,
    so when the first watchdog interrupt fires the machine will
    freeze without a warning until it's rebooted by the second
    watchdog trigger.
    Plus, the interrupt isn't used anyway since the driver
    expects a usermode app to ping the watchdog periodically.

    Signed-off-by: Laurentiu Tudor
    Signed-off-by: Scott Wood

    Tudor Laurentiu
     

01 Mar, 2013

1 commit


19 Nov, 2012

1 commit


17 Aug, 2012

1 commit


10 Jul, 2012

1 commit


29 Mar, 2012

2 commits

  • …m/linux/kernel/git/dhowells/linux-asm_system

    Pull "Disintegrate and delete asm/system.h" from David Howells:
    "Here are a bunch of patches to disintegrate asm/system.h into a set of
    separate bits to relieve the problem of circular inclusion
    dependencies.

    I've built all the working defconfigs from all the arches that I can
    and made sure that they don't break.

    The reason for these patches is that I recently encountered a circular
    dependency problem that came about when I produced some patches to
    optimise get_order() by rewriting it to use ilog2().

    This uses bitops - and on the SH arch asm/bitops.h drags in
    asm-generic/get_order.h by a circuituous route involving asm/system.h.

    The main difficulty seems to be asm/system.h. It holds a number of
    low level bits with no/few dependencies that are commonly used (eg.
    memory barriers) and a number of bits with more dependencies that
    aren't used in many places (eg. switch_to()).

    These patches break asm/system.h up into the following core pieces:

    (1) asm/barrier.h

    Move memory barriers here. This already done for MIPS and Alpha.

    (2) asm/switch_to.h

    Move switch_to() and related stuff here.

    (3) asm/exec.h

    Move arch_align_stack() here. Other process execution related bits
    could perhaps go here from asm/processor.h.

    (4) asm/cmpxchg.h

    Move xchg() and cmpxchg() here as they're full word atomic ops and
    frequently used by atomic_xchg() and atomic_cmpxchg().

    (5) asm/bug.h

    Move die() and related bits.

    (6) asm/auxvec.h

    Move AT_VECTOR_SIZE_ARCH here.

    Other arch headers are created as needed on a per-arch basis."

    Fixed up some conflicts from other header file cleanups and moving code
    around that has happened in the meantime, so David's testing is somewhat
    weakened by that. We'll find out anything that got broken and fix it..

    * tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system: (38 commits)
    Delete all instances of asm/system.h
    Remove all #inclusions of asm/system.h
    Add #includes needed to permit the removal of asm/system.h
    Move all declarations of free_initmem() to linux/mm.h
    Disintegrate asm/system.h for OpenRISC
    Split arch_align_stack() out from asm-generic/system.h
    Split the switch_to() wrapper out of asm-generic/system.h
    Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h
    Create asm-generic/barrier.h
    Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h
    Disintegrate asm/system.h for Xtensa
    Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt]
    Disintegrate asm/system.h for Tile
    Disintegrate asm/system.h for Sparc
    Disintegrate asm/system.h for SH
    Disintegrate asm/system.h for Score
    Disintegrate asm/system.h for S390
    Disintegrate asm/system.h for PowerPC
    Disintegrate asm/system.h for PA-RISC
    Disintegrate asm/system.h for MN10300
    ...

    Linus Torvalds
     
  • Remove all #inclusions of asm/system.h preparatory to splitting and killing
    it. Performed with the following command:

    perl -p -i -e 's!^#\s*include\s*.*\n!!' `grep -Irl '^#\s*include\s*' *`

    Signed-off-by: David Howells

    David Howells
     

28 Mar, 2012

1 commit

  • Use the current logging styles.

    Make sure all output has a prefix.
    Add missing newlines.
    Remove now unnecessary PFX, NAME, and miscellaneous other #defines.
    Coalesce formats.

    Signed-off-by: Joe Perches
    Signed-off-by: Wim Van Sebroeck

    Joe Perches
     

29 Feb, 2012

1 commit

  • Commit dcfb748422 ([WATCHDOG] fix book E watchdog to take
    WDIOC_SETTIMEOUT arg in seconds) fixed SETTIMEOUT ioctl
    to use seconds as a parameter instead of some hardware-specific
    "period", but missed to apply similar changes to GETTIMEOUT,
    so it still returns "period" value. Let's fix it!
    Also, while at it, make SETTIMEOUT ioctl return real timeout
    value as it should do according to the documentation.

    Signed-off-by: Dmitry Artamonow
    Signed-off-by: Wim Van Sebroeck

    Dmitry Artamonow
     

16 Mar, 2011

1 commit

  • Improve the status messages that are displayed during some operations of the
    PowerPC watchdog timer driver. When the watchdog is enabled, the timeout is
    displayed as a number of seconds, instead of an obscure "period". The "period"
    is the position of a bit in a 64-bit timer register. The higher the value,
    the quicker the watchdog timeout occurs. Some people chose a high "period"
    value for the timer and get confused as to why the board resets within a
    few seconds.

    Messages displayed during open and close are now debug messages, so that they
    don't clutter the console by default. Finally, printk() is replaced with the
    pr_xxx() equivalent.

    Signed-off-by: Timur Tabi
    Signed-off-by: Wim Van Sebroeck

    Timur Tabi
     

12 Jan, 2011

2 commits

  • When the watchdog period is changed, it needs to be propagated to all cores
    in addition to the core that performed the change.

    Signed-off-by: Randy Vinson
    Signed-off-by: Wim Van Sebroeck

    Randy Vinson
     
  • Normally, the watchdog is disabled when dev/watchdog is closed, but if
    CONFIG_WATCHDOG_NOWAYOUT is defined, then it means that the watchdog should
    remain enabled. So we should disable it only if CONFIG_WATCHDOG_NOWAYOUT is
    not defined.

    Also ensure that /dev/watchdog is only opened by one process at a time. That
    way, a second process can't accidentally disable the watchdog while the first
    process has it open. There shouldn't be any need for more than one process to
    open /dev/watchdog anyway.

    Signed-off-by: Timur Tabi
    Acked-by: Josh Boyer
    Signed-off-by: Wim Van Sebroeck

    Timur Tabi
     

14 Oct, 2010

2 commits

  • The PowerPC Book-E watchdog driver (booke_wdt.c) defines a default timeout
    value in the code based on whether it's a Freescale Book-E part of not.
    Instead of having hard-coded values in the driver, make it a Kconfig
    option.

    As newer chips gets faster, the current default values become less
    appropriate, since the timeout sometimes occurs before the kernel finishes
    booting. Making the value a Kconfig option allows BSPs to configure a new
    value without requiring the wdt_period command-line parameter to be set.

    Signed-off-by: Timur Tabi
    Signed-off-by: Kumar Gala

    Timur Tabi
     
  • Register the __init and __exit functions in the PowerPC Book-E Watchdog
    driver as module entry/exit functions, and modify the Kconfig entry.

    Add a .release method for the PowerPC Book-E Watchdog driver, so that the
    watchdog is disabled when the driver is closed.

    Loosely based on original code from Jiang Yutang .

    Signed-off-by: Timur Tabi
    Signed-off-by: Kumar Gala

    Timur Tabi
     

25 May, 2010

1 commit


27 Apr, 2010

1 commit

  • commit 42747d712de56cf2087b702d2ad90af114c53138 ("[WATCHDOG] watchdog_info
    constify") introduced the following build failure:

    CC booke_wdt.o
    booke_wdt.c: In function 'booke_wdt_init':
    booke_wdt.c:220: error: assignment of read-only variable 'ident'

    Fix this by removing 'const' qualifier from watchdog_info struct.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Wim Van Sebroeck
    Cc: Kumar Gala
    Signed-off-by: Andrew Morton

    Anton Vorontsov
     

16 Apr, 2010

1 commit


07 Mar, 2010

1 commit


18 Sep, 2009

1 commit

  • The WDIOC_SETTIMEOUT argument is supposed to be a "seconds" value.
    However, the book E wdt currently treats it as a "period" which is
    interpreted in a board-specific way.

    This patch allows the user to pass in a "seconds" value and the driver
    will set the smallest timeout that is at least as large as specified
    by the user. It's been tested on e500 hardware and works as
    expected.

    The patch only modifies the CONFIG_FSL_BOOKE case, the CONFIG_4xx case
    is left unmodified as I don't have any hardware to test it on.

    Signed-off-by: Chris Friesen
    Cc: Kumar Gala
    Signed-off-by: Andrew Morton
    Signed-off-by: Wim Van Sebroeck

    Chris Friesen
     

09 Nov, 2008

1 commit

  • This patch fixes the setting of the Book-E watchdog timer interval setup
    on initialization and by ioctl().

    On initialization the period bits have to be masked before setting
    a new period.

    In WDIOC_SETTIMEOUT ioctl we have to use the correct mask.

    Signed-off-by: Matthias Fuchs
    Acked-by: Timur Tabi
    Signed-off-by: Kumar Gala

    Matthias Fuchs
     

06 Aug, 2008

2 commits

  • This brings the watchdog drivers into line with coding style.
    This patch takes cares of the indentation as described in chapter 1.
    Main changes:
    * Re-structure the ioctl switch call for all drivers as follows:
    switch (cmd) {
    case WDIOC_GETSUPPORT:
    case WDIOC_GETSTATUS:
    case WDIOC_GETBOOTSTATUS:
    case WDIOC_GETTEMP:
    case WDIOC_SETOPTIONS:
    case WDIOC_KEEPALIVE:
    case WDIOC_SETTIMEOUT:
    case WDIOC_GETTIMEOUT:
    case WDIOC_GETTIMELEFT:
    default:
    }

    This to make the migration from the drivers to the uniform watchdog
    device driver easier in the future.

    Signed-off-by: Wim Van Sebroeck

    Wim Van Sebroeck
     
  • Merge branch 'alan' of ../linux-2.6-watchdog-mm
    Fixed Conflicts in the following files:
    drivers/watchdog/booke_wdt.c
    drivers/watchdog/mpc5200_wdt.c
    drivers/watchdog/sc1200wdt.c

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Wim Van Sebroeck

    Wim Van Sebroeck
     

16 Jul, 2008

1 commit


14 Jun, 2008

1 commit


25 May, 2008

1 commit

  • On Book-E SMP systems each core has its own private watchdog. If only one
    watchdog is enabled, when the core that doesn't enable the watchdog is hung,
    system can't reset because no watchdog is running on it. That's bad. It
    means we must enable watchdogs on both cores.

    We can use smp_call_function() to send appropriate messages to all the other
    cores to enable and update the watchdog.

    Signed-off-by: Chen Gong
    Signed-off-by: Wim Van Sebroeck
    Signed-off-by: Andrew Morton

    Chen Gong
     

18 Oct, 2007

1 commit