diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-09 23:57:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-09 23:57:58 -0500 |
commit | d80b34c9163aaeb546dd083f896d948edd585932 (patch) | |
tree | 15ca312d299df78e82fc573bd5e900691f444c97 /arch | |
parent | aa9291355e19f804570466756ed7d874cd2e99ff (diff) | |
parent | 0e63ea48b4d8035dd0e91a3fa6fb79458b47adfb (diff) |
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Will Deacon:
"Here is a handful of minor arm64 fixes discovered and fixed over the
Christmas break. The main part is adding some missing #includes that
we seem to be getting transitively but have started causing problems
in -next.
- Fix early mapping fixmap corruption by EFI runtime services
- Fix __NR_compat_syscalls off-by-one
- Add missing sanity checks for some 32-bit registers
- Add some missing #includes which we get transitively
- Remove unused prepare_to_copy() macro"
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64/efi: add missing call to early_ioremap_reset()
arm64: fix missing asm/io.h include in kernel/smp_spin_table.c
arm64: fix missing asm/alternative.h include in kernel/module.c
arm64: fix missing linux/bug.h include in asm/arch_timer.h
arm64: fix missing asm/pgtable-hwdef.h include in asm/processor.h
arm64: sanity checks: add missing AArch32 registers
arm64: Remove unused prepare_to_copy()
arm64: Correct __NR_compat_syscalls for bpf
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/include/asm/arch_timer.h | 1 | ||||
-rw-r--r-- | arch/arm64/include/asm/cpu.h | 5 | ||||
-rw-r--r-- | arch/arm64/include/asm/processor.h | 4 | ||||
-rw-r--r-- | arch/arm64/include/asm/unistd.h | 2 | ||||
-rw-r--r-- | arch/arm64/kernel/cpuinfo.c | 10 | ||||
-rw-r--r-- | arch/arm64/kernel/efi.c | 2 | ||||
-rw-r--r-- | arch/arm64/kernel/module.c | 1 | ||||
-rw-r--r-- | arch/arm64/kernel/setup.c | 1 | ||||
-rw-r--r-- | arch/arm64/kernel/smp_spin_table.c | 1 |
9 files changed, 22 insertions, 5 deletions
diff --git a/arch/arm64/include/asm/arch_timer.h b/arch/arm64/include/asm/arch_timer.h index b1fa4e614718..fbe0ca31a99c 100644 --- a/arch/arm64/include/asm/arch_timer.h +++ b/arch/arm64/include/asm/arch_timer.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <asm/barrier.h> | 22 | #include <asm/barrier.h> |
23 | 23 | ||
24 | #include <linux/bug.h> | ||
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
25 | #include <linux/types.h> | 26 | #include <linux/types.h> |
26 | 27 | ||
diff --git a/arch/arm64/include/asm/cpu.h b/arch/arm64/include/asm/cpu.h index ace70682499b..8e797b2fcc01 100644 --- a/arch/arm64/include/asm/cpu.h +++ b/arch/arm64/include/asm/cpu.h | |||
@@ -39,6 +39,7 @@ struct cpuinfo_arm64 { | |||
39 | u64 reg_id_aa64pfr0; | 39 | u64 reg_id_aa64pfr0; |
40 | u64 reg_id_aa64pfr1; | 40 | u64 reg_id_aa64pfr1; |
41 | 41 | ||
42 | u32 reg_id_dfr0; | ||
42 | u32 reg_id_isar0; | 43 | u32 reg_id_isar0; |
43 | u32 reg_id_isar1; | 44 | u32 reg_id_isar1; |
44 | u32 reg_id_isar2; | 45 | u32 reg_id_isar2; |
@@ -51,6 +52,10 @@ struct cpuinfo_arm64 { | |||
51 | u32 reg_id_mmfr3; | 52 | u32 reg_id_mmfr3; |
52 | u32 reg_id_pfr0; | 53 | u32 reg_id_pfr0; |
53 | u32 reg_id_pfr1; | 54 | u32 reg_id_pfr1; |
55 | |||
56 | u32 reg_mvfr0; | ||
57 | u32 reg_mvfr1; | ||
58 | u32 reg_mvfr2; | ||
54 | }; | 59 | }; |
55 | 60 | ||
56 | DECLARE_PER_CPU(struct cpuinfo_arm64, cpu_data); | 61 | DECLARE_PER_CPU(struct cpuinfo_arm64, cpu_data); |
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 286b1bec547c..f9be30ea1cbd 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h | |||
@@ -31,6 +31,7 @@ | |||
31 | 31 | ||
32 | #include <asm/fpsimd.h> | 32 | #include <asm/fpsimd.h> |
33 | #include <asm/hw_breakpoint.h> | 33 | #include <asm/hw_breakpoint.h> |
34 | #include <asm/pgtable-hwdef.h> | ||
34 | #include <asm/ptrace.h> | 35 | #include <asm/ptrace.h> |
35 | #include <asm/types.h> | 36 | #include <asm/types.h> |
36 | 37 | ||
@@ -123,9 +124,6 @@ struct task_struct; | |||
123 | /* Free all resources held by a thread. */ | 124 | /* Free all resources held by a thread. */ |
124 | extern void release_thread(struct task_struct *); | 125 | extern void release_thread(struct task_struct *); |
125 | 126 | ||
126 | /* Prepare to copy thread state - unlazy all lazy status */ | ||
127 | #define prepare_to_copy(tsk) do { } while (0) | ||
128 | |||
129 | unsigned long get_wchan(struct task_struct *p); | 127 | unsigned long get_wchan(struct task_struct *p); |
130 | 128 | ||
131 | #define cpu_relax() barrier() | 129 | #define cpu_relax() barrier() |
diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h index 49c9aefd24a5..b780c6c76eec 100644 --- a/arch/arm64/include/asm/unistd.h +++ b/arch/arm64/include/asm/unistd.h | |||
@@ -44,7 +44,7 @@ | |||
44 | #define __ARM_NR_compat_cacheflush (__ARM_NR_COMPAT_BASE+2) | 44 | #define __ARM_NR_compat_cacheflush (__ARM_NR_COMPAT_BASE+2) |
45 | #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE+5) | 45 | #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE+5) |
46 | 46 | ||
47 | #define __NR_compat_syscalls 386 | 47 | #define __NR_compat_syscalls 387 |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #define __ARCH_WANT_SYS_CLONE | 50 | #define __ARCH_WANT_SYS_CLONE |
diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c index 57b641747534..07d435cf2eea 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c | |||
@@ -147,6 +147,7 @@ static void cpuinfo_sanity_check(struct cpuinfo_arm64 *cur) | |||
147 | * If we have AArch32, we care about 32-bit features for compat. These | 147 | * If we have AArch32, we care about 32-bit features for compat. These |
148 | * registers should be RES0 otherwise. | 148 | * registers should be RES0 otherwise. |
149 | */ | 149 | */ |
150 | diff |= CHECK(id_dfr0, boot, cur, cpu); | ||
150 | diff |= CHECK(id_isar0, boot, cur, cpu); | 151 | diff |= CHECK(id_isar0, boot, cur, cpu); |
151 | diff |= CHECK(id_isar1, boot, cur, cpu); | 152 | diff |= CHECK(id_isar1, boot, cur, cpu); |
152 | diff |= CHECK(id_isar2, boot, cur, cpu); | 153 | diff |= CHECK(id_isar2, boot, cur, cpu); |
@@ -165,6 +166,10 @@ static void cpuinfo_sanity_check(struct cpuinfo_arm64 *cur) | |||
165 | diff |= CHECK(id_pfr0, boot, cur, cpu); | 166 | diff |= CHECK(id_pfr0, boot, cur, cpu); |
166 | diff |= CHECK(id_pfr1, boot, cur, cpu); | 167 | diff |= CHECK(id_pfr1, boot, cur, cpu); |
167 | 168 | ||
169 | diff |= CHECK(mvfr0, boot, cur, cpu); | ||
170 | diff |= CHECK(mvfr1, boot, cur, cpu); | ||
171 | diff |= CHECK(mvfr2, boot, cur, cpu); | ||
172 | |||
168 | /* | 173 | /* |
169 | * Mismatched CPU features are a recipe for disaster. Don't even | 174 | * Mismatched CPU features are a recipe for disaster. Don't even |
170 | * pretend to support them. | 175 | * pretend to support them. |
@@ -189,6 +194,7 @@ static void __cpuinfo_store_cpu(struct cpuinfo_arm64 *info) | |||
189 | info->reg_id_aa64pfr0 = read_cpuid(ID_AA64PFR0_EL1); | 194 | info->reg_id_aa64pfr0 = read_cpuid(ID_AA64PFR0_EL1); |
190 | info->reg_id_aa64pfr1 = read_cpuid(ID_AA64PFR1_EL1); | 195 | info->reg_id_aa64pfr1 = read_cpuid(ID_AA64PFR1_EL1); |
191 | 196 | ||
197 | info->reg_id_dfr0 = read_cpuid(ID_DFR0_EL1); | ||
192 | info->reg_id_isar0 = read_cpuid(ID_ISAR0_EL1); | 198 | info->reg_id_isar0 = read_cpuid(ID_ISAR0_EL1); |
193 | info->reg_id_isar1 = read_cpuid(ID_ISAR1_EL1); | 199 | info->reg_id_isar1 = read_cpuid(ID_ISAR1_EL1); |
194 | info->reg_id_isar2 = read_cpuid(ID_ISAR2_EL1); | 200 | info->reg_id_isar2 = read_cpuid(ID_ISAR2_EL1); |
@@ -202,6 +208,10 @@ static void __cpuinfo_store_cpu(struct cpuinfo_arm64 *info) | |||
202 | info->reg_id_pfr0 = read_cpuid(ID_PFR0_EL1); | 208 | info->reg_id_pfr0 = read_cpuid(ID_PFR0_EL1); |
203 | info->reg_id_pfr1 = read_cpuid(ID_PFR1_EL1); | 209 | info->reg_id_pfr1 = read_cpuid(ID_PFR1_EL1); |
204 | 210 | ||
211 | info->reg_mvfr0 = read_cpuid(MVFR0_EL1); | ||
212 | info->reg_mvfr1 = read_cpuid(MVFR1_EL1); | ||
213 | info->reg_mvfr2 = read_cpuid(MVFR2_EL1); | ||
214 | |||
205 | cpuinfo_detect_icache_policy(info); | 215 | cpuinfo_detect_icache_policy(info); |
206 | 216 | ||
207 | check_local_cpu_errata(); | 217 | check_local_cpu_errata(); |
diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index 6fac253bc783..2bb4347d0edf 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c | |||
@@ -326,6 +326,7 @@ void __init efi_idmap_init(void) | |||
326 | 326 | ||
327 | /* boot time idmap_pg_dir is incomplete, so fill in missing parts */ | 327 | /* boot time idmap_pg_dir is incomplete, so fill in missing parts */ |
328 | efi_setup_idmap(); | 328 | efi_setup_idmap(); |
329 | early_memunmap(memmap.map, memmap.map_end - memmap.map); | ||
329 | } | 330 | } |
330 | 331 | ||
331 | static int __init remap_region(efi_memory_desc_t *md, void **new) | 332 | static int __init remap_region(efi_memory_desc_t *md, void **new) |
@@ -380,7 +381,6 @@ static int __init arm64_enter_virtual_mode(void) | |||
380 | } | 381 | } |
381 | 382 | ||
382 | mapsize = memmap.map_end - memmap.map; | 383 | mapsize = memmap.map_end - memmap.map; |
383 | early_memunmap(memmap.map, mapsize); | ||
384 | 384 | ||
385 | if (efi_runtime_disabled()) { | 385 | if (efi_runtime_disabled()) { |
386 | pr_info("EFI runtime services will be disabled.\n"); | 386 | pr_info("EFI runtime services will be disabled.\n"); |
diff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c index fd027b101de5..9b6f71db2709 100644 --- a/arch/arm64/kernel/module.c +++ b/arch/arm64/kernel/module.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
26 | #include <linux/moduleloader.h> | 26 | #include <linux/moduleloader.h> |
27 | #include <linux/vmalloc.h> | 27 | #include <linux/vmalloc.h> |
28 | #include <asm/alternative.h> | ||
28 | #include <asm/insn.h> | 29 | #include <asm/insn.h> |
29 | #include <asm/sections.h> | 30 | #include <asm/sections.h> |
30 | 31 | ||
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index b80991166754..20fe2932ad0c 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c | |||
@@ -402,6 +402,7 @@ void __init setup_arch(char **cmdline_p) | |||
402 | request_standard_resources(); | 402 | request_standard_resources(); |
403 | 403 | ||
404 | efi_idmap_init(); | 404 | efi_idmap_init(); |
405 | early_ioremap_reset(); | ||
405 | 406 | ||
406 | unflatten_device_tree(); | 407 | unflatten_device_tree(); |
407 | 408 | ||
diff --git a/arch/arm64/kernel/smp_spin_table.c b/arch/arm64/kernel/smp_spin_table.c index 4f93c67e63de..14944e5b28da 100644 --- a/arch/arm64/kernel/smp_spin_table.c +++ b/arch/arm64/kernel/smp_spin_table.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <asm/cacheflush.h> | 25 | #include <asm/cacheflush.h> |
26 | #include <asm/cpu_ops.h> | 26 | #include <asm/cpu_ops.h> |
27 | #include <asm/cputype.h> | 27 | #include <asm/cputype.h> |
28 | #include <asm/io.h> | ||
28 | #include <asm/smp_plat.h> | 29 | #include <asm/smp_plat.h> |
29 | 30 | ||
30 | extern void secondary_holding_pen(void); | 31 | extern void secondary_holding_pen(void); |