Commit 8c6531f7 authored by Andreas Herrmann's avatar Andreas Herrmann Committed by Linus Torvalds

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

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

    $ uname -m

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 <>
Cc: Ingo Molnar <>
Cc: "H. Peter Anvin" <>
Acked-by: default avatarSam Ravnborg <>
Signed-off-by: default avatarAndreas Herrmann <>
Signed-off-by: default avatarLinus Torvalds <>
parent 2ffbb837
......@@ -11,10 +11,9 @@ endif
$(srctree)/arch/x86/Makefile%: ;
ifeq ($(CONFIG_X86_32),y)
include $(srctree)/arch/x86/Makefile_32
UTS_MACHINE := x86_64
include $(srctree)/arch/x86/Makefile_64
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment