login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
March
»
28
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Yinghai Lu <yhlu.kernel@...>
To: Pavel Machek <pavel@...>
Cc: Ingo Molnar <mingo@...>, H. Peter Anvin <hpa@...>, Thomas Gleixner <tglx@...>, Andrew Morton <akpm@...>, kernel list <linux-kernel@...>
Subject:
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
Date: Friday, March 28, 2008 - 10:51 am
On Fri, Mar 28, 2008 at 6:41 AM, Pavel Machek <pavel@ucw.cz> wrote:
quoted text
> > > On Mon 2008-03-24 23:24:34, Yinghai Lu wrote: > > [PATCH] x86: pat cpu feature bit setting for known cpus > > > > Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> > > > > diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c > > index eb94460..b186047 100644 > > --- a/arch/x86/kernel/cpu/common.c > > +++ b/arch/x86/kernel/cpu/common.c > > @@ -309,6 +309,19 @@ static void __cpuinit early_get_cap(struct cpuinfo_x86 *c) > > > > } > > > > + clear_cpu_cap(c, X86_FEATURE_PAT); > > + > > + switch (c->x86_vendor) { > > + case X86_VENDOR_AMD: > > + if (c->x86 >= 0xf && c->x86 <= 0x11) > > + set_cpu_cap(c, X86_FEATURE_PAT); > > + break; > > + case X86_VENDOR_INTEL: > > + if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15)) > > + set_cpu_cap(c, X86_FEATURE_PAT); > > + break; > > + } > > + > > } > > > > /* > > @@ -397,6 +410,18 @@ static void __cpuinit generic_identify(struct cpuinfo_x86 *c) > > init_scattered_cpuid_features(c); > > } > > > > + clear_cpu_cap(c, X86_FEATURE_PAT); > > + > > + switch (c->x86_vendor) { > > + case X86_VENDOR_AMD: > > + if (c->x86 >= 0xf && c->x86 <= 0x11) > > + set_cpu_cap(c, X86_FEATURE_PAT); > > + break; > > + case X86_VENDOR_INTEL: > > + if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15)) > > + set_cpu_cap(c, X86_FEATURE_PAT); > > + break; > > + } > > } > > > > Cut&paste programming? Can you make it a function?
yes. just want to leave one stub, so could add other cap setting if needed later in early or late identify_cpu.
quoted text
> > > > diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c > > index 3f1dc97..ddaaaaa 100644 > > --- a/arch/x86/kernel/setup_64.c > > +++ b/arch/x86/kernel/setup_64.c > > @@ -979,12 +979,19 @@ static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c) > > if (c->extended_cpuid_level >= 0x80000007) > > c->x86_power = cpuid_edx(0x80000007); > > > > + > > + clear_cpu_cap(c, X86_FEATURE_PAT); > > > > > switch (c->x86_vendor) { > > case X86_VENDOR_AMD: > > early_init_amd(c); > > + if (c->x86 >= 0xf && c->x86 <= 0x11) > > + set_cpu_cap(c, X86_FEATURE_PAT); > > break; > > case X86_VENDOR_INTEL: > > early_init_intel(c); > > + if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15)) > > + set_cpu_cap(c, X86_FEATURE_PAT); > > break; > > } > > one more copy...
for 64 bit. YH --
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] x86: pat cpu feature bit setting for known cpus
, Yinghai Lu
, (Tue Mar 25, 2:24 am)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, dean gaudet
, (Sun Mar 30, 7:43 am)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, Pavel Machek
, (Fri Mar 28, 9:41 am)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, Yinghai Lu
, (Fri Mar 28, 10:51 am)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, H. Peter Anvin
, (Tue Mar 25, 9:38 am)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, Yinghai Lu
, (Tue Mar 25, 2:03 pm)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, Venki Pallipadi
, (Tue Mar 25, 3:08 pm)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, Ingo Molnar
, (Tue Mar 25, 4:08 pm)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, H. Peter Anvin
, (Tue Mar 25, 4:38 pm)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, H. Peter Anvin
, (Tue Mar 25, 7:01 pm)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, Yinghai Lu
, (Tue Mar 25, 7:05 pm)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, H. Peter Anvin
, (Tue Mar 25, 7:06 pm)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, Yinghai Lu
, (Tue Mar 25, 7:08 pm)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, H. Peter Anvin
, (Tue Mar 25, 8:10 pm)
RE: [PATCH] x86: pat cpu feature bit setting for known cpus
, Pallipadi, Venkatesh
, (Tue Mar 25, 7:38 pm)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, Yinghai Lu
, (Tue Mar 25, 8:01 pm)
Re: [PATCH] x86: pat cpu feature bit setting for known cpus
, Ingo Molnar
, (Tue Mar 25, 6:58 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Davide Libenzi
Re: [patch 7/8] fdmap v2 - implement sys_socket2
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
Greg Kroah-Hartman
[PATCH 005/196] Chinese: add translation of SubmittingDrivers
Mariusz Kozlowski
[KJ PATCHES] mostly kmalloc + memset conversion to k[cz]alloc
git
:
linux-netdev
:
KOSAKI Motohiro
[bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin"
Stefan Richter
Re: [GIT]: Networking
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 0/37] dccp: Feature negotiation - last call for comments
git-commits-head
:
Colocation donated by:
Who's online
There are currently
3 users
and
792 guests
online.
Online users
strcmp
Hunterie
zerhai30
Syndicate