From: Guenter Roeck <guenter.roeck@ericsson.com>
To: Jan Beulich <JBeulich@novell.com>
Cc: "r.marek@assembler.cz" <r.marek@assembler.cz>,
"fenghua.yu@intel.com" <fenghua.yu@intel.com>,
"khali@linux-fr.org" <khali@linux-fr.org>,
"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [lm-sensors] x86/hwmon: conditionalize coretemp's dependency on
Date: Mon, 27 Sep 2010 13:02:20 +0000 [thread overview]
Message-ID: <20100927130220.GA2277@ericsson.com> (raw)
In-Reply-To: <4CA0AE5E0200007800019097@vpn.id2.novell.com>
On Mon, Sep 27, 2010 at 08:46:54AM -0400, Jan Beulich wrote:
> >>> On 27.09.10 at 14:16, Guenter Roeck <guenter.roeck@ericsson.com> wrote:
> > On Mon, Sep 27, 2010 at 03:08:50AM -0400, Jan Beulich wrote:
> > [...]
> >
> >> >>
> >> >> config SENSORS_CORETEMP
> >> >> tristate "Intel Core/Core2/Atom temperature sensor"
> >> >> - depends on X86 && PCI && EXPERIMENTAL
> >> >> + depends on X86 && EXPERIMENTAL
> >> >> + depends on PCI || (!MATOM && !GENERIC_CPU && !X86_GENERIC)
> >> >> help
> >> >> If you say yes here you get support for the temperature
> >> >> sensor inside your CPU. Most of the family 6 CPUs
> >> >
> >> > Resending my reply to this one as well. Again, apologies if there is
> >> > duplication.
> >> >
> >> > The coretemp code unconditionally calls pci functions, even if PCI is not
> >> > defined.
> >> > I am concerned that this might cause problems. It might be better to stick
> >> > with
> >> > the more generic dependency instead of trying to optimize too much.
> >>
> >> pci.h takes care to define stub inline functions for the !CONFIG_PCI
> >> case. It seemed largely odd for a driver like this to depend on PCI
> >> at all, and hence I think it is more transparent to make the needs
> >> explicit.
> >>
> > Seems to me the dependency should not exist in the first place, then.
> > Otherwise, the driver would still be disabled for GENERIC_CPU, which isn't
> > good either.
>
> Oh, not having a dependency on PCI at all would be even better.
> I didn't dare to suggest that.
>
> > Are there examples of other drivers which are not defining the PCI
> > dependency
> > but are conditionally calling pci functions ?
>
> I'm not aware of any, but also didn't explicitly look for such.
>
It still compiles if I remove the PCI dependency and disable PCI. So that is one plus.
That whole dependency is just to get the host bridge ID which is then used
to determine tjmax. Personally I would prefer to have a wrong tjmax over not having
coretemp at all, and the means to determine tjmax through the bridge ID is kind
of bogus anyway. So at least in this case it would make sense for me to remove
the dependency completely. Actually, we won't even change functionality,
since tjmax is only set to a higher value for specific bridge IDs.
So, if you don't mind, please re-submit with the PCI dependency removed entirely.
Unless someone starts screaming, I'll apply that to my -next tree.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: Jan Beulich <JBeulich@novell.com>
Cc: "r.marek@assembler.cz" <r.marek@assembler.cz>,
"fenghua.yu@intel.com" <fenghua.yu@intel.com>,
"khali@linux-fr.org" <khali@linux-fr.org>,
"lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: x86/hwmon: conditionalize coretemp's dependency on PCI
Date: Mon, 27 Sep 2010 06:02:20 -0700 [thread overview]
Message-ID: <20100927130220.GA2277@ericsson.com> (raw)
In-Reply-To: <4CA0AE5E0200007800019097@vpn.id2.novell.com>
On Mon, Sep 27, 2010 at 08:46:54AM -0400, Jan Beulich wrote:
> >>> On 27.09.10 at 14:16, Guenter Roeck <guenter.roeck@ericsson.com> wrote:
> > On Mon, Sep 27, 2010 at 03:08:50AM -0400, Jan Beulich wrote:
> > [...]
> >
> >> >>
> >> >> config SENSORS_CORETEMP
> >> >> tristate "Intel Core/Core2/Atom temperature sensor"
> >> >> - depends on X86 && PCI && EXPERIMENTAL
> >> >> + depends on X86 && EXPERIMENTAL
> >> >> + depends on PCI || (!MATOM && !GENERIC_CPU && !X86_GENERIC)
> >> >> help
> >> >> If you say yes here you get support for the temperature
> >> >> sensor inside your CPU. Most of the family 6 CPUs
> >> >
> >> > Resending my reply to this one as well. Again, apologies if there is
> >> > duplication.
> >> >
> >> > The coretemp code unconditionally calls pci functions, even if PCI is not
> >> > defined.
> >> > I am concerned that this might cause problems. It might be better to stick
> >> > with
> >> > the more generic dependency instead of trying to optimize too much.
> >>
> >> pci.h takes care to define stub inline functions for the !CONFIG_PCI
> >> case. It seemed largely odd for a driver like this to depend on PCI
> >> at all, and hence I think it is more transparent to make the needs
> >> explicit.
> >>
> > Seems to me the dependency should not exist in the first place, then.
> > Otherwise, the driver would still be disabled for GENERIC_CPU, which isn't
> > good either.
>
> Oh, not having a dependency on PCI at all would be even better.
> I didn't dare to suggest that.
>
> > Are there examples of other drivers which are not defining the PCI
> > dependency
> > but are conditionally calling pci functions ?
>
> I'm not aware of any, but also didn't explicitly look for such.
>
It still compiles if I remove the PCI dependency and disable PCI. So that is one plus.
That whole dependency is just to get the host bridge ID which is then used
to determine tjmax. Personally I would prefer to have a wrong tjmax over not having
coretemp at all, and the means to determine tjmax through the bridge ID is kind
of bogus anyway. So at least in this case it would make sense for me to remove
the dependency completely. Actually, we won't even change functionality,
since tjmax is only set to a higher value for specific bridge IDs.
So, if you don't mind, please re-submit with the PCI dependency removed entirely.
Unless someone starts screaming, I'll apply that to my -next tree.
Thanks,
Guenter
next prev parent reply other threads:[~2010-09-27 13:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-13 10:26 [lm-sensors] [PATCH] x86/hwmon: conditionalize coretemp's Jan Beulich
2010-09-13 10:26 ` [PATCH] x86/hwmon: conditionalize coretemp's dependency on PCI Jan Beulich
2010-09-24 18:55 ` [lm-sensors] x86/hwmon: conditionalize coretemp's dependency on Guenter Roeck
2010-09-24 18:55 ` x86/hwmon: conditionalize coretemp's dependency on PCI Guenter Roeck
2010-09-27 7:08 ` [lm-sensors] x86/hwmon: conditionalize coretemp's dependency on Jan Beulich
2010-09-27 7:08 ` x86/hwmon: conditionalize coretemp's dependency on PCI Jan Beulich
2010-09-27 12:16 ` [lm-sensors] x86/hwmon: conditionalize coretemp's dependency on Guenter Roeck
2010-09-27 12:16 ` x86/hwmon: conditionalize coretemp's dependency on PCI Guenter Roeck
2010-09-27 12:46 ` [lm-sensors] x86/hwmon: conditionalize coretemp's dependency on Jan Beulich
2010-09-27 12:46 ` x86/hwmon: conditionalize coretemp's dependency on PCI Jan Beulich
2010-09-27 13:02 ` Guenter Roeck [this message]
2010-09-27 13:02 ` Guenter Roeck
2010-09-27 15:23 ` [lm-sensors] x86/hwmon: conditionalize coretemp's dependency on Jan Beulich
2010-09-27 15:23 ` x86/hwmon: conditionalize coretemp's dependency on PCI Jan Beulich
2010-09-28 7:17 ` [lm-sensors] x86/hwmon: conditionalize coretemp's dependency on Jean Delvare
2010-09-28 7:17 ` x86/hwmon: conditionalize coretemp's dependency on PCI Jean Delvare
2010-09-28 12:00 ` [lm-sensors] x86/hwmon: conditionalize coretemp's dependency on Guenter Roeck
2010-09-28 12:00 ` x86/hwmon: conditionalize coretemp's dependency on PCI Guenter Roeck
2010-09-28 15:20 ` [lm-sensors] x86/hwmon: conditionalize coretemp's dependency on Jean Delvare
2010-09-28 15:20 ` x86/hwmon: conditionalize coretemp's dependency on PCI Jean Delvare
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=20100927130220.GA2277@ericsson.com \
--to=guenter.roeck@ericsson.com \
--cc=JBeulich@novell.com \
--cc=fenghua.yu@intel.com \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=r.marek@assembler.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.