Re: [PATCH v6 0/2] Make all it87 drivers SMP safe

From: Jarod Wilson
Date: Fri Apr 15 2011 - 17:07:01 EST


On Apr 14, 2011, at 5:36 PM, Nat Gurumoorthy wrote:

> 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"
> drivers/watchdog/it8712f_wdt.c
> drivers/watchdog/it87_wdt.c
>
> 02 - Chages to hwmon it87 driver to use "request_muxed_region"
> drivers/hwmon/it87.c
>
> drivers/hwmon/it87.c | 30 +++++++++++++-
> drivers/watchdog/it8712f_wdt.c | 50 +++++++++++++++++++++---
> drivers/watchdog/it87_wdt.c | 80 +++++++++++++++++++++------------------
> 3 files changed, 113 insertions(+), 47 deletions(-)

FYI,

$ head -n 4 drivers/media/rc/ite-cir.c
/*
* Driver for ITE Tech Inc. IT8712F/IT8512 CIR
*
* Copyright (C) 2010 Juan Jesús García de Soria <skandalfo@xxxxxxxxx>


--
Jarod Wilson
jarod@xxxxxxxxxxxx



--
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/