[RFC PATCH 3/3] x86: use the x86 CPU feature API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



x86: use the x86 CPU feature API

Just a small demo for now.

Signed-off-by: Chuck Ebbert <[email protected]>
---
 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 */

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux