x86: correctly set UTS_MACHINE for "make ARCH=x86"

2007-11-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=43517854da512ae7daf15e7044e040edb15b8b23
Commit: 43517854da512ae7daf15e7044e040edb15b8b23
Parent: 000f4a9e718a665fd706500199a3f0c11fea30c1
Author: Andreas Herrmann <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 26 20:42:19 2007 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Mon Nov 26 20:42:19 2007 +0100

x86: correctly set UTS_MACHINE for "make ARCH=x86"
    
    x86: correctly set UTS_MACHINE for "make ARCH=x86"

For a kernel built with "make ARCH=x86" the following system
information is displayed when running the new kernel

$ uname -m
x86

On some i386 systems (e.g. K7) we even have the following information

$ uname -m
x66

This is weird. The usual information for "uname -m" should be "x86_64"
on 64-bit and "i386" or "i686" on 32-bit.

This patch fixes the issue by setting UTS_MACHINE to "i386" for 32-bit
kernel builds and to "x86_64" for 64-bit kernel builds. I.e., "x86"
won't be used for UTS_MACHINE anymore.

Acked-by: Sam Ravnborg <[EMAIL PROTECTED]>
Signed-off-by: Andreas Herrmann <[EMAIL PROTECTED]>
Cc: "H. Peter Anvin" <[EMAIL PROTECTED]>
Cc: Roman Zippel <[EMAIL PROTECTED]>
Cc: Andrew Morton <[EMAIL PROTECTED]>
Cc: Sam Ravnborg <[EMAIL PROTECTED]>
Cc: Linus Torvalds <[EMAIL PROTECTED]>
Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 arch/x86/Makefile |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 116b03a..7aa1dc6 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -11,10 +11,9 @@ endif
 $(srctree)/arch/x86/Makefile%: ;
 
 ifeq ($(CONFIG_X86_32),y)
+UTS_MACHINE := i386
 include $(srctree)/arch/x86/Makefile_32
 else
+UTS_MACHINE := x86_64
 include $(srctree)/arch/x86/Makefile_64
 endif
-
-
-
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


x86: correctly set UTS_MACHINE for "make ARCH=x86"

2007-11-26 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8c6531f7a99f29ba8817ffb12cc9ecf190049bd6
Commit: 8c6531f7a99f29ba8817ffb12cc9ecf190049bd6
Parent: 2ffbb8377c7a0713baf6644e285adc27a5654582
Author: Andreas Herrmann <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 19 23:58:57 2007 +0100
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Nov 26 17:38:53 2007 -0800

x86: correctly set UTS_MACHINE for "make ARCH=x86"

For a kernel built with "make ARCH=x86" the following system
information is displayed when running the new kernel

$ uname -m
x86

On some i386 systems (e.g. K7) we even have the following information

$ uname -m
x66

This is weird. The usual information for "uname -m" should be "x86_64"
on 64-bit and "i386" or "i686" on 32-bit.

This patch fixes the issue by setting UTS_MACHINE to "i386" for 32-bit
kernel builds and to "x86_64" for 64-bit kernel builds. I.e., "x86"
won't be used for UTS_MACHINE anymore.

Cc: Thomas Gleixner <[EMAIL PROTECTED]>
Cc: Ingo Molnar <[EMAIL PROTECTED]>
Cc: "H. Peter Anvin" <[EMAIL PROTECTED]>
Acked-by: Sam Ravnborg <[EMAIL PROTECTED]>
Signed-off-by: Andreas Herrmann <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/x86/Makefile |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 116b03a..7aa1dc6 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -11,10 +11,9 @@ endif
 $(srctree)/arch/x86/Makefile%: ;
 
 ifeq ($(CONFIG_X86_32),y)
+UTS_MACHINE := i386
 include $(srctree)/arch/x86/Makefile_32
 else
+UTS_MACHINE := x86_64
 include $(srctree)/arch/x86/Makefile_64
 endif
-
-
-
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html