From: Chuck Ebbert <cebbert@redhat.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Andi Kleen <ak@suse.de>
Subject: [RFC PATCH 3/3] x86: use the x86 CPU feature API
Date: Fri, 20 Apr 2007 18:54:43 -0400 [thread overview]
Message-ID: <462944B3.8060304@redhat.com> (raw)
In-Reply-To: <4629438C.4070209@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: x86_use_cpu_api.patch --]
[-- Type: text/plain, Size: 1122 bytes --]
x86: use the x86 CPU feature API
Just a small demo for now.
Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
---
arch/i386/kernel/cpu/amd.c | 4 ++--
arch/i386/kernel/cpu/common.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--- 2.6.21-rc7-d390.orig/arch/i386/kernel/cpu/amd.c
+++ 2.6.21-rc7-d390/arch/i386/kernel/cpu/amd.c
@@ -109,8 +109,8 @@ static void __cpuinit init_amd(struct cp
{
/* Based on AMD doc 20734R - June 2000 */
if ( c->x86_model == 0 ) {
- clear_bit(X86_FEATURE_APIC, c->x86_capability);
- set_bit(X86_FEATURE_PGE, c->x86_capability);
+ clear_cpu_feature(APIC, c);
+ set_cpu_feature(PGE, c);
}
break;
}
--- 2.6.21-rc7-d390.orig/arch/i386/kernel/cpu/common.c
+++ 2.6.21-rc7-d390/arch/i386/kernel/cpu/common.c
@@ -381,7 +381,7 @@ void __cpuinit identify_cpu(struct cpuin
c->x86_model_id[0] = '\0'; /* Unset */
c->x86_max_cores = 1;
c->x86_clflush_size = 32;
- memset(&c->x86_capability, 0, sizeof c->x86_capability);
+ clear_all_cpu_features(c);
if (!have_cpuid_p()) {
/* First of all, decide if this is a 486 or higher */
next prev parent reply other threads:[~2007-04-20 22:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-20 22:49 [RFC PATCH 0/3] Clean up x86 CPU feature setup Chuck Ebbert
2007-04-20 22:52 ` [RFC PATCH 1/3] x86: use defined names for all CPU feature flags Chuck Ebbert
2007-04-21 6:48 ` Dave Jones
2007-04-21 9:47 ` Andi Kleen
2007-04-21 21:19 ` Alan Cox
2007-04-20 22:53 ` [RFC PATCH 2/3] x86: new API for modifying " Chuck Ebbert
2007-04-20 22:54 ` Chuck Ebbert [this message]
2007-04-21 9:41 ` [RFC PATCH 0/3] Clean up x86 CPU feature setup Andi Kleen
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=462944B3.8060304@redhat.com \
--to=cebbert@redhat.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
/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.