Re: [git pull] x86 fixes

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

Next thread: [git patches] libata fixes, new ids by Jeff Garzik on Monday, September 8, 2008 - 3:50 pm. (1 message)
To: Linus Torvalds <torvalds@...>
Cc: Andrew Morton <akpm@...>, x86 maintainers <x86@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Monday, September 8, 2008 - 3: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
+++ b/arch/x86/Makefil...

To: H. Peter Anvin <hpa@...>
Cc: <linux-kernel@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, x86 maintainers <x86@...>
Date: Tuesday, September 9, 2008 - 3: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
--

To: David Sanders <linux@...>
Cc: H. Peter Anvin <hpa@...>, <linux-kernel@...>, Andrew Morton <akpm@...>, x86 maintainers <x86@...>
Date: Tuesday, September 9, 2008 - 3:56 pm

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

Linus
--

To: <linux-kernel@...>
Cc: Linus Torvalds <torvalds@...>, H. Peter Anvin <hpa@...>, Andrew Morton <akpm@...>, x86 maintainers <x86@...>
Date: Tuesday, September 9, 2008 - 4:37 pm

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

To: David Sanders <linux@...>
Cc: <linux-kernel@...>, H. Peter Anvin <hpa@...>, Andrew Morton <akpm@...>, x86 maintainers <x86@...>
Date: Tuesday, September 9, 2008 - 4:45 pm

It's commit 14469a8dd23677921db5e7354a602c98d9c6300f.

Maybe it hadn't finished mirroring out?

Linus
--

To: David Sanders <linux@...>
Cc: <linux-kernel@...>, H. Peter Anvin <hpa@...>, Andrew Morton <akpm@...>, x86 maintainers <x86@...>
Date: Tuesday, September 9, 2008 - 4:46 pm

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

Linus "_now_ I did" Torvalds
--

To: <linux-kernel@...>
Cc: Linus Torvalds <torvalds@...>, H. Peter Anvin <hpa@...>, Andrew Morton <akpm@...>, x86 maintainers <x86@...>
Date: Tuesday, September 9, 2008 - 4:53 pm

I see it now thanks.
David
--

To: Linus Torvalds <torvalds@...>
Cc: David Sanders <linux@...>, <linux-kernel@...>, H. Peter Anvin <hpa@...>, Andrew Morton <akpm@...>, x86 maintainers <x86@...>
Date: Tuesday, September 9, 2008 - 4:49 pm

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

Ingo
--

To: <linux-kernel@...>
Cc: H. Peter Anvin <hpa@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, x86 maintainers <x86@...>
Date: Monday, September 8, 2008 - 4:34 pm

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

To: <linux@...>
Cc: <linux-kernel@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, x86 maintainers <x86@...>, Sam Ravnborg <sam@...>, kbuild devel <kbuild-devel@...>
Date: Monday, September 8, 2008 - 5:43 pm

Does this patch fix that for you?

-hpa

To: <linux-kernel@...>, H. Peter Anvin <hpa@...>
Cc: Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, x86 maintainers <x86@...>, Sam Ravnborg <sam@...>, kbuild devel <kbuild-devel@...>
Date: Monday, September 8, 2008 - 6:16 pm

Yes, thanks.
--

To: David Sanders <linux@...>
Cc: <linux-kernel@...>, H. Peter Anvin <hpa@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, x86 maintainers <x86@...>, Sam Ravnborg <sam@...>, kbuild devel <kbuild-devel@...>
Date: Tuesday, September 9, 2008 - 2:05 am

it fixes build errors in my test setup too.

Ingo
--

To: David Sanders <linux@...>, Sam Ravnborg <sam@...>
Cc: <linux-kernel@...>, H. Peter Anvin <hpa@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, x86 maintainers <x86@...>, Sam Ravnborg <sam@...>, kbuild devel <kbuild-devel@...>
Date: Tuesday, September 9, 2008 - 3: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
--

To: <linux@...>
Cc: <linux-kernel@...>, Linus Torvalds <torvalds@...>, Andrew Morton <akpm@...>, x86 maintainers <x86@...>
Date: Monday, September 8, 2008 - 5: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
--

To: Sam Ravnborg <sam@...>, linux-kbuild <linux-kbuild@...>
Cc: <linux@...>, <linux-kernel@...>, x86 maintainers <x86@...>
Date: Monday, September 8, 2008 - 5:22 pm

Sam:

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

-hpa
--

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

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