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)
committerVictor Kamensky <victor.kamensky@linaro.org>
Fri, 14 Mar 2014 01:26:30 +0000 (18:26 -0700)
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>
(cherry picked from commit 94ed1f2cb5d46533f10262b1b760db7dbec9cf10)

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
arch/arm64/kernel/setup.c

index 85afdae9cc057551e2baabd29d0baab8c37691c1..31e1160bce309edcd52bcb1511b67038c920e991 100644 (file)
@@ -124,7 +124,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;
 }