1. 30 May, 2012 25 commits
    • Randy Dunlap's avatar
      watchdog: iTCO_wdt.c: fix printk format warnings · 4b98b32a
      Randy Dunlap authored
      Fix printk format warnings:
      
      drivers/watchdog/iTCO_wdt.c:577:3: warning: format '%04llx' expects type 'long long unsigned int', but argument 2 has type 'resource_size_t'
      drivers/watchdog/iTCO_wdt.c:594:3: warning: format '%04llx' expects type 'long long unsigned int', but argument 2 has type 'resource_size_t'
      drivers/watchdog/iTCO_wdt.c:600:2: warning: format '%04llx' expects type 'long long unsigned int', but argument 4 has type 'resource_size_t'
      Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      4b98b32a
    • Viresh Kumar's avatar
      watchdog: sp805_wdt: Add clk_{un}prepare support · d9df0ef1
      Viresh Kumar authored
      clk_{un}prepare() routines are required for required on some platforms to run
      part of clk enable/disable() routines from contexts that can schedule.
      
      This patch adds support for these routines in sp805 driver.
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@st.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      d9df0ef1
    • Viresh Kumar's avatar
      watchdog: sp805_wdt: convert to watchdog core · 4a516539
      Viresh Kumar authored
      This patch converts existing sp805 watchdog driver to use already in place
      common infrastructure present in watchdog core. With this lot of code goes away.
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@st.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      4a516539
    • Hans de Goede's avatar
      hwmon/sch56xx: Depend on watchdog for watchdog core functions · 2d8c7ff5
      Hans de Goede authored
      Since the watchdog code in sch56xx-common now uses the watchdog core, the
      Kconfig entires for the sch5627 and sch5636 should depend on WATCHDOG
      being set. Also select the watchdog core when we select one of the drivers.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      2d8c7ff5
    • Dan Carpenter's avatar
      watchdog: sch56xx-common: set correct bits in register() · bb644913
      Dan Carpenter authored
      WDOG_NO_WAY_OUT (3) and WDOG_ACTIVE (0) are the bit numbers, not a mask.
      So "data->wddev.status |= WDOG_ACTIVE;" was intended to set bit zero but
      it is a no-op.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      bb644913
    • Ashish Jangam's avatar
      Watchdog: DA9052/53 PMIC watchdog support · 664a0d78
      Ashish Jangam authored
      This driver adds support for the watchdog functionality provided by
      the Dialog Semiconductor DA9052 PMIC chip.
      
      Tested on samsung smdkv6410 and i.mx53 QS boards.
      Signed-off-by: default avatarAnthony Olech <Anthony.Olech@diasemi.com>
      Signed-off-by: default avatarAshish Jangam <ashish.jangam@kpitcummins.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      664a0d78
    • Hans de Goede's avatar
      watchdog: sch56xx-common: Add proper ref-counting of watchdog data · 54e2dc93
      Hans de Goede authored
      This fixes referencing free-ed memory in the corner case where /dev/watchdog
      is open when the platform driver gets unbound from the platform device.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      54e2dc93
    • Hans de Goede's avatar
      watchdog: sch56xx: Remove unnecessary checks for register changes · 85a2e40c
      Hans de Goede authored
      Since the watchdog core keeps track of the watchdog's active state, start/stop
      will never get called when no changes are necessary. So we can remove the
      check for the output_enable register changing before writing it (which is
      an expensive operation).
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      85a2e40c
    • Hans de Goede's avatar
      watchdog: sch56xx: Use watchdog core · fb551405
      Hans de Goede authored
      Convert sch56xx drivers to the generic watchdog core.
      
      Note this patch depends on the "watchdog: Add multiple device support" patch
      from Alan Cox.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      fb551405
    • Hans de Goede's avatar
      watchdog: Add support for dynamically allocated watchdog_device structs · e907df32
      Hans de Goede authored
      If a driver's watchdog_device struct is part of a dynamically allocated
      struct (which it often will be), merely locking the module is not enough,
      even with a drivers module locked, the driver can be unbound from the device,
      examples:
      1) The root user can unbind it through sysfd
      2) The i2c bus master driver being unloaded for an i2c watchdog
      
      I will gladly admit that these are corner cases, but we still need to handle
      them correctly.
      
      The fix for this consists of 2 parts:
      1) Add ref / unref operations, so that the driver can refcount the struct
         holding the watchdog_device struct and delay freeing it until any
         open filehandles referring to it are closed
      2) Most driver operations will do IO on the device and the driver should not
         do any IO on the device after it has been unbound. Rather then letting each
         driver deal with this internally, it is better to ensure at the watchdog
         core level that no operations (other then unref) will get called after
         the driver has called watchdog_unregister_device(). This actually is the
         bulk of this patch.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      e907df32
    • Hans de Goede's avatar
      watchdog: Add Locking support · f4e9c82f
      Hans de Goede authored
      This patch fixes some potential multithreading issues, despite only
      allowing one process to open the /dev/watchdog device, we can still get
      called multiple times at the same time, since a program could be using thread,
      or could share the fd after a fork.
      
      This causes 2 potential problems:
      1) watchdog_start / open do an unlocked test_n_set / test_n_clear,
         if these 2 race, the watchdog could be stopped while the active
         bit indicates it is running or visa versa.
      
      2) Most watchdog_dev drivers probably assume that only one
         watchdog-op will get called at a time, this is not necessary
         true atm.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      f4e9c82f
    • Hans de Goede's avatar
      watchdog: watchdog_dev: Rewrite wrapper code · 7a879824
      Hans de Goede authored
      Rewrite and extend the wrapper code so that we can easily introduce
      locking (this to be able to prevent potential multithreading issues).
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      7a879824
    • Alan Cox's avatar
      watchdog: use dev_ functions · 3dfd6218
      Alan Cox authored
      While they are registered all our watchdogs now have a valid device object
      so we can in turn use that to report problems nicely.
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      3dfd6218
    • Alan Cox's avatar
      watchdog: create all the proper device files · d6b469d9
      Alan Cox authored
      Create the watchdog class and it's associated devices.
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      d6b469d9
    • Alan Cox's avatar
      watchdog: Add a flag to indicate the watchdog doesn't reboot things · 2bbeed01
      Alan Cox authored
      Some watchdogs merely trigger external alarms and controls. In a managed
      environment this is very useful but we want drivers to be able to figure
      out which is which now multiple dogs can be loaded. Thus add an ALARMONLY
      feature flag.
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      2bbeed01
    • Alan Cox's avatar
      watchdog: Add multiple device support · 45f5fed3
      Alan Cox authored
      We keep the old /dev/watchdog interface file for the first watchdog via
      miscdev. This is basically a cut and paste of the relevant interface code
      from the rtc driver layer tweaked for watchdog.
      
      Revised to fix problems noted by Hans de Goede
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      45f5fed3
    • Wim Van Sebroeck's avatar
      watchdog: watchdog_core.h: make functions extern · fb5f6658
      Wim Van Sebroeck authored
      Make the functions in watchdog_core.h extern like it should.
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      fb5f6658
    • Wim Van Sebroeck's avatar
      watchdog: correct the name of the watchdog_core inlude file · 6cfb5aa8
      Wim Van Sebroeck authored
      The watchdog_core include file should have been named
      watchdog_core.h and not watchdog_dev.h . Correct this.
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      6cfb5aa8
    • Viresh Kumar's avatar
      watchdog: Add watchdog_active() routine · 257f8c4a
      Viresh Kumar authored
      Some watchdog may need to check if watchdog is ACTIVE or not, for example in
      their suspend/resume hooks.
      
      This patch adds this routine and changes the core drivers to use it.
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@st.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      257f8c4a
    • H Hartley Sweeten's avatar
      watchdog: watchdog_dev: include private header to pickup global symbol prototypes · 09a46e73
      H Hartley Sweeten authored
      Include the private watchdog_dev.h header to pickup the prototypes for the
      watchdog_dev_register/unregister functions.
      
      This quiets the following sparse warnings:
      
      warning: symbol 'watchdog_dev_register' was not declared. Should it be static?
      warning: symbol 'watchdog_dev_unregister' was not declared. Should it be static?
      Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      09a46e73
    • Linus Torvalds's avatar
      Merge branch 'x86-trampoline-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 731a7378
      Linus Torvalds authored
      Pull x86 trampoline rework from H. Peter Anvin:
       "This code reworks all the "trampoline"/"realmode" code (various bits
        that need to live in the first megabyte of memory, most but not all of
        which runs in real mode at some point) in the kernel into a single
        object.  The main reason for doing this is that it eliminates the last
        place in the kernel where we needed pages to be mapped RWX.  This code
        separates all that code into proper R/RW/RX pages."
      
      Fix up conflicts in arch/x86/kernel/Makefile (mca removed next to reboot
      code), and arch/x86/kernel/reboot.c (reboot code moved around in one
      branch, modified in this one), and arch/x86/tools/relocs.c (mostly same
      code came in earlier due to working around the ld bugs just before the
      3.4 release).
      
      Also remove stale x86-relocs entry from scripts/.gitignore as per Peter
      Anvin.
      
      * commit '61f54461': (36 commits)
        x86, realmode: Move end signature into header.S
        x86, relocs: When printing an error, say relative or absolute
        x86, relocs: More relocations which may end up as absolute
        x86, relocs: Workaround for binutils 2.22.52.0.1 section bug
        xen-acpi-processor: Add missing #include <xen/xen.h>
        acpi, bgrd: Add missing <linux/io.h> to drivers/acpi/bgrt.c
        x86, realmode: Change EFER to a single u64 field
        x86, realmode: Move kernel/realmode.c to realmode/init.c
        x86, realmode: Move not-common bits out of trampoline_common.S
        x86, realmode: Mask out EFER.LMA when saving trampoline EFER
        x86, realmode: Fix no cache bits test in reboot_32.S
        x86, realmode: Make sure all generated files are listed in targets
        x86, realmode: build fix: remove duplicate build
        x86, realmode: read cr4 and EFER from kernel for 64-bit trampoline
        x86, realmode: fixes compilation issue in tboot.c
        x86, realmode: move relocs from scripts/ to arch/x86/tools
        x86, realmode: header for trampoline code
        x86, realmode: flattened rm hierachy
        x86, realmode: don't copy real_mode_header
        x86, realmode: fix 64-bit wakeup sequence
        ...
      731a7378
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac · 87a5af24
      Linus Torvalds authored
      Pull EDAC internal API changes from Mauro Carvalho Chehab:
       "This changeset is the first part of a series of patches that fixes the
        EDAC sybsystem.  On this set, it changes the Kernel EDAC API in order
        to properly represent the Intel i3/i5/i7, Xeon 3xxx/5xxx/7xxx, and
        Intel E5-xxxx memory controllers.
      
        The EDAC core used to assume that:
      
             - the DRAM chip select pin is directly accessed by the memory
               controller
      
             - when multiple channels are used, they're all filled with the
               same type of memory.
      
        None of the above premises is true on Intel memory controllers since
        2002, when RAMBUS and FB-DIMMs were introduced, and Advanced Memory
        Buffer or by some similar technologies hides the direct access to the
        DRAM pins.
      
        So, the existing drivers for those chipsets had to lie to the EDAC
        core, in general telling that just one channel is filled.  That
        produces some hard to understand error messages like:
      
             EDAC MC0: CE row 3, channel 0, label "DIMM1": 1 Unknown error(s): memory read error on FATAL area : cpu=0 Err=0008:00c2 (ch=2), addr = 0xad1f73480 => socket=0, Channel=0(mask=2), rank=1
      
        The location information there (row3 channel 0) is completely bogus:
        it has no physical meaning, and are just some random values that the
        driver uses to talk with the EDAC core.  The error actually happened
        at CPU socket 0, channel 0, slot 1, but this is not reported anywhere,
        as the EDAC core doesn't know anything about the memory layout.  So,
        only advanced users that know how the EDAC driver works and that tests
        their systems to see how DIMMs are mapped can actually benefit for
        such error logs.
      
        This patch series fixes the error report logic, in order to allow the
        EDAC to expose the memory architecture used by them to the EDAC core.
        So, as the EDAC core now understands how the memory is organized, it
        can provide an useful report:
      
             EDAC MC0: CE memory read error on DIMM1 (channel:0 slot:1 page:0x364b1b offset:0x600 grain:32 syndrome:0x0 - count:1 area:DRAM err_code:0001:0090 socket:0 channel_mask:1 rank:4)
      
        The location of the DIMM where the error happened is reported by "MC0"
        (cpu socket #0), at "channel:0 slot:1" location, and matches the
        physical location of the DIMM.
      
        There are two remaining issues not covered by this patch series:
      
             - The EDAC sysfs API will still report bogus values.  So,
               userspace tools like edac-utils will still use the bogus data;
      
             - Add a new tracepoint-based way to get the binary information
               about the errors.
      
        Those are on a second series of patches (also at -next), but will
        probably miss the train for 3.5, due to the slow review process."
      
      Fix up trivial conflict (due to spelling correction of removed code) in
      drivers/edac/edac_device.c
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: (42 commits)
        i7core: fix ranks information at the per-channel struct
        i5000: Fix the fatal error handling
        i5100_edac: Fix a warning when compiled with 32 bits
        i82975x_edac: Test nr_pages earlier to save a few CPU cycles
        e752x_edac: provide more info about how DIMMS/ranks are mapped
        i5000_edac: Fix the logic that retrieves memory information
        i5400_edac: improve debug messages to better represent the filled memory
        edac: Cleanup the logs for i7core and sb edac drivers
        edac: Initialize the dimm label with the known information
        edac: Remove the legacy EDAC ABI
        x38_edac: convert driver to use the new edac ABI
        tile_edac: convert driver to use the new edac ABI
        sb_edac: convert driver to use the new edac ABI
        r82600_edac: convert driver to use the new edac ABI
        ppc4xx_edac: convert driver to use the new edac ABI
        pasemi_edac: convert driver to use the new edac ABI
        mv64x60_edac: convert driver to use the new edac ABI
        mpc85xx_edac: convert driver to use the new edac ABI
        i82975x_edac: convert driver to use the new edac ABI
        i82875p_edac: convert driver to use the new edac ABI
        ...
      87a5af24
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 7e5b2db7
      Linus Torvalds authored
      Pull MIPS updates from Ralf Baechle:
       "The whole series has been sitting in -next for quite a while with no
        complaints.  The last change to the series was before the weekend the
        removal of an SPI patch which Grant - even though previously acked by
        himself - appeared to raise objections.  So I removed it until the
        situation is clarified.  Other than that all the patches have the acks
        from their respective maintainers, all MIPS and x86 defconfigs are
        building fine and I'm not aware of any problems introduced by this
        series.
      
        Among the key features for this patch series is a sizable patchset for
        Lantiq which among other things introduces support for Lantiq's
        flagship product, the FALCON SOC.  It also means that the opensource
        developers behind this patchset have overtaken Lantiq's competing
        inhouse development team that was working behind closed doors.
      
        Less noteworthy the ath79 patchset which adds support for a few more
        chip variants, cleanups and fixes.  Finally the usual dose of tweaking
        of generic code."
      
      Fix up trivial conflicts in arch/mips/lantiq/xway/gpio_{ebu,stp}.c where
      printk spelling fixes clashed with file move and eventual removal of the
      printk.
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (81 commits)
        MIPS: lantiq: remove orphaned code
        MIPS: Remove all -Wall and almost all -Werror usage from arch/mips.
        MIPS: lantiq: implement support for FALCON soc
        MTD: MIPS: lantiq: verify that the NOR interface is available on falcon soc
        MTD: MIPS: lantiq: implement OF support
        watchdog: MIPS: lantiq: implement OF support and minor fixes
        SERIAL: MIPS: lantiq: implement OF support
        GPIO: MIPS: lantiq: convert gpio-stp-xway to OF
        GPIO: MIPS: lantiq: convert gpio-mm-lantiq to OF and of_mm_gpio
        GPIO: MIPS: lantiq: move gpio-stp and gpio-ebu to the subsystem folder
        MIPS: pci: convert lantiq driver to OF
        MIPS: lantiq: convert dma to platform driver
        MIPS: lantiq: implement support for clkdev api
        MIPS: lantiq: drop ltq_gpio_request() and gpio_to_irq()
        OF: MIPS: lantiq: implement irq_domain support
        OF: MIPS: lantiq: implement OF support
        MIPS: lantiq: drop mips_machine support
        OF: PCI: const usage needed by MIPS
        MIPS: Cavium: Remove smp_reserve_lock.
        MIPS: Move cache setup to setup_arch().
        ...
      7e5b2db7
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm · 227d1e43
      Linus Torvalds authored
      Pull arm updates from Russell King:
       "This contains both some fixes found when trying to get the
        Assabet+neponset setup as a replacement firewall with a 3c589 PCMCIA
        card, and a bunch of changes from Al to fix up the ARM signal
        handling, particularly some of the restart behaviour."
      
      * 'for-linus' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: neponset: make sure neponset_ncr_frob() is exported
        ARM: fix out[bwl]()
        arm: don't open-code ptrace_report_syscall()
        arm: bury unused _TIF_RESTORE_SIGMASK
        arm: remove unused restart trampoline
        arm: new way of handling ERESTART_RESTARTBLOCK
        arm: if we get into work_pending while returning to kernel mode, just go away
        arm: don't call try_to_freeze() from do_signal()
        arm: if there's no handler we need to restore sigmask, syscall or no syscall
        arm: trim _TIF_WORK_MASK, get rid of useless test and branch...
        arm: missing checks of __get_user()/__put_user() return values
      227d1e43
    • Linus Torvalds's avatar
      Merge branch 'akpm' (Andrew's patch-bomb) · 7d36014b
      Linus Torvalds authored
      Merge patches through Andrew Morton:
       "180 patches - err 181 - listed below:
      
         - most of MM.  I held back the (large) "memcg: add hugetlb extension"
           series because a bunfight has recently broken out.
      
         - leds.  After this, Bryan Wu will be handling drivers/leds/
      
         - backlight
      
         - lib/
      
         - rtc"
      
      * emailed from Andrew Morton <akpm@linux-foundation.org>: (181 patches)
        drivers/rtc/rtc-s3c.c: fix compiler warning
        drivers/rtc/rtc-tegra.c: clean up probe/remove routines
        drivers/rtc/rtc-pl031.c: remove RTC timer interrupt handling
        drivers/rtc/rtc-lpc32xx.c: add device tree support
        drivers/rtc/rtc-m41t93.c: don't let get_time() reset M41T93_FLAG_OF
        rtc: ds1307: add trickle charger support
        rtc: ds1307: remove superfluous initialization
        rtc: rename CONFIG_RTC_MXC to CONFIG_RTC_DRV_MXC
        drivers/rtc/Kconfig: place RTC_DRV_IMXDI and RTC_MXC under "on-CPU RTC drivers"
        drivers/rtc/rtc-pcf8563.c: add RTC_VL_READ/RTC_VL_CLR ioctl feature
        rtc: add ioctl to get/clear battery low voltage status
        drivers/rtc/rtc-ep93xx.c: convert to use module_platform_driver()
        rtc/spear: add Device Tree probing capability
        lib/vsprintf.c: "%#o",0 becomes '0' instead of '00'
        radix-tree: fix preload vector size
        spinlock_debug: print kallsyms name for lock
        vsprintf: fix %ps on non symbols when using kallsyms
        lib/bitmap.c: fix documentation for scnprintf() functions
        lib/string_helpers.c: make arrays static
        lib/test-kstrtox.c: mark const init data with __initconst instead of __initdata
        ...
      7d36014b
  2. 29 May, 2012 15 commits