14 Mar, 2011

5 commits

  • hpwdt_init_nmi_decoding() is called in hpwdt_init_one error handling,
    thus remove the __devexit annotation of hpwdt_exit_nmi_decoding().

    This patch fixes below warning:

    WARNING: drivers/watchdog/hpwdt.o(.devinit.text+0x36f): Section mismatch in reference from the function hpwdt_init_one() to the function .devexit.text:hpwdt_exit_nmi_decoding()
    The function __devinit hpwdt_init_one() references
    a function __devexit hpwdt_exit_nmi_decoding().
    This is often seen when error handling in the init function
    uses functionality in the exit path.
    The fix is often to remove the __devexit annotation of
    hpwdt_exit_nmi_decoding() so it may be used outside an exit section.

    Signed-off-by: Axel Lin
    Acked-by: Thomas Mingarelli
    Signed-off-by: Wim Van Sebroeck

    Axel Lin
     
  • outb_p(c || 0x01, WDT_EFDR); -> || should be |

    Reported-By: Toralf Förster
    Signed-off-by: Wim Van Sebroeck

    Wim Van Sebroeck
     
  • "==" has higher precedence than "&". Since
    if (sch311x_sio_inb(sio_config_port, 0x30) & (0x01 == 0)) is always
    false the message is never printed.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Wim Van Sebroeck

    Dan Carpenter
     
  • if (sch311x_sio_inb(sio_config_port, 0x30) && 0x01 == 0) -> && should be &

    Reported-By: Toralf Förster
    Signed-off-by: Wim Van Sebroeck

    Wim Van Sebroeck
     
  • cppcheck-1.47 reports:
    [drivers/watchdog/cpwd.c:650]: (error) Buffer access out-of-bounds: p.devs

    The source code is
    for (i = 0; i < 4; i++) {
    misc_deregister(&p->devs[i].misc);

    where devs is defined as WD_NUMDEVS big and WD_NUMDEVS is equal to 3.
    So the 4 should be a 3 or WD_NUMDEVS.

    Reported-By: David Binderman
    Signed-off-by: Wim Van Sebroeck

    Wim Van Sebroeck
     

10 Mar, 2011

1 commit

  • Some systems don't provide DMI_BOARD_NAME in their DMI tables. Avoid
    crash in such situations in fitpc2_wdt_init.

    The fix is to check if the dmi_get_system_info return value is NULL.

    The oops:
    BUG: unable to handle kernel NULL pointer dereference at (null)
    IP: [] strstr+0x26/0xa0
    PGD 3966e067 PUD 39605067 PMD 0
    Oops: 0000 [#1] SMP
    last sysfs file: /sys/devices/system/cpu/cpu1/cache/index2/shared_cpu_map
    CPU 1
    Modules linked in: ...
    Pid: 1748, comm: modprobe Not tainted 2.6.37-22-default #1 /Bochs
    RIP: 0010:[] [] strstr+0x26/0xa0
    RSP: 0018:ffff88003ad73f18 EFLAGS: 00010206
    RAX: 0000000000000000 RBX: 00000000ffffffed RCX: 00000000ffffffff
    RDX: ffffffffa003f4cc RSI: ffffffffa003f4c2 RDI: 0000000000000000
    ...
    CR2: 0000000000000000 CR3: 000000003b7ac000 CR4: 00000000000006e0
    ...
    Process modprobe (pid: 1748, threadinfo ffff88003ad72000, task ffff88002e6365c0)
    Stack: ...
    Call Trace:
    [] fitpc2_wdt_init+0x1f/0x13c [sbc_fitpc2_wdt]
    [] do_one_initcall+0x3a/0x170
    ...
    Code: f3 c3 0f 1f 00 80 3e 00 53 48 89 f8 74 1b 48 89 f2 0f 1f 40 00 48 83 c2 01 80 3a 00 75 f7 49 89 d0 48 89 f8 49 29 f0 75 02 5b c3 3f 00 74 0e 0f 1f 44 00 00 48 83 c0 01 80 38 00 75 f7 49 89

    Signed-off-by: Jiri Slaby
    Signed-off-by: Wim Van Sebroeck

    Jiri Slaby
     

08 Feb, 2011

2 commits


12 Jan, 2011

18 commits


07 Jan, 2011

3 commits

  • They are a handful of places in the code that register a die_notifier
    as a catch all in case no claims the NMI. Unfortunately, they trigger
    on events like DIE_NMI and DIE_NMI_IPI, which depending on when they
    registered may collide with other handlers that have the ability to
    determine if the NMI is theirs or not.

    The function unknown_nmi_error() makes one last effort to walk the
    die_chain when no one else has claimed the NMI before spitting out
    messages that the NMI is unknown.

    This is a better spot for these devices to execute any code without
    colliding with the other handlers.

    The two drivers modified are only compiled on x86 arches I believe, so
    they shouldn't be affected by other arches that may not have
    DIE_NMIUNKNOWN defined.

    Signed-off-by: Don Zickus
    Cc: Russ Anderson
    Cc: Corey Minyard
    Cc: openipmi-developer@lists.sourceforge.net
    Cc: dann frazier
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Don Zickus
     
  • * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (416 commits)
    ARM: DMA: add support for DMA debugging
    ARM: PL011: add DMA burst threshold support for ST variants
    ARM: PL011: Add support for transmit DMA
    ARM: PL011: Ensure IRQs are disabled in UART interrupt handler
    ARM: PL011: Separate hardware FIFO size from TTY FIFO size
    ARM: PL011: Allow better handling of vendor data
    ARM: PL011: Ensure error flags are clear at startup
    ARM: PL011: include revision number in boot-time port printk
    ARM: vexpress: add sched_clock() for Versatile Express
    ARM i.MX53: Make MX53 EVK bootable
    ARM i.MX53: Some bug fix about MX53 MSL code
    ARM: 6607/1: sa1100: Update platform device registration
    ARM: 6606/1: sa1100: Fix platform device registration
    ARM i.MX51: rename IPU irqs
    ARM i.MX51: Add ipu clock support
    ARM: imx/mx27_3ds: Add PMIC support
    ARM: DMA: Replace page_to_dma()/dma_to_page() with pfn_to_dma()/dma_to_pfn()
    mx51: fix usb clock support
    MX51: Add support for usb host 2
    arch/arm/plat-mxc/ehci.c: fix errors/typos
    ...

    Linus Torvalds
     
  • Conflicts:
    arch/arm/mach-pxa/clock.c
    arch/arm/mach-pxa/clock.h

    Russell King
     

04 Jan, 2011

1 commit


03 Jan, 2011

1 commit


23 Dec, 2010

1 commit

  • The x86 arch has shifted its use of the nmi_watchdog from a
    local implementation to the global one provide by
    kernel/watchdog.c. This shift has caused a whole bunch of
    compile problems under different config options. I attempt to
    simplify things with the patch below.

    In order to simplify things, I had to come to terms with the
    meaning of two terms ARCH_HAS_NMI_WATCHDOG and
    CONFIG_HARDLOCKUP_DETECTOR. Basically they mean the same thing,
    the former on a local level and the latter on a global level.

    With the old x86 nmi watchdog gone, there is no need to rely on
    defining the ARCH_HAS_NMI_WATCHDOG variable because it doesn't
    make sense any more. x86 will now use the global
    implementation.

    The changes below do a few things. First it changes the few
    places that relied on ARCH_HAS_NMI_WATCHDOG to use
    CONFIG_X86_LOCAL_APIC (the former was an alias for the latter
    anyway, so nothing unusual here). Those pieces of code were
    relying more on local apic functionality the nmi watchdog
    functionality, so the change should make sense.

    Second, I removed the x86 implementation of
    touch_nmi_watchdog(). It isn't need now, instead x86 will rely
    on kernel/watchdog.c's implementation.

    Third, I removed the #define ARCH_HAS_NMI_WATCHDOG itself from
    x86. And tweaked the include/linux/nmi.h file to tell users to
    look for an externally defined touch_nmi_watchdog in the case of
    ARCH_HAS_NMI_WATCHDOG _or_ CONFIG_HARDLOCKUP_DETECTOR. This
    changes removes some of the ugliness in that file.

    Finally, I added a Kconfig dependency for
    CONFIG_HARDLOCKUP_DETECTOR that said you can't have
    ARCH_HAS_NMI_WATCHDOG _and_ CONFIG_HARDLOCKUP_DETECTOR. You can
    only have one nmi_watchdog.

    Tested with
    ARCH=i386: allnoconfig, defconfig, allyesconfig, (various broken
    configs) ARCH=x86_64: allnoconfig, defconfig, allyesconfig,
    (various broken configs)

    Hopefully, after this patch I won't get any more compile broken
    emails. :-)

    v3:
    changed a couple of 'linux/nmi.h' -> 'asm/nmi.h' to pick-up correct function
    prototypes when CONFIG_HARDLOCKUP_DETECTOR is not set.

    Signed-off-by: Don Zickus
    Cc: Peter Zijlstra
    Cc: fweisbec@gmail.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Don Zickus
     

22 Dec, 2010

1 commit


14 Dec, 2010

1 commit


07 Dec, 2010

1 commit


02 Dec, 2010

4 commits


18 Nov, 2010

1 commit

  • Now that the bulk of the old nmi_watchdog is gone, remove all
    the stub variables and hooks associated with it.

    This touches lots of files mainly because of how the io_apic
    nmi_watchdog was implemented. Now that the io_apic nmi_watchdog
    is forever gone, remove all its fingers.

    Most of this code was not being exercised by virtue of
    nmi_watchdog != NMI_IO_APIC, so there shouldn't be anything to
    risky here.

    Signed-off-by: Don Zickus
    Cc: fweisbec@gmail.com
    Cc: gorcunov@openvz.org
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Don Zickus