Re: [BUG] x86 kenel won't boot under Virtual PC

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Friday, September 5, 2008 - 9:30 am

On Fri, 5 Sep 2008, David Sanders wrote:

Hmm.. I'm not a huge fan of the ASM_NOP mess, but you also disable it for 
64-bit x86 too.

On 32-bit, at least the generic nops are fairly reasonable, but the 
default nops for 64-bit really look pretty sad, and the P6 nops really do 
look better.

So I would suggest perhaps moving the static P6 nop selection into the 
CONFIG_X86_64 thing.

The alternative is to just get rid of that static nop selection, and just 
have two cases: 32-bit and 64-bit, and just pick obviously safe cases for 
them. 

So I think that particular part would be better off with changing the 
Kconfig language instead. Ie something like this..

(I removed the 32-bit CPU's from the choices, except for MPENTIUM4 that 
really should be merged with MPSC - the difference between MPENTIUM4 and 
MPSC seems to be just a totally bogus 32-bit vs 64-bit thing. Yes, yes, 
there are PENTIUM4's without 64-bit, but there are also Prescott chips 
that run 32-bit kernels, so the thing is a bit confused.

		Linus

---
 arch/x86/Kconfig.cpu |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 2c518fb..b225219 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -382,14 +382,17 @@ config X86_OOSTORE
 # P6_NOPs are a relatively minor optimization that require a family >=
 # 6 processor, except that it is broken on certain VIA chips.
 # Furthermore, AMD chips prefer a totally different sequence of NOPs
-# (which work on all CPUs).  As a result, disallow these if we're
-# compiling X86_GENERIC but not X86_64 (these NOPs do work on all
-# x86-64 capable chips); the list of processors in the right-hand clause
-# are the cores that benefit from this optimization.
+# (which work on all CPUs).  In addition, it looks like Virtual PC
+# does not understand them.
+#
+# As a result, disallow these if we're not compiling for X86_64 (these
+# NOPs do work on all x86-64 capable chips); the list of processors in
+# the right-hand clause are the cores that benefit from this optimization.
 #
 config X86_P6_NOP
 	def_bool y
-	depends on (X86_64 || !X86_GENERIC) && (M686 || MPENTIUMII || MPENTIUMIII || MPENTIUMM || MCORE2 || MPENTIUM4 || MPSC)
+	depends on X86_64
+	depends on (MCORE2 || MPENTIUM4 || MPSC)
 
 config X86_TSC
 	def_bool y
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[BUG] x86 kenel won't boot under Virtual PC, David Sanders, (Sun Aug 31, 11:22 am)
Re: [BUG] x86 kenel won't boot under Virtual PC, Linus Torvalds, (Sun Aug 31, 11:47 am)
Re: [BUG] x86 kenel won't boot under Virtual PC, Arjan van de Ven, (Sun Aug 31, 12:27 pm)
Re: [BUG] x86 kenel won't boot under Virtual PC, Linus Torvalds, (Sun Aug 31, 12:39 pm)
Re: [BUG] x86 kenel won't boot under Virtual PC, David Sanders, (Sun Aug 31, 1:03 pm)
Re: [BUG] x86 kenel won't boot under Virtual PC, David Sanders, (Mon Sep 1, 1:23 pm)
Re: [BUG] x86 kenel won't boot under Virtual PC, Linus Torvalds, (Mon Sep 1, 3:22 pm)
Re: [BUG] x86 kenel won't boot under Virtual PC, David Sanders, (Tue Sep 2, 5:08 am)
Re: [BUG] x86 kenel won't boot under Virtual PC, Linus Torvalds, (Tue Sep 2, 11:12 am)
Re: [BUG] x86 kenel won't boot under Virtual PC, David Sanders, (Tue Sep 2, 11:44 am)
Re: [BUG] x86 kenel won't boot under Virtual PC, Peter Zijlstra, (Wed Sep 3, 4:09 am)
Re: [BUG] x86 kenel won't boot under Virtual PC, David Sanders, (Wed Sep 3, 4:20 am)
Re: [BUG] x86 kenel won't boot under Virtual PC, David Sanders, (Fri Sep 5, 8:38 am)
Re: [BUG] x86 kenel won't boot under Virtual PC, Jan Beulich, (Fri Sep 5, 9:15 am)
Re: [BUG] x86 kenel won't boot under Virtual PC, Linus Torvalds, (Fri Sep 5, 9:30 am)
Re: [BUG] x86 kenel won't boot under Virtual PC, Linus Torvalds, (Fri Sep 5, 9:39 am)
Re: [BUG] x86 kenel won't boot under Virtual PC, Andi Kleen, (Fri Sep 5, 10:55 am)
Re: [BUG] x86 kenel won't boot under Virtual PC, Ingo Molnar, (Fri Sep 5, 11:43 am)
Re: [BUG] x86 kenel won't boot under Virtual PC, Jeremy Fitzhardinge, (Fri Sep 5, 12:08 pm)
Re: [BUG] x86 kenel won't boot under Virtual PC, H. Peter Anvin, (Fri Sep 5, 1:06 pm)
Re: [BUG] x86 kenel won't boot under Virtual PC, H. Peter Anvin, (Fri Sep 5, 1:12 pm)