1. 03 7月, 2017 4 次提交
  2. 06 6月, 2017 11 次提交
  3. 05 6月, 2017 2 次提交
  4. 19 5月, 2017 9 次提交
  5. 09 5月, 2017 1 次提交
  6. 29 4月, 2017 2 次提交
  7. 20 4月, 2017 1 次提交
    • D
      Annotate hardware config module parameters in drivers/watchdog/ · 5d1c93ce
      David Howells 提交于
      When the kernel is running in secure boot mode, we lock down the kernel to
      prevent userspace from modifying the running kernel image.  Whilst this
      includes prohibiting access to things like /dev/mem, it must also prevent
      access by means of configuring driver modules in such a way as to cause a
      device to access or modify the kernel image.
      
      To this end, annotate module_param* statements that refer to hardware
      configuration and indicate for future reference what type of parameter they
      specify.  The parameter parser in the core sees this information and can
      skip such parameters with an error message if the kernel is locked down.
      The module initialisation then runs as normal, but just sees whatever the
      default values for those parameters is.
      
      Note that we do still need to do the module initialisation because some
      drivers have viable defaults set in case parameters aren't specified and
      some drivers support automatic configuration (e.g. PNP or PCI) in addition
      to manually coded parameters.
      
      This patch annotates drivers in drivers/watchdog/.
      Suggested-by: NAlan Cox <gnomes@lxorguk.ukuu.org.uk>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      cc: Wim Van Sebroeck <wim@iguana.be>
      cc: Zwane Mwaikambo <zwanem@gmail.com>
      cc: linux-watchdog@vger.kernel.org
      5d1c93ce
  8. 01 3月, 2017 10 次提交
    • A
      watchdog: retu: restore MFD dependency · 9ad82f11
      Arnd Bergmann 提交于
      The retu watchdog calls into the respective mfd driver, but fails to
      link if that is diabled:
      
      drivers/watchdog/built-in.o: In function `retu_wdt_set_timeout':
      ziirave_wdt.c:(.text+0x8c88): undefined reference to `retu_write'
      ziirave_wdt.c:(.text+0x8c88): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `retu_write'
      drivers/watchdog/built-in.o: In function `retu_wdt_start':
      ziirave_wdt.c:(.text+0x8cc8): undefined reference to `retu_write'
      ziirave_wdt.c:(.text+0x8cc8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `retu_write'
      
      This restores the dependency as it was before
      
      Fixes: da2a68b3 ("watchdog: Enable COMPILE_TEST where possible")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      9ad82f11
    • A
      watchdog: db8500: add back prmcu dependency · 9297b652
      Arnd Bergmann 提交于
      When the db8500 watchdog is enabled without the PRCMU, we get a lot of
      warnings about duplicate or missing helper functions:
      
      In file included from drivers/watchdog/ux500_wdt.c:21:0:
      include/linux/mfd/dbx500-prcmu.h:422:19: error: redefinition of 'prcmu_abb_read'
       static inline int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size)
      
      This restores the dependency as it was.
      
      Fixes: da2a68b3 ("watchdog: Enable COMPILE_TEST where possible")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      9297b652
    • A
      watchdog: kempld: fix gcc-4.3 build · 3736d4eb
      Arnd Bergmann 提交于
      gcc-4.3 can't decide whether the constant value in
      kempld_prescaler[PRESCALER_21] is built-time constant or
      not, and gets confused by the logic in do_div():
      
      drivers/watchdog/kempld_wdt.o: In function `kempld_wdt_set_stage_timeout':
      kempld_wdt.c:(.text.kempld_wdt_set_stage_timeout+0x130): undefined reference to `__aeabi_uldivmod'
      
      This adds a call to ACCESS_ONCE() to force it to not consider
      it to be constant, and leaves the more efficient normal case
      in place for modern compilers, using an #ifdef to annotate
      why we do this hack.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      3736d4eb
    • N
      watchdog: softdog: fire watchdog even if softirqs do not get to run · 8d5755b3
      Niklas Cassel 提交于
      Checking for timer expiration is done from the softirq TIMER_SOFTIRQ.
      
      Since commit 4cd13c21 ("softirq: Let ksoftirqd do its job"),
      pending softirqs are no longer always handled immediately, instead,
      if there are pending softirqs, and ksoftirqd is in state TASK_RUNNING,
      the handling of the softirqs are deferred, and are instead supposed
      to be handled by ksoftirqd, when ksoftirqd gets scheduled.
      
      If a user space process with a real-time policy starts to misbehave
      by never relinquishing the CPU while ksoftirqd is in state TASK_RUNNING,
      what will happen is that all softirqs will get deferred, while ksoftirqd,
      which is supposed to handle the deferred softirqs, will never get to run.
      
      To make sure that the watchdog is able to fire even when we do not get
      to run softirqs, replace the timers with hrtimers.
      Signed-off-by: NNiklas Cassel <niklas.cassel@axis.com>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      8d5755b3
    • A
      watchdog: kempld: revert to full dependency · ed4a9eca
      Arnd Bergmann 提交于
      The kempld watchdog driver requires the respective MFD driver:
      
      drivers/watchdog/built-in.o: In function `kempld_wdt_probe':
      kempld_wdt.c:(.text+0x5c78): undefined reference to `kempld_get_mutex'
      kempld_wdt.c:(.text+0x5c84): undefined reference to `kempld_read8'
      kempld_wdt.c:(.text+0x5c8e): undefined reference to `kempld_release_mutex'
      kempld_wdt.c:(.text+0x5d1c): undefined reference to `kempld_read8'
      kempld_wdt.c:(.text+0x5d2c): undefined reference to `kempld_write8'
      
      This adds the Kconfig dependency back.
      
      Fixes: da2a68b3 ("watchdog: Enable COMPILE_TEST where possible")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      ed4a9eca
    • A
      watchdog: bcm2835: add CONFIG_OF dependency · 2672b7e0
      Arnd Bergmann 提交于
      Without CONFIG_OF, the driver fails to link:
      
      drivers/watchdog/built-in.o: In function `bcm2835_power_off':
      bcm2835_wdt.c:(.text+0x1946): undefined reference to `of_find_device_by_node'
      
      This adds a new dependency, to allow the COMPILE_TEST check to succeed.
      
      Fixes: da2a68b3 ("watchdog: Enable COMPILE_TEST where possible")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      2672b7e0
    • A
      watchdog: sp805: add back AMBA dependency · 3eafee95
      Arnd Bergmann 提交于
      The driver fails to link if ARM_AMBA is disabled:
      
      drivers/watchdog/sp805_wdt.o: In function `sp805_wdt_driver_init':
      sp805_wdt.c:(.init.text+0x4): undefined reference to `amba_driver_register'
      
      It seems that the COMPILE_TEST was added in the wrong place, as there
      is no architecture dependency, but a bus dependency. This moves
      the dependency accordingly.
      
      Fixes: da2a68b3 ("watchdog: Enable COMPILE_TEST where possible")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      3eafee95
    • A
      watchdog: menf21bmc: add I2C dependency · 6fb303a8
      Arnd Bergmann 提交于
      This driver fails to link when CONFIG_I2C is disabled or a loadable module while
      the watchdog is built-in:
      
      drivers/watchdog/built-in.o: In function `menf21bmc_wdt_shutdown':
      menf21bmc_wdt.c:(.text+0x9b44): undefined reference to `i2c_smbus_write_word_data'
      menf21bmc_wdt.c:(.text+0x9b44): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `i2c_smbus_write_word_data'
      
      This adds a Kconfig dependency for it, to enforce a valid configuration.
      
      Fixes: da2a68b3 ("watchdog: Enable COMPILE_TEST where possible")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      6fb303a8
    • A
      watchdog: geode: restore hard CS5535_MFGPT dependency · 0369fdf2
      Arnd Bergmann 提交于
      Wtihout CONFIG_CS5535_MFGPT, the driver does not link right:
      
      drivers/watchdog/built-in.o: In function `geodewdt_probe':
      geodewdt.c:(.init.text+0xca3): undefined reference to `cs5535_mfgpt_alloc_timer'
      geodewdt.c:(.init.text+0xcd4): undefined reference to `cs5535_mfgpt_write'
      geodewdt.c:(.init.text+0xcef): undefined reference to `cs5535_mfgpt_toggle_event'
      
      This adds back the dependency on this base driver.
      
      Fixes: da2a68b3 ("watchdog: Enable COMPILE_TEST where possible")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      0369fdf2
    • A
      watchdog: wm831x watchdog really needs mfd · d0e32fba
      Arnd Bergmann 提交于
      The wm831x watchdog driver can now be built without the wm831x mfd
      driver, which results in a link error:
      
      (.text+0x1a95c): undefined reference to `wm831x_set_bits'
      (.text+0x1a95c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `wm831x_set_bits'
      (.text+0x1a968): undefined reference to `wm831x_reg_lock'
      (.text+0x1a968): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `wm831x_reg_lock'
      (.text+0x1a9dc): undefined reference to `wm831x_reg_unlock'
      (.text+0x1a9dc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `wm831x_reg_unlock'
      
      This adds back the dependency that was removed. We can still build test
      this driver on all architectures by enabling the MFD driver for it first.
      
      Fixes: da2a68b3 ("watchdog: Enable COMPILE_TEST where possible")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      d0e32fba