diff options
author | Michal Marek <mmarek@suse.com> | 2016-08-30 04:31:35 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-08-31 07:31:38 -0400 |
commit | cfa88c79462d15098db29edebe623428c3620a4b (patch) | |
tree | 3ff1ea9ec224278f8e0548f54de14a6d3cd84372 | |
parent | 6ffe9923f2350c19b95a2c9ebf1b4f5f275986f2 (diff) |
arm64: Set UTS_MACHINE in the Makefile
The make rpm target depends on proper UTS_MACHINE definition. Also, use
the variable in arch/arm64/kernel/setup.c, so that it's not accidentally
removed in the future.
Reported-and-tested-by: Fabian Vogt <fvogt@suse.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | arch/arm64/Makefile | 2 | ||||
-rw-r--r-- | arch/arm64/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/arm64/kernel/setup.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 0b53c752f23f..ab51aed6b6c1 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile | |||
@@ -46,10 +46,12 @@ ifeq ($(CONFIG_CPU_BIG_ENDIAN), y) | |||
46 | KBUILD_CPPFLAGS += -mbig-endian | 46 | KBUILD_CPPFLAGS += -mbig-endian |
47 | AS += -EB | 47 | AS += -EB |
48 | LD += -EB | 48 | LD += -EB |
49 | UTS_MACHINE := aarch64_be | ||
49 | else | 50 | else |
50 | KBUILD_CPPFLAGS += -mlittle-endian | 51 | KBUILD_CPPFLAGS += -mlittle-endian |
51 | AS += -EL | 52 | AS += -EL |
52 | LD += -EL | 53 | LD += -EL |
54 | UTS_MACHINE := aarch64 | ||
53 | endif | 55 | endif |
54 | 56 | ||
55 | CHECKFLAGS += -D__aarch64__ | 57 | CHECKFLAGS += -D__aarch64__ |
diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index 14f7b651c787..7d66bbaafc0c 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile | |||
@@ -10,6 +10,8 @@ CFLAGS_REMOVE_ftrace.o = -pg | |||
10 | CFLAGS_REMOVE_insn.o = -pg | 10 | CFLAGS_REMOVE_insn.o = -pg |
11 | CFLAGS_REMOVE_return_address.o = -pg | 11 | CFLAGS_REMOVE_return_address.o = -pg |
12 | 12 | ||
13 | CFLAGS_setup.o = -DUTS_MACHINE='"$(UTS_MACHINE)"' | ||
14 | |||
13 | # Object file lists. | 15 | # Object file lists. |
14 | arm64-obj-y := debug-monitors.o entry.o irq.o fpsimd.o \ | 16 | arm64-obj-y := debug-monitors.o entry.o irq.o fpsimd.o \ |
15 | entry-fpsimd.o process.o ptrace.o setup.o signal.o \ | 17 | entry-fpsimd.o process.o ptrace.o setup.o signal.o \ |
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 514b4e3ba029..f534f492a268 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c | |||
@@ -233,7 +233,7 @@ void __init setup_arch(char **cmdline_p) | |||
233 | { | 233 | { |
234 | pr_info("Boot CPU: AArch64 Processor [%08x]\n", read_cpuid_id()); | 234 | pr_info("Boot CPU: AArch64 Processor [%08x]\n", read_cpuid_id()); |
235 | 235 | ||
236 | sprintf(init_utsname()->machine, ELF_PLATFORM); | 236 | sprintf(init_utsname()->machine, UTS_MACHINE); |
237 | init_mm.start_code = (unsigned long) _text; | 237 | init_mm.start_code = (unsigned long) _text; |
238 | init_mm.end_code = (unsigned long) _etext; | 238 | init_mm.end_code = (unsigned long) _etext; |
239 | init_mm.end_data = (unsigned long) _edata; | 239 | init_mm.end_data = (unsigned long) _edata; |