Re: [git pull] x86 fixes

Previous thread: Re: 2.6.27-rc5 OLTP performance regression by Peter Zijlstra on Monday, September 8, 2008 - 11:00 am. (7 messages)

Next thread: [git patches] libata fixes, new ids by Jeff Garzik on Monday, September 8, 2008 - 12:50 pm. (1 message)
From: H. Peter Anvin
Date: Monday, September 8, 2008 - 12:32 pm

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

 Thanks,

	-hpa

------------------>
H. Peter Anvin (1):
      x86: prevent binutils from being "smart" and generating NOPLs for us

Jeremy Fitzhardinge (1):
      xen: fix 2.6.27-rc5 xen balloon driver warnings

Linus Torvalds (1):
      x86: disable static NOPLs on 32 bits


 arch/x86/Kconfig.cpu     |   13 ++++++++-----
 arch/x86/Makefile_32.cpu |    5 +++++
 drivers/xen/balloon.c    |    2 +-
 3 files changed, 14 insertions(+), 6 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
diff --git a/arch/x86/Makefile_32.cpu b/arch/x86/Makefile_32.cpu
index e372b58..b72b4f7 100644
--- a/arch/x86/Makefile_32.cpu
+++ ...
From: David Sanders
Date: Monday, September 8, 2008 - 1:34 pm

Peter, I'm getting this error:
as: unrecognized option `-mtune=generic32'
I have binutils 2.17.
David
--

From: H. Peter Anvin
Date: Monday, September 8, 2008 - 2:20 pm

Oh bloody hell...

cc-option = $(call try-run,\
         $(CC) $(KBUILD_CFLAGS) $(1) -S -xc /dev/null -o "$$TMP",$(1),$(2))

Note the -S.  Useless for anything related to the assembler.

/me wimpers...

	-hpa
--

From: H. Peter Anvin
Date: Monday, September 8, 2008 - 2:22 pm

Sam:

Is there a reason cc-option and friends use -S instead of -c?

	-hpa
--

From: H. Peter Anvin
Date: Monday, September 8, 2008 - 2:43 pm

Does this patch fix that for you?

	-hpa
From: David Sanders
Date: Monday, September 8, 2008 - 3:16 pm

Yes, thanks.
--

From: Ingo Molnar
Date: Monday, September 8, 2008 - 11:05 pm

it fixes build errors in my test setup too.

	Ingo
--

From: Ingo Molnar
Date: Tuesday, September 9, 2008 - 12:19 am

Sam, i've applied Peter's fix (see the commit below) - do you have any 
objections to us carrying this in x86/urgent? It's needed for the gcc 
fix/workaround.

	Ingo

--------------->
From 095fbc7296ccfe41688e8ef136587b23f0e8c123 Mon Sep 17 00:00:00 2001
From: H. Peter Anvin <hpa@zytor.com>
Date: Mon, 8 Sep 2008 14:43:11 -0700
Subject: [PATCH] kbuild: fix cc-option and cc-option-yn


Use -c instead of -S in cc-option and cc-option-yn, so we can probe
options related to the assembler.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: kbuild devel <kbuild-devel@lists.sourceforge.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 scripts/Kbuild.include |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index d64e6ba..982dcae 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -105,12 +105,12 @@ as-instr = $(call try-run,\
 # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
 
 cc-option = $(call try-run,\
-	$(CC) $(KBUILD_CFLAGS) $(1) -S -xc /dev/null -o "$$TMP",$(1),$(2))
+	$(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
 
 # cc-option-yn
 # Usage: flag := $(call cc-option-yn,-march=winchip-c6)
 cc-option-yn = $(call try-run,\
-	$(CC) $(KBUILD_CFLAGS) $(1) -S -xc /dev/null -o "$$TMP",y,n)
+	$(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)
 
 # cc-option-align
 # Prefix align with either -falign or -malign
--

From: David Sanders
Date: Tuesday, September 9, 2008 - 12:18 pm

I haven't seen this come across the wire in Linus's 2.6.27 tree.  We're still 
going to do this right?
David
--

From: Linus Torvalds
Date: Tuesday, September 9, 2008 - 12:56 pm

Latest version is out there now (leaving the gas-error-proofing for 
later),

		Linus
--

From: David Sanders
Date: Tuesday, September 9, 2008 - 1:37 pm

The Kconfig.cpu change wasn't in my git pull.
David
--

From: Linus Torvalds
Date: Tuesday, September 9, 2008 - 1:45 pm

It's commit 14469a8dd23677921db5e7354a602c98d9c6300f.

Maybe it hadn't finished mirroring out?

		Linus
--

From: Linus Torvalds
Date: Tuesday, September 9, 2008 - 1:46 pm

oops. Or maybe I had forgotten to push it out.

		Linus "_now_ I did" Torvalds
--

From: Ingo Molnar
Date: Tuesday, September 9, 2008 - 1:49 pm

that did the trick - commit 14469a8 is visible now here :)

	Ingo
--

From: David Sanders
Date: Tuesday, September 9, 2008 - 1:53 pm

I see it now thanks.
David
--

Previous thread: Re: 2.6.27-rc5 OLTP performance regression by Peter Zijlstra on Monday, September 8, 2008 - 11:00 am. (7 messages)

Next thread: [git patches] libata fixes, new ids by Jeff Garzik on Monday, September 8, 2008 - 12:50 pm. (1 message)