From: Guenter Roeck <guenter.roeck@ericsson.com>
To: Natarajan Gurumoorthy <natg@google.com>
Cc: Jean Delvare <khali@linux-fr.org>,
Wim Van Sebroeck <wim@iguana.be>,
Mike Waychison <mikew@google.com>,
"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>
Subject: Re: [PATCH] Make all it87 drivers SMP safe.
Date: Tue, 5 Apr 2011 17:43:12 -0700 [thread overview]
Message-ID: <20110406004312.GA21882@ericsson.com> (raw)
In-Reply-To: <BANLkTi==zj3PoNuqf2=THaHzevvHHsuh=w@mail.gmail.com>
On Tue, Apr 05, 2011 at 08:13:50PM -0400, Natarajan Gurumoorthy wrote:
> Guenter,
> How would you partition it out? Are you suggesting that we do
> the following:
>
> Patch1:
> drivers/hwmon/Kconfig | 1 +
> drivers/hwmon/it87.c | 14 ++++++++++++-
>
> Patch2:
> drivers/watchdog/Kconfig | 12 +++++++++++
> drivers/watchdog/Makefile | 1 +
> drivers/watchdog/it8712f_wdt.c | 10 ++++----
> drivers/watchdog/it87_lock.c | 27 +++++++++++++++++++++++++
> drivers/watchdog/it87_wdt.c | 42 ++++++---------------------------------
>
> Patch3:
> include/linux/it87_lock.h | 28 ++++++++++++++++++++++++++
>
No, not really. The include file is part of the locking code, and the sequence is wrong.
I personally would introduce the lock in the 1st patch.
This would affect
drivers/watchdog/it87_lock.c
include/linux/it87_lock.h
drivers/watchdog/Makefile
drivers/watchdog/Kconfig
The second patch would update the watchdog driver, affecting
drivers/watchdog/Kconfig
drivers/watchdog/it8712f_wdt.c
and the last patch would update the hwmon driver.
drivers/hwmon/Kconfig
drivers/hwmon/it87.c
Others may argue that patch 1 and 2 (introducing the lock and updating
the watchdog driver) should be in a single patch, since the lock alone
does not do anything without being used. This is a matter of opinion
and really depends on the maintainer of the watchdog subsystem.
Note that your patch has practical problems. If I disable WATCHDOG but enable
the IT87 hwmon driver, I get:
warning: (SENSORS_IT87) selects IT87_LOCK which has unmet direct dependencies (WATCHDOG)
during configuration, and undefined references to it87_io_lock when linking.
So it looks like you might want to consider moving the locking code to a location
outside the watchdog code.
Thanks,
Guenter
next prev parent reply other threads:[~2011-04-06 0:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-05 21:24 [PATCH] Make all it87 drivers SMP safe Nat Gurumoorthy
2011-04-05 22:38 ` Guenter Roeck
2011-04-05 23:05 ` Natarajan Gurumoorthy
[not found] ` <BANLkTimQDVYe53K-M173iQtmkHzKg6Djyg@mail.gmail.com>
2011-04-06 0:05 ` Guenter Roeck
2011-04-06 0:13 ` Natarajan Gurumoorthy
2011-04-06 0:43 ` Guenter Roeck [this message]
2011-04-06 2:50 ` Natarajan Gurumoorthy
2011-04-06 3:02 ` Guenter Roeck
2011-04-06 7:04 ` Natarajan Gurumoorthy
2011-04-06 21:35 ` Paul Gortmaker
2011-04-06 21:45 ` Natarajan Gurumoorthy
2011-04-06 7:19 ` Jean Delvare
2011-04-08 12:25 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110406004312.GA21882@ericsson.com \
--to=guenter.roeck@ericsson.com \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=mikew@google.com \
--cc=natg@google.com \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox