[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a11ccc30707260055y46438459gd618265a4df02ff3@mail.gmail.com>
Date: Thu, 26 Jul 2007 16:55:59 +0900
From: "Hiroshi Miura" <miura@...cha.org>
To: "Andrew Morton" <akpm@...ux-foundation.org>
Cc: "Dave Young" <hidave.darkstar@...il.com>,
"Dave Jones" <davej@...emonkey.org.uk>,
linux-kernel@...r.kernel.org, cpufreq@....linux.org.uk
Subject: Re: [PATCH]gx-suspmod.c use boot_cpu_data instead of current_cpu_data
2007/7/25, Andrew Morton <akpm@...ux-foundation.org>:
> On Wed, 25 Jul 2007 14:19:05 +0000 Dave Young <hidave.darkstar@...il.com> wrote:
>
> > Hi,
> > in preemptible kernel will report BUG: using smp_processor_id() in preemptible, so use boot_cpu_data instead of current_cpu_data.
> >
> > Signed-off-by: Dave Young <hidave.darkstar@...il.com>
> >
> > ---
> > arch/i386/kernel/cpu/cpufreq/gx-suspmod.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff -pur linux/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c linux.new/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c
> > --- linux/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c 2007-07-25 14:11:06.000000000 +0000
> > +++ linux.new/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c 2007-07-25 13:57:29.000000000 +0000
> > @@ -181,8 +181,8 @@ static __init struct pci_dev *gx_detect_
> > struct pci_dev *gx_pci = NULL;
> >
> > /* check if CPU is a MediaGX or a Geode. */
> > - if ((current_cpu_data.x86_vendor != X86_VENDOR_NSC) &&
> > - (current_cpu_data.x86_vendor != X86_VENDOR_CYRIX)) {
> > + if ((boot_cpu_data.x86_vendor != X86_VENDOR_NSC) &&
> > + (boot_cpu_data.x86_vendor != X86_VENDOR_CYRIX)) {
> > dprintk("error: no MediaGX/Geode processor found!\n");
> > return NULL;
> > }
>
> um, I suspect it really wants to get at the current CPU. But putting a
> preempt_disable() around just that code is meaningless: the current CPU
> could change immediately before or after the code block. It needs deeper
> fixing, methinks.
I think we can remove these part. It checks chipset 's pci id
(vendor id/device id) after this part as follows;
/* detect which companion chip is used */
while ((gx_pci = pci_get_device(PCI_ANY_ID, PCI_ANY_ID,
gx_pci)) != NULL) {
if ((pci_match_id(gx_chipset_tbl, gx_pci)) != NULL)
return gx_pci;
}
It drives cpu frequency through chipset register, not CPU regsiter.
It may be enough to check chipset pci id.
Hiroshi
--
HIroshi Miura
NTT DATA Corp. and IPA OSS center
miura@...cha.org
(株)NTTデータ /(独)情報処理推進機構
三浦広志
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists