aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/hpwdt.c
Commit message (Collapse)AuthorAgeFilesLines
* hpwdt: Fix kdump issue in hpwdtToshi Kani2012-10-021-0/+3
| | | | | | | | | | | | | | | | | commit 308b135e4fcc00c80c07e0e04e7afa8edf78583c upstream. kdump can be interrupted by watchdog timer when the timer is left activated on the crash kernel. Changed the hpwdt driver to disable watchdog timer at boot-time. This assures that watchdog timer is disabled until /dev/watchdog is opened, and prevents watchdog timer to be left running on the crash kernel. Signed-off-by: Toshi Kani <toshi.kani@hp.com> Tested-by: Lisa Mitchell <lisa.mitchell@hp.com> Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* watchdog: hpwdt: clean up set_memory_x call for 32 bitMaxim Uvarov2012-03-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | commit 97d2a10d5804d585ab0b58efbd710948401b886a upstream. 1. address has to be page aligned. 2. set_memory_x uses page size argument, not size. Bug causes with following commit: commit da28179b4e90dda56912ee825c7eaa62fc103797 Author: Mingarelli, Thomas <Thomas.Mingarelli@hp.com> Date: Mon Nov 7 10:59:00 2011 +0100 watchdog: hpwdt: Changes to handle NX secure bit in 32bit path commit e67d668e147c3b4fec638c9e0ace04319f5ceccd upstream. This patch makes use of the set_memory_x() kernel API in order to make necessary BIOS calls to source NMIs. Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* watchdog: hpwdt: Changes to handle NX secure bit in 32bit pathMingarelli, Thomas2012-01-061-1/+4
| | | | | | | | | | | | | | | commit e67d668e147c3b4fec638c9e0ace04319f5ceccd upstream. This patch makes use of the set_memory_x() kernel API in order to make necessary BIOS calls to source NMIs. This is needed for SLES11 SP2 and the latest upstream kernel as it appears the NX Execute Disable has grown in its control. Signed-off by: Thomas Mingarelli <thomas.mingarelli@hp.com> Signed-off by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* watchdog: convert to DEFINE_PCI_DEVICE_TABLEWim Van Sebroeck2011-03-151-1/+1
| | | | | | | Convert static struct pci_device_id *[] to static DEFINE_PCI_DEVICE_TABLE tables. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: hpwdt: eliminate section mismatch warningAxel Lin2011-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | 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 <axel.lin@gmail.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* x86: Convert some devices to use DIE_NMIUNKNOWNDon Zickus2011-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dzickus@redhat.com> Cc: Russ Anderson <rja@sgi.com> Cc: Corey Minyard <minyard@acm.org> Cc: openipmi-developer@lists.sourceforge.net Cc: dann frazier <dannf@hp.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1294348732-15030-3-git-send-email-dzickus@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, nmi_watchdog: Remove ARCH_HAS_NMI_WATCHDOG and rely on ↵Don Zickus2010-12-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_HARDLOCKUP_DETECTOR 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 <dzickus@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: fweisbec@gmail.com LKML-Reference: <1293044403-14117-1-git-send-email-dzickus@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, nmi_watchdog: Remove all stub function calls from old nmi_watchdogDon Zickus2010-11-181-6/+1
| | | | | | | | | | | | | | | | | | | 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 <dzickus@redhat.com> Cc: fweisbec@gmail.com Cc: gorcunov@openvz.org LKML-Reference: <1289578944-28564-3-git-send-email-dzickus@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* watchdog: hpwdt (12/12): Make NMI decoding a compile-time optiondann frazier2010-08-131-1/+26
| | | | | | | | | | | hpwdt is quite functional without the NMI decoding feature. This change lets users disable the NMI portion at compile-time via the new HPWDT_NMI_DECODING config option. Signed-off-by: dann frazier <dannf@hp.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: hpwdt (11/12): move NMI-decoding init and exit to seperate functionsdann frazier2010-08-131-55/+69
| | | | | | | | | | | | Move NMI-decoding initialisation and exit code to seperate functions so that we can ifdef-out parts of it in the future. Also, this is for a device, so let's use dev_info instead of printk. Signed-off-by: dann frazier <dannf@hp.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: hpwdt (10/12): Use "decoding" instead of "sourcing"dann frazier2010-08-131-10/+10
| | | | | | | | | | | The term "decoding" more clearly explains what hpwdt is doing. It isn't just finding the source of the interrupt, but rather aids in decoding what the interrupt means. Signed-off-by: dann frazier <dannf@hp.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: hpwdt (9/12): hpwdt_pretimeout reorganizationdann frazier2010-08-131-17/+19
| | | | | | | | | | Reorganize this function to remove excess indentation and highlight the single return code. (No functional change). Signed-off-by: dann frazier <dannf@hp.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: hpwdt (8/12): implement WDIOC_GETTIMELEFTdann frazier2010-08-131-0/+9
| | | | | | | | | Let applications check the amount of time left before the watchdog will fire. Signed-off-by: dann frazier <dannf@hp.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: hpwdt (7/12): allow full range of timer values supported by hardwaredann frazier2010-08-131-2/+3
| | | | | | | | | | The hpwdt timer is a 16 bit value with 128ms resolution. Let applications use this entire range. Signed-off-by: dann frazier <dannf@hp.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: hpwdt (6/12): Introduce SECS_TO_TICKS() macrodann frazier2010-08-131-2/+3
| | | | | | | | | Define a macro to convert from seconds to timer ticks. Signed-off-by: dann frazier <dannf@hp.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: hpwdt (5/12): Make x86 assembly ifdef guard more strictdann frazier2010-08-131-6/+5
| | | | | | | | | | | The 32-bit assembly is guarded by an #ifndef CONFIG_X86_64. Kconfig prevents us from building this driver on !X86, so that happens to suffice - but we should really lock it down to #ifdef CONFIG_X86_32. Signed-off-by: dann frazier <dannf@hp.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: hpwdt (4/12): Despecificate driver from iLO2dann frazier2010-08-131-6/+6
| | | | | | | | | | | | This driver supports both iLO2 and iLO3, but our user-visible strings currently only reference iLO2. Let's just call it "iLO2+" to avoid having to update strings for each iLO generation. This driver doesn't support iLO ASICs prior to iLO2, but that is sufficiently explained in Kconfig. Signed-off-by: dann frazier <dannf@hp.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: hpwdt (3/12): Group NMI sourcing specific items togetherdann frazier2010-08-131-25/+24
| | | | | | | | | | | | | | | * Group together includes specific to NMI sourcing * Group defines only used by NMI sourcing together * Group declarations specific to NMI sourcing together This gives a clean seperation of watchdog specific items and NMI sourcing specific items (which is needed for making it possible to build hpwdt without the NMI functionality). Signed-off-by: dann frazier <dannf@hp.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: hpwdt (2/12): Group options that affect watchdog behavior togetherdann frazier2010-08-131-3/+3
| | | | | | | | | Reorganization only. Signed-off-by: dann frazier <dannf@hp.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: hpwdt (1/12): clean-up include-files.dann frazier2010-08-131-10/+2
| | | | | | | | | | | * remove unnecessary includes * We use a spinlock, but lacked the include * We need bitops.h for test_and_set_bit/clear_bit Signed-off-by: dann frazier <dannf@hp.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* watchdog: hpwdt: formatting of pointers in printk()Kulikov Vasiliy2010-08-081-2/+2
| | | | | | | | Use %p instead of %08x in printk(). Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdogLinus Torvalds2010-04-061-1/+1
|\ | | | | | | | | | | | | | | | | | | * 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
| * [WATCHDOG] hpwdt - fix lower timeout limitThomas Mingarelli2010-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | [Novell Bug 581103] HP Watchdog driver has arbitrary (wrong) timeout limits. Fix the lower timeout limit to a more appropriate value. Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Cc: stable <stable@kernel.org>
* | include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-1/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit 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>
* [WATCHDOG] watchdog_info constifyWim Van Sebroeck2010-03-071-1/+1
| | | | | | | make the watchdog_info struct const where possible. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] hpwdt: Add NMI priority optionTom Mingarelli2009-06-231-5/+21
| | | | | | | | | Add a priority option so that the user can choose if we do the NMI first or last. Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] hpwdt: Add NMI sourcingThomas Mingarelli2009-06-181-15/+44
| | | | | | | | | Add NMI sourcing functionality (Can only be active if nmi_watchdog is inactive). Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* dmi: Let dmi_walk() users pass private dataJean Delvare2009-03-301-2/+2
| | | | | | | | | | | At the moment, dmi_walk() lacks flexibility, users can't pass data to the callback function. Add a pointer for private data to make this function more flexible. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Roland Dreier <rolandd@cisco.com>
* [WATCHDOG] More coding-style and trivial clean-upWim Van Sebroeck2009-03-251-1/+2
| | | | | | | Some more cleaning-up of the watchdog drivers. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] struct file_operations should be constWim Van Sebroeck2009-03-251-1/+1
| | | | | | | | Fix following warnings: WARNING: struct file_operations should normally be const Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] hpwdt.c: Add new HP BMC controller. Thomas Mingarelli2009-03-251-8/+7
| | | | | | | | Add the PCI-ID for the upcoming new BMC controller for HP hardware. Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] hpwdt: Fix kdump when using hpwdtBernhard Walle2008-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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 <bwalle@suse.de> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com> Cc: Vivek Goyal <vgoyal@redhat.com>
* [WATCHDOG] hpwdt: set the mapped BIOS address space as executableBernhard Walle2008-11-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: [<ffffc20011090c00>] 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:[<ffffc20011090c00>] [<ffffc20011090c00>] 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: <NMI> [<ffffffffa0f8502b>] ? asminline_call+0x2b/0x55 [hpwdt] [<ffffffffa0f852ec>] hpwdt_pretimeout+0x3c/0xa0 [hpwdt] [<ffffffff804ad9a6>] ? notifier_call_chain+0x29/0x4c [<ffffffff802587e4>] ? notify_die+0x2d/0x32 [<ffffffff804abbdc>] ? default_do_nmi+0x53/0x1d9 [<ffffffff804abd90>] ? do_nmi+0x2e/0x43 [<ffffffff804ab552>] ? nmi+0xa2/0xd0 [<ffffffff80221ef9>] ? native_safe_halt+0x2/0x3 <<EOE>> [<ffffffff8021345d>] ? default_idle+0x38/0x54 [<ffffffff8021359a>] ? c1e_idle+0x118/0x11c [<ffffffff8020b3b5>] ? 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 <55> 50 e8 00 00 00 00 58 48 2d 07 10 40 00 48 8b e8 58 e9 68 02 RIP [<ffffc20011090c00>] 0xffffc20011090c00 RSP <ffff88012f6f9e68> CR2: ffffc20011090c00 Kernel panic - not syncing: Fatal exception Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Cc: Ingo Molnar <mingo@elte.hu> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Cc: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* [WATCHDOG] hpwdt.c kdebug supportThomas Mingarelli2008-08-261-43/+50
| | | | | | | | add kdebug support for the hpwdt.c driver. Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] more coding style clean-up'sWim Van Sebroeck2008-08-061-2/+2
| | | | | | More coding style clean-up's. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] hpwdt.c - fix double includesWim Van Sebroeck2008-08-061-2/+0
| | | | | | | The last clean-up created 2 times the same include. delete the doubles. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] Merge code clean-up's from Alan Cox.Wim Van Sebroeck2008-08-061-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | 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 <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
| * [WATCHDOG 11/57] hpwdt: couple of include cleanupsAlan Cox2008-05-271-2/+2
| | | | | | | | | | | | | | | | clean-up includes Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* | hpwdt: don't use static flagsAlexey Dobriyan2008-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | Static (read: global) is potential problem. Two threads can corrupt each other's interrupt status, better avoid this. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Thomas Mingarelli <thomas.mingarelli@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | [watchdog] hpwdt: fix use of inline assemblyLinus Torvalds2008-06-201-75/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <caglar@pardus.org.tr> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Revert "[WATCHDOG] hpwdt: Fix NMI handling."Wim Van Sebroeck2008-06-181-12/+15
| | | | | | | | | | | | | | The old setup works better. Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* | Revert "[WATCHDOG] make watchdog/hpwdt.c:asminline_call() static"Thomas Mingarelli2008-06-171-4/+4
|/ | | | | | | | The driver needs the asmlinkage tag and the CFLAGS line in the Makefile. Without it the driver doesn't work. Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] hpwdt: Fix NMI handling.Mingarelli, Thomas2008-05-251-15/+12
| | | | | | | | | | I need to just return in case it's not my NMI so someone else can take a look at it (and reset die_nmi_called to 0 in case I actually do get one that's mine to handle). Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [WATCHDOG] make watchdog/hpwdt.c:asminline_call() staticAdrian Bunk2008-03-061-4/+4
| | | | | | | | | | | This patch makes the needlessly global asminline_call() static and removes the not required "asmlinkage". Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Cc: Andrew Morton <akpm@linux-foundation.org>
* [WATCHDOG] hpwdt: Use dmi_walk() instead of own copyRoland Dreier2008-03-061-183/+20
| | | | | | | | | | | | We can simplify the code by deleting all of the duplicated DMI table walking code and using the kernel's existing dmi_walk() interface to find the DMI entry the driver is looking for. Signed-off-by: Roland Dreier <rolandd@cisco.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* [WATCHDOG] Fix return value warning in hpwdtRoland Dreier2008-03-061-11/+8
| | | | | | | | | | | | | | The return value of smbios_scan_machine() is never used, and when it succeeds it doesn't return anything, so just make it void. This fixes: drivers/watchdog/hpwdt.c: In function 'smbios_scan_machine': drivers/watchdog/hpwdt.c:562: warning: control reaches end of non-void function Signed-off-by: Roland Dreier <rolandd@cisco.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* [WATCHDOG] Fix declaration of struct smbios_entry_point in hpwdtRoland Dreier2008-03-061-1/+1
| | | | | | | | | | | | | | | | | | On my HP DL380 G5 system running a 64-bit kernel, loading the hpwdt driver causes a crash because the driver attempts to ioremap an invalid physical address. This is because the driver has an incorrect definition of the SMBIOS table entry point structure: the table address is only a 32-bit quantity, and making it a u64 means that the high-order 32 bits end up containing garbage. Correcting the structure definition fixes the driver so that it loads without any problems on my system. Signed-off-by: Roland Dreier <rolandd@cisco.com> Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* [WATCHDOG] HP ProLiant WatchDog driverThomas Mingarelli2008-02-181-0/+926
Hp is providing a Hardware WatchDog Timer driver that will only work with the specific HW Timer located in the HP ProLiant iLO 2 ASIC. The iLO 2 HW Timer will generate a Non-maskable Interrupt (NMI) 9 seconds before physically resetting the server, by removing power, so that the event can be logged to the HP Integrated Management Log (IML), a Non-Volatile Random Access Memory (NVRAM). The logging of the event is performed using the HP ProLiant ROM via an Industry Standard access known as a BIOS Service Directory Entry. Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>