login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
July
»
26
Re: [PATCH]gx-suspmod.c use boot_cpu_data instead of current_cpu_data
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Dave Young <hidave.darkstar@...>
To: Andrew Morton <akpm@...>
Cc: <linux-kernel@...>, Dave Jones <davej@...>, <cpufreq@...>
Subject:
Re: [PATCH]gx-suspmod.c use boot_cpu_data instead of current_cpu_data
Date: Thursday, July 26, 2007 - 12:20 am
>On 7/25/07, Andrew Morton <akpm@linux-foundation.org> wrote:
quoted text
> On Wed, 25 Jul 2007 14:19:05 +0000 Dave Young <hidave.darkstar@gmail.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@gmail.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.
The only target is to get the cpu vendor, so boot_cpu_data is enough, the drivers/mtd/nand/cs553x_nand.c has the same usage. -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH]gx-suspmod.c use boot_cpu_data instead of current_cpu...
, Dave Young
, (Wed Jul 25, 10:19 am)
Re: [PATCH]gx-suspmod.c use boot_cpu_data instead of current...
, Andrew Morton
, (Wed Jul 25, 2:40 am)
Re: [PATCH]gx-suspmod.c use boot_cpu_data instead of current...
, Hiroshi Miura
, (Thu Jul 26, 3:55 am)
Re: [PATCH]gx-suspmod.c use boot_cpu_data instead of current...
, Dave Young
, (Thu Jul 26, 12:20 am)
Re: [PATCH]gx-suspmod.c use boot_cpu_data instead of current...
, Andrew Morton
, (Thu Jul 26, 12:26 am)
Re: [PATCH]gx-suspmod.c use boot_cpu_data instead of current...
, Dave Jones
, (Thu Jul 26, 12:46 pm)
Re: [PATCH]gx-suspmod.c use boot_cpu_data instead of current...
, Alan Cox
, (Thu Jul 26, 1:11 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 005/196] Chinese: add translation of SubmittingDrivers
David Woodhouse
[PATCHv2 00/28] Allow built-in firmware to be accessed by request_firmware()
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Mike Travis
[RFC 00/15] x86_64: Optimize percpu accesses
git
:
linux-netdev
:
Gerrit Renker
[PATCH 0/37] dccp: Feature negotiation - last call for comments
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Natalie Protasevich
[BUG] New Kernel Bugs
David Miller
[GIT]: Networking
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
0 users
and
681 guests
online.
Syndicate