[HP ProLiant WatchDog driver] hpwdt HP WatchDog Patch <resend>

Previous thread: [PATCH] Bugfix to commit 4f9a58d75bfe82ab2b8ba5b8506dfb190a267834 by Grant Likely on Monday, October 22, 2007 - 6:38 pm. (3 messages)

Next thread: kernel BUG at mm/slab.c for 2.6.22.10 by Brett Pemberton on Monday, October 22, 2007 - 7:26 pm. (1 message)
To: <linux-kernel@...>
Cc: Wim Van Sebroeck <wim@...>, <thomas.mingarelli@...>
Date: Monday, October 22, 2007 - 7:09 pm

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>

--- linux-2.6.23.1/drivers/char/watchdog/Makefile.orig 2007-10-12 11:43:44.000000000 -0500
+++ linux-2.6.23.1/drivers/char/watchdog/Makefile 2007-10-15 07:56:31.000000000 -0500
@@ -118,3 +118,10 @@

# Architecture Independant
obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o
+
+#
+# Makefile for the hp WatchDog driver.
+#
+CFLAGS_hpwdt.o += -O
+obj-$(CONFIG_HP_WATCHDOG) += hpwdt.o
+
--- linux-2.6.23.1/drivers/char/watchdog/Kconfig.orig 2007-10-12 11:43:44.000000000 -0500
+++ linux-2.6.23.1/drivers/char/watchdog/Kconfig 2007-10-15 07:57:27.000000000 -0500
@@ -55,6 +55,19 @@
To compile this driver as a module, choose M here: the
module will be called softdog.

+config HP_WATCHDOG
+ tristate "Hewlett-Packard watchdog"
+ depends on WATCHDOG && X86
+ help
+ A software monitoring watchdog and NMI sourcing driver. This driver
+ will detect lockups and provide stack trace. Also, when an NMI
+ occurs this driver will make the necessary BIOS calls to log
+ the cause of the NMI. This is a driver that will only load on a
+ HP ProLiant system with a minimum of iLO2 support.
+ To compile this driver as a module, choose M here: the
+ module will be called hpwdt.
+
+
# ALPHA Architecture

# ARM Architecture
--- linux-2.6.23.1/drivers/char/watchdog/hpwdt.c.orig 2007-10-15 07:53:12.000000000 -0500
+++ linux-...

To: <thomas.mingarelli@...>
Cc: <linux-kernel@...>
Date: Wednesday, October 24, 2007 - 12:25 pm

Before reviewing the rest of your driver: can you please put your "X86 Architecture related"
driver in the X86 related parts of Kconfig and Makefile ? Also the depend on WATCHDOG is not
needed since we allready have a general dependency for all the drivers in Kconfig.

Please also note that we just shifted the watchdog drivers from drivers/char/watchdog to
drivers/watchdog -> so your driver will appear in the drivers/watchdog directory when it
will be included.

Greetings,
Wim.

-

To: <thomas.mingarelli@...>
Cc: <linux-kernel@...>, Wim Van Sebroeck <wim@...>
Date: Tuesday, October 23, 2007 - 4:31 pm

I wouldn't be surprised if this device someday turned up on non-x86
systems. I know there's some x86 firmware stuff in there that clearly
requires x86. But it'd be nice if the rest of the driver compiled and
worked (minus the x86 firmware functionality) on other architectures.
For example, you could wrap all the event logging code in "#ifdef

This is more dangerous than using the gcc assembler operand
syntax, because it assumes things about how the parameters are

You might consider using dev_printk(), dev_warn(), etc, instead of most
of your printk calls. Then you get the device ID and driver name

The driver assumes only a single instance of the device. But PCI being
what it is, it's often possible to have multiple cards, so you might
want some protection in case you trip over more than one.

-

To: Helgaas, Bjorn <bjorn.helgaas@...>
Cc: <linux-kernel@...>, Wim Van Sebroeck <wim@...>
Date: Wednesday, October 24, 2007 - 10:16 am

As I stated before, we will never have more than one ilO2 device on a
system. Also, this device will only be used on x86 and x86_64
architectures. I will check in the dev_warn changes asap.

Tom

-----Original Message-----
From: Helgaas, Bjorn
Sent: Tuesday, October 23, 2007 3:31 PM
To: Mingarelli, Thomas
Cc: linux-kernel@vger.kernel.org; Wim Van Sebroeck
Subject: Re: [HP ProLiant WatchDog driver] hpwdt HP WatchDog Patch
<resend>

I wouldn't be surprised if this device someday turned up on non-x86
systems. I know there's some x86 firmware stuff in there that clearly
requires x86. But it'd be nice if the rest of the driver compiled and
worked (minus the x86 firmware functionality) on other architectures.
For example, you could wrap all the event logging code in "#ifdef

This is more dangerous than using the gcc assembler operand syntax,

You might consider using dev_printk(), dev_warn(), etc, instead of most
of your printk calls. Then you get the device ID and driver name

The driver assumes only a single instance of the device. But PCI being
what it is, it's often possible to have multiple cards, so you might
want some protection in case you trip over more than one.

-

To: Bjorn Helgaas <bjorn.helgaas@...>
Cc: <thomas.mingarelli@...>, <linux-kernel@...>, Wim Van Sebroeck <wim@...>
Date: Tuesday, October 23, 2007 - 5:20 pm

Yes. And even with that protection please move all the global variables
into some per-device structure. That makes the code a lot more understandable
and future-proof in case multiple devices of this type may appear somewhere.

-

To: Christoph Hellwig <hch@...>, Helgaas, Bjorn <bjorn.helgaas@...>
Cc: <linux-kernel@...>, Wim Van Sebroeck <wim@...>
Date: Tuesday, October 23, 2007 - 7:04 pm

We will never have more than one iLO2 device in a server so no multiple
instances are possible.

Tom

-----Original Message-----
From: Christoph Hellwig [mailto:hch@infradead.org]
Sent: Tuesday, October 23, 2007 4:21 PM
To: Helgaas, Bjorn
Cc: Mingarelli, Thomas; linux-kernel@vger.kernel.org; Wim Van Sebroeck
Subject: Re: [HP ProLiant WatchDog driver] hpwdt HP WatchDog Patch
<resend>

Yes. And even with that protection please move all the global variables
into some per-device structure. That makes the code a lot more
understandable and future-proof in case multiple devices of this type
may appear somewhere.

-

Previous thread: [PATCH] Bugfix to commit 4f9a58d75bfe82ab2b8ba5b8506dfb190a267834 by Grant Likely on Monday, October 22, 2007 - 6:38 pm. (3 messages)

Next thread: kernel BUG at mm/slab.c for 2.6.22.10 by Brett Pemberton on Monday, October 22, 2007 - 7:26 pm. (1 message)