16 Mar, 2011

1 commit


14 Mar, 2011

1 commit

  • 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
     

07 Jan, 2011

1 commit

  • 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
     

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
     

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
     

14 Aug, 2010

12 commits


09 Aug, 2010

1 commit


07 Apr, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
    [WATCHDOG] hpwdt - fix lower timeout limit
    [WATCHDOG] iTCO_wdt: TCO Watchdog patch for additional Intel Cougar Point DeviceIDs
    [WATCHDOG] doc: Fix use of WDIOC_SETOPTIONS ioctl.
    [WATCHDOG] doc: watchdog simple example: don't fail on fsync()
    [WATCHDOG] set max63xx driver as ARM only
    [WATCHDOG] powerpc: pika_wdt ident cannot be const

    Linus Torvalds
     

06 Apr, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

07 Mar, 2010

1 commit


23 Jun, 2009

1 commit


18 Jun, 2009

1 commit


31 Mar, 2009

1 commit


25 Mar, 2009

3 commits


01 Dec, 2008

1 commit

  • When the "hpwdt" module is loaded (even if the /dev/watchdog device is not
    opened), then kdump does not work. The panic kernel either does not start at
    all or crash in various places.

    The problem is that hpwdt_pretimeout is registered with register_die_notifier()
    with the highest possible priority. Because it returns NOTIFY_STOP, the
    crash_nmi_callback which is also registered with register_die_notifier()
    is never executed. This causes the shutdown of other CPUs to fail.

    Reverting the order is no option: The crash_nmi_callback executes HLT
    and so never returns normally. Because of that, it must be executed as
    last notifier, which currently is done.

    So, that patch returns NOTIFY_OK to keep the crash_nmi_callback executed.

    Signed-off-by: Bernhard Walle
    Signed-off-by: Wim Van Sebroeck
    Signed-off-by: Thomas Mingarelli
    Cc: Vivek Goyal

    Bernhard Walle
     

21 Nov, 2008

1 commit

  • The address provided by the SMBIOS/DMI CRU information is mapped via
    ioremap() in the virtual address space. However, since the address is
    executed (i.e. call'd), we need to set that pages as executable.

    Without that, I get following oops on a HP ProLiant DL385 G2
    machine with BIOS from 05/29/2008 when I trigger crashdump:

    BUG: unable to handle kernel paging request at ffffc20011090c00
    IP: [] 0xffffc20011090c00
    PGD 12f813067 PUD 7fe6a067 PMD 7effe067 PTE 80000000fffd3173
    Oops: 0011 [1] SMP
    last sysfs file: /sys/devices/system/cpu/cpu3/cache/index2/shared_cpu_map
    CPU 1
    Modules linked in: autofs4 ipv6 af_packet cpufreq_conservative cpufreq_userspace
    cpufreq_powersave powernow_k8 fuse loop dm_mod rtc_cmos ipmi_si sg rtc_core i2c
    _piix4 ipmi_msghandler bnx2 sr_mod container button i2c_core hpilo joydev pcspkr
    rtc_lib shpchp hpwdt cdrom pci_hotplug usbhid hid ff_memless ohci_hcd ehci_hcd
    uhci_hcd usbcore edd ext3 mbcache jbd fan ide_pci_generic serverworks ide_core p
    ata_serverworks pata_acpi cciss ata_generic libata scsi_mod dock thermal process
    or thermal_sys hwmon
    Supported: Yes
    Pid: 0, comm: swapper Not tainted 2.6.27.5-HEAD_20081111100657-default #1
    RIP: 0010:[] [] 0xffffc20011090c00
    RSP: 0018:ffff88012f6f9e68 EFLAGS: 00010046
    RAX: 0000000000000d02 RBX: 0000000000000000 RCX: 0000000000000000
    RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
    RBP: ffff88012f6f9e98 R08: 666666666666660a R09: ffffffffa1006fc0
    R10: 0000000000000000 R11: ffff88012f6f3ea8 R12: ffffc20011090c00
    R13: ffff88012f6f9ee8 R14: 000000000000000e R15: 0000000000000000
    FS: 00007ff70b29a6f0(0000) GS:ffff88012f6512c0(0000) knlGS:0000000000000000
    CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
    CR2: ffffc20011090c00 CR3: 0000000000201000 CR4: 00000000000006e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process swapper (pid: 0, threadinfo ffff88012f6f2000, task ffff88007fa8a1c0)
    Stack: ffffffffa0f8502b 0000000000000002 ffffffff80738d50 0000000000000000
    0000000000000046 0000000000000046 00000000fffffffe ffffffffa0f852ec
    0000000000000000 ffffffff804ad9a6 0000000000000000 0000000000000000
    Call Trace:
    Inexact backtrace:

    [] ? asminline_call+0x2b/0x55 [hpwdt]
    [] hpwdt_pretimeout+0x3c/0xa0 [hpwdt]
    [] ? notifier_call_chain+0x29/0x4c
    [] ? notify_die+0x2d/0x32
    [] ? default_do_nmi+0x53/0x1d9
    [] ? do_nmi+0x2e/0x43
    [] ? nmi+0xa2/0xd0
    [] ? native_safe_halt+0x2/0x3
    <> [] ? default_idle+0x38/0x54
    [] ? c1e_idle+0x118/0x11c
    [] ? cpu_idle+0xa9/0xf1

    Code: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 50 e8 00 00 00 00 58 48 2d 07 10 40 00 48 8b e8 58 e9 68 02
    RIP [] 0xffffc20011090c00
    RSP
    CR2: ffffc20011090c00
    Kernel panic - not syncing: Fatal exception

    Signed-off-by: Bernhard Walle
    Signed-off-by: Wim Van Sebroeck
    Cc: Ingo Molnar
    Acked-by: "H. Peter Anvin"
    Signed-off-by: Thomas Mingarelli
    Cc: Alan Cox
    Signed-off-by: Andrew Morton

    Bernhard Walle
     

27 Aug, 2008

1 commit


07 Aug, 2008

1 commit


06 Aug, 2008

2 commits


31 Jul, 2008

1 commit

  • Static (read: global) is potential problem. Two threads can corrupt each
    other's interrupt status, better avoid this.

    Signed-off-by: Alexey Dobriyan
    Cc: Wim Van Sebroeck
    Cc: Thomas Mingarelli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

21 Jun, 2008

1 commit

  • The inline assembly in drivers/watchdog/hpwdt.c was incredibly broken,
    and included all the function prologue and epilogue stuff, even though
    it was itself then inside a C function where the compiler would add its
    own prologue and epilogue on top of it all.

    This then just _happened_ to work if you had exactly the right compiler
    version and exactly the right compiler flags, so that gcc just happened
    to not create any prologue at all (the gcc-generated epilogue wouldn't
    matter, since it would never be reached).

    But the more proper way to fix it is to simply not do this. Move the
    inline asm to the top level, with no surrounding function at all (the
    better alternative would be to remove the prologue and make it actually
    use proper description of the arguments to the inline asm, but that's a
    bigger change than the one I'm willing to make right now).

    Tested-by: S.Çağlar Onur
    Acked-by: Thomas Mingarelli
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

19 Jun, 2008

1 commit


18 Jun, 2008

1 commit


28 May, 2008

1 commit


25 May, 2008

1 commit