aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/include/asm/cputype.h4
-rw-r--r--arch/arm64/kernel/head.S4
2 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h
index 3780b2e7f88f..cf2749488cd4 100644
--- a/arch/arm64/include/asm/cputype.h
+++ b/arch/arm64/include/asm/cputype.h
@@ -42,6 +42,8 @@
42#define ARM_CPU_PART_FOUNDATION 0xD000 42#define ARM_CPU_PART_FOUNDATION 0xD000
43#define ARM_CPU_PART_CORTEX_A57 0xD070 43#define ARM_CPU_PART_CORTEX_A57 0xD070
44 44
45#ifndef __ASSEMBLY__
46
45/* 47/*
46 * The CPU ID never changes at run time, so we might as well tell the 48 * The CPU ID never changes at run time, so we might as well tell the
47 * compiler that it's constant. Use this function to read the CPU ID 49 * compiler that it's constant. Use this function to read the CPU ID
@@ -72,4 +74,6 @@ static inline u32 __attribute_const__ read_cpuid_cachetype(void)
72 return read_cpuid(ID_CTR_EL0); 74 return read_cpuid(ID_CTR_EL0);
73} 75}
74 76
77#endif /* __ASSEMBLY__ */
78
75#endif 79#endif
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index 0a0a49756826..53dcae49e729 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -26,6 +26,7 @@
26#include <asm/assembler.h> 26#include <asm/assembler.h>
27#include <asm/ptrace.h> 27#include <asm/ptrace.h>
28#include <asm/asm-offsets.h> 28#include <asm/asm-offsets.h>
29#include <asm/cputype.h>
29#include <asm/memory.h> 30#include <asm/memory.h>
30#include <asm/thread_info.h> 31#include <asm/thread_info.h>
31#include <asm/pgtable-hwdef.h> 32#include <asm/pgtable-hwdef.h>
@@ -229,7 +230,8 @@ ENTRY(secondary_holding_pen)
229 bl __calc_phys_offset // x24=phys offset 230 bl __calc_phys_offset // x24=phys offset
230 bl el2_setup // Drop to EL1 231 bl el2_setup // Drop to EL1
231 mrs x0, mpidr_el1 232 mrs x0, mpidr_el1
232 and x0, x0, #15 // CPU number 233 ldr x1, =MPIDR_HWID_BITMASK
234 and x0, x0, x1
233 adr x1, 1b 235 adr x1, 1b
234 ldp x2, x3, [x1] 236 ldp x2, x3, [x1]
235 sub x1, x1, x2 237 sub x1, x1, x2