[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130626162640.GA19913@udknight>
Date: Thu, 27 Jun 2013 00:26:40 +0800
From: Wang YanQing <udknight@...il.com>
To: hpa@...or.com
Cc: tglx@...utronix.de, mingo@...hat.com, x86@...nel.org, bp@...e.de,
fenghua.yu@...el.com, linux-kernel@...r.kernel.org
Subject: [PATCH] x86: Fix override new_cpu_data.x86 with 486
We should set X86 to 486 before use cpuid
to detect the cpu type, if we set X86 to 486
after cpuid, then we will get 486 for ever.
Yes, we will correct this in early_cpu_init,
but it is still a wrong behavior, right? So
just fix it.
I also find maybe we can delete the new_cpu_data,
because we will over write all the information
in early_cpu_init, and before early_cpu_init,
there is no user of new_cpu_data, but this is
another patch in the future.
Signed-off-by: Wang YanQing <udknight@...il.com>
---
arch/x86/kernel/head_32.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index 73afd11..733a8ef 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -410,6 +410,7 @@ enable_paging:
/*
* Check if it is 486
*/
+ movb $4,X86 # at least 486
cmpl $-1,X86_CPUID
je is486
@@ -437,7 +438,6 @@ enable_paging:
movl %edx,X86_CAPABILITY
is486:
- movb $4,X86
movl $0x50022,%ecx # set AM, WP, NE and MP
movl %cr0,%eax
andl $0x80000011,%eax # Save PG,PE,ET
--
1.7.12.4.dirty
--
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