From: Wang YanQing <udknight@gmail.com>
To: bp@alien8.de
Cc: hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com,
x86@kernel.org, bp@suse.de, fenghua.yu@intel.com,
linux-kernel@vger.kernel.org
Subject: [PATCH v2]x86: Fix override new_cpu_data.x86 with 486
Date: Fri, 28 Jun 2013 22:45:16 +0800 [thread overview]
Message-ID: <20130628144516.GA2177@udknight> (raw)
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 until
cpu_detect runs.
Signed-off-by: Wang YanQing <udknight@gmail.com>
---
ChangeLog
v1-v2:
1:Use more accurate and short commit log
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..24c6675 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
next reply other threads:[~2013-06-28 14:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-28 14:45 Wang YanQing [this message]
2013-06-28 14:57 ` [PATCH v2]x86: Fix override new_cpu_data.x86 with 486 Borislav Petkov
2013-07-05 14:25 ` [tip:x86/cpu] x86: " tip-bot for Wang YanQing
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=20130628144516.GA2177@udknight \
--to=udknight@gmail.com \
--cc=bp@alien8.de \
--cc=bp@suse.de \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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.