[PATCH v5 0/2] Make all it87 drivers SMP safe

From: Nat Gurumoorthy
Date: Tue Apr 12 2011 - 16:49:15 EST

There are 3 different drivers that touch the it87 hardware registers.
The 3 drivers have been written independently and access the it87 hardware
registers assuming they are the only driver accessing it. This change
attempts to serialize access to the hardware by using
"request_muxed_region" macro defined by Alan Cox. Call to this macro
will hold off the requestor if the resource is currently busy.
The use of the above macro makes it possible to get rid of
spinlocks in it8712f_wdt.c and it87_wdt.c watchdog drivers.
This also greatly simplifies the implementation of it87_wdt.c driver.

01 - Changes to it87 watchdog driver to use "request_muxed_region"

02 - Chages to hwmon it87 driver to use "request_muxed_region"

drivers/hwmon/it87.c | 6 +++++
drivers/watchdog/it8712f_wdt.c | 11 +++++----
drivers/watchdog/it87_wdt.c | 41 +++++----------------------------------
3 files changed, 18 insertions(+), 40 deletions(-)

Signed-off-by: Nat Gurumoorthy <natg@xxxxxxxxxx>

Patch History:
- Remove unnecessary while from superio_enter.

- Remove extra braces in superio_enter routines.

- Totally abandon the spinlock based approach and use "request_muxed_region" to
hold off requestors if the resource is busy.

- More verbose patch headers. Add In-Reply-To: field.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/