arm64: setup: report ELF_PLATFORM as the machine for utsname
authorWill Deacon <will.deacon@arm.com>
Fri, 11 Oct 2013 13:52:11 +0000 (14:52 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 25 Oct 2013 14:59:34 +0000 (15:59 +0100)
uname -m reports the machine field from the current utsname, which should
reflect the endianness of the system.

This patch reports ELF_PLATFORM for the field, so that everything appears
consistent from userspace.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/setup.c

index b65c132fac3013f456e26c08db76856e57e2f319..fa6faf564da2c4fc29e97c8f951bed7ded8d096d 100644 (file)
@@ -119,7 +119,7 @@ static void __init setup_processor(void)
        printk("CPU: %s [%08x] revision %d\n",
               cpu_name, read_cpuid_id(), read_cpuid_id() & 15);
 
-       sprintf(init_utsname()->machine, "aarch64");
+       sprintf(init_utsname()->machine, ELF_PLATFORM);
        elf_hwcap = 0;
 }