diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-26 14:50:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-26 14:50:39 -0400 |
commit | e3ff91143eb2a6eaaab4831c85a2837a95fbbea3 (patch) | |
tree | 5975c762d747e5c4d765a8a69de1c57fb58a14c1 /arch | |
parent | de6e1317f746fbc527a73976c58b4119e506ff7c (diff) | |
parent | 3e0a07f8c401bb43e0f964c5f1285b2cb2028645 (diff) |
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
"Another round of ARM fixes. Largest one is the second half of the
PJ4B fix which was pushed in the previous -rc - this one was delayed
because its original caused a build regression while trying to fix a
regression!
As ever, noMMU gets forgotten when fixing problems on MMU, so we have
a noMMU fix for a previous fix included in this set.
A couple of fixes from Lorenzo for problems with the ARM DT CPU code,
and a one liner to remove the buggy 'wait for interrupt' with FA526
cores"
* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
ARM: 7773/1: PJ4B: Add support for errata 4742
ARM: 7772/1: Fix missing flush_kernel_dcache_page() for noMMU
ARM: 7763/1: kernel: fix __cpu_logical_map default initialization
ARM: 7762/1: kernel: fix arm_dt_init_cpu_maps() to skip non-cpu nodes
ARM: 7760/1: cpu_fa526_do_idle: remove WFI
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Kconfig | 14 | ||||
-rw-r--r-- | arch/arm/include/asm/cputype.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/glue-proc.h | 9 | ||||
-rw-r--r-- | arch/arm/include/asm/smp_plat.h | 2 | ||||
-rw-r--r-- | arch/arm/kernel/devtree.c | 5 | ||||
-rw-r--r-- | arch/arm/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/arm/mm/nommu.c | 6 | ||||
-rw-r--r-- | arch/arm/mm/proc-fa526.S | 1 | ||||
-rw-r--r-- | arch/arm/mm/proc-macros.S | 5 | ||||
-rw-r--r-- | arch/arm/mm/proc-v7.S | 34 |
10 files changed, 73 insertions, 7 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2651b1da1c56..136f263ed47b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1087,6 +1087,20 @@ if !MMU | |||
1087 | source "arch/arm/Kconfig-nommu" | 1087 | source "arch/arm/Kconfig-nommu" |
1088 | endif | 1088 | endif |
1089 | 1089 | ||
1090 | config PJ4B_ERRATA_4742 | ||
1091 | bool "PJ4B Errata 4742: IDLE Wake Up Commands can Cause the CPU Core to Cease Operation" | ||
1092 | depends on CPU_PJ4B && MACH_ARMADA_370 | ||
1093 | default y | ||
1094 | help | ||
1095 | When coming out of either a Wait for Interrupt (WFI) or a Wait for | ||
1096 | Event (WFE) IDLE states, a specific timing sensitivity exists between | ||
1097 | the retiring WFI/WFE instructions and the newly issued subsequent | ||
1098 | instructions. This sensitivity can result in a CPU hang scenario. | ||
1099 | Workaround: | ||
1100 | The software must insert either a Data Synchronization Barrier (DSB) | ||
1101 | or Data Memory Barrier (DMB) command immediately after the WFI/WFE | ||
1102 | instruction | ||
1103 | |||
1090 | config ARM_ERRATA_326103 | 1104 | config ARM_ERRATA_326103 |
1091 | bool "ARM errata: FSR write bit incorrect on a SWP to read-only memory" | 1105 | bool "ARM errata: FSR write bit incorrect on a SWP to read-only memory" |
1092 | depends on CPU_V6 | 1106 | depends on CPU_V6 |
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index 7652712d1d14..dba62cb1ad08 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h | |||
@@ -32,6 +32,8 @@ | |||
32 | 32 | ||
33 | #define MPIDR_HWID_BITMASK 0xFFFFFF | 33 | #define MPIDR_HWID_BITMASK 0xFFFFFF |
34 | 34 | ||
35 | #define MPIDR_INVALID (~MPIDR_HWID_BITMASK) | ||
36 | |||
35 | #define MPIDR_LEVEL_BITS 8 | 37 | #define MPIDR_LEVEL_BITS 8 |
36 | #define MPIDR_LEVEL_MASK ((1 << MPIDR_LEVEL_BITS) - 1) | 38 | #define MPIDR_LEVEL_MASK ((1 << MPIDR_LEVEL_BITS) - 1) |
37 | 39 | ||
diff --git a/arch/arm/include/asm/glue-proc.h b/arch/arm/include/asm/glue-proc.h index ac1dd54724b6..8017e94acc5e 100644 --- a/arch/arm/include/asm/glue-proc.h +++ b/arch/arm/include/asm/glue-proc.h | |||
@@ -230,6 +230,15 @@ | |||
230 | # endif | 230 | # endif |
231 | #endif | 231 | #endif |
232 | 232 | ||
233 | #ifdef CONFIG_CPU_PJ4B | ||
234 | # ifdef CPU_NAME | ||
235 | # undef MULTI_CPU | ||
236 | # define MULTI_CPU | ||
237 | # else | ||
238 | # define CPU_NAME cpu_pj4b | ||
239 | # endif | ||
240 | #endif | ||
241 | |||
233 | #ifndef MULTI_CPU | 242 | #ifndef MULTI_CPU |
234 | #define cpu_proc_init __glue(CPU_NAME,_proc_init) | 243 | #define cpu_proc_init __glue(CPU_NAME,_proc_init) |
235 | #define cpu_proc_fin __glue(CPU_NAME,_proc_fin) | 244 | #define cpu_proc_fin __glue(CPU_NAME,_proc_fin) |
diff --git a/arch/arm/include/asm/smp_plat.h b/arch/arm/include/asm/smp_plat.h index aaa61b6f50ff..e78983202737 100644 --- a/arch/arm/include/asm/smp_plat.h +++ b/arch/arm/include/asm/smp_plat.h | |||
@@ -49,7 +49,7 @@ static inline int cache_ops_need_broadcast(void) | |||
49 | /* | 49 | /* |
50 | * Logical CPU mapping. | 50 | * Logical CPU mapping. |
51 | */ | 51 | */ |
52 | extern int __cpu_logical_map[]; | 52 | extern u32 __cpu_logical_map[]; |
53 | #define cpu_logical_map(cpu) __cpu_logical_map[cpu] | 53 | #define cpu_logical_map(cpu) __cpu_logical_map[cpu] |
54 | /* | 54 | /* |
55 | * Retrieve logical cpu index corresponding to a given MPIDR[23:0] | 55 | * Retrieve logical cpu index corresponding to a given MPIDR[23:0] |
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c index 5af04f6daa33..0905502bee15 100644 --- a/arch/arm/kernel/devtree.c +++ b/arch/arm/kernel/devtree.c | |||
@@ -82,7 +82,7 @@ void __init arm_dt_init_cpu_maps(void) | |||
82 | u32 i, j, cpuidx = 1; | 82 | u32 i, j, cpuidx = 1; |
83 | u32 mpidr = is_smp() ? read_cpuid_mpidr() & MPIDR_HWID_BITMASK : 0; | 83 | u32 mpidr = is_smp() ? read_cpuid_mpidr() & MPIDR_HWID_BITMASK : 0; |
84 | 84 | ||
85 | u32 tmp_map[NR_CPUS] = { [0 ... NR_CPUS-1] = UINT_MAX }; | 85 | u32 tmp_map[NR_CPUS] = { [0 ... NR_CPUS-1] = MPIDR_INVALID }; |
86 | bool bootcpu_valid = false; | 86 | bool bootcpu_valid = false; |
87 | cpus = of_find_node_by_path("/cpus"); | 87 | cpus = of_find_node_by_path("/cpus"); |
88 | 88 | ||
@@ -92,6 +92,9 @@ void __init arm_dt_init_cpu_maps(void) | |||
92 | for_each_child_of_node(cpus, cpu) { | 92 | for_each_child_of_node(cpus, cpu) { |
93 | u32 hwid; | 93 | u32 hwid; |
94 | 94 | ||
95 | if (of_node_cmp(cpu->type, "cpu")) | ||
96 | continue; | ||
97 | |||
95 | pr_debug(" * %s...\n", cpu->full_name); | 98 | pr_debug(" * %s...\n", cpu->full_name); |
96 | /* | 99 | /* |
97 | * A device tree containing CPU nodes with missing "reg" | 100 | * A device tree containing CPU nodes with missing "reg" |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 1522c7ae31b0..b4b1d397592b 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -444,7 +444,7 @@ void notrace cpu_init(void) | |||
444 | : "r14"); | 444 | : "r14"); |
445 | } | 445 | } |
446 | 446 | ||
447 | int __cpu_logical_map[NR_CPUS]; | 447 | u32 __cpu_logical_map[NR_CPUS] = { [0 ... NR_CPUS-1] = MPIDR_INVALID }; |
448 | 448 | ||
449 | void __init smp_setup_processor_id(void) | 449 | void __init smp_setup_processor_id(void) |
450 | { | 450 | { |
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index d51225f90ae2..eb5293a69a84 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c | |||
@@ -57,6 +57,12 @@ void flush_dcache_page(struct page *page) | |||
57 | } | 57 | } |
58 | EXPORT_SYMBOL(flush_dcache_page); | 58 | EXPORT_SYMBOL(flush_dcache_page); |
59 | 59 | ||
60 | void flush_kernel_dcache_page(struct page *page) | ||
61 | { | ||
62 | __cpuc_flush_dcache_area(page_address(page), PAGE_SIZE); | ||
63 | } | ||
64 | EXPORT_SYMBOL(flush_kernel_dcache_page); | ||
65 | |||
60 | void copy_to_user_page(struct vm_area_struct *vma, struct page *page, | 66 | void copy_to_user_page(struct vm_area_struct *vma, struct page *page, |
61 | unsigned long uaddr, void *dst, const void *src, | 67 | unsigned long uaddr, void *dst, const void *src, |
62 | unsigned long len) | 68 | unsigned long len) |
diff --git a/arch/arm/mm/proc-fa526.S b/arch/arm/mm/proc-fa526.S index d217e9795d74..aaeb6c127c7a 100644 --- a/arch/arm/mm/proc-fa526.S +++ b/arch/arm/mm/proc-fa526.S | |||
@@ -81,7 +81,6 @@ ENDPROC(cpu_fa526_reset) | |||
81 | */ | 81 | */ |
82 | .align 4 | 82 | .align 4 |
83 | ENTRY(cpu_fa526_do_idle) | 83 | ENTRY(cpu_fa526_do_idle) |
84 | mcr p15, 0, r0, c7, c0, 4 @ Wait for interrupt | ||
85 | mov pc, lr | 84 | mov pc, lr |
86 | 85 | ||
87 | 86 | ||
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index f9a0aa725ea9..e3c48a3fe063 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S | |||
@@ -333,3 +333,8 @@ ENTRY(\name\()_tlb_fns) | |||
333 | .endif | 333 | .endif |
334 | .size \name\()_tlb_fns, . - \name\()_tlb_fns | 334 | .size \name\()_tlb_fns, . - \name\()_tlb_fns |
335 | .endm | 335 | .endm |
336 | |||
337 | .macro globl_equ x, y | ||
338 | .globl \x | ||
339 | .equ \x, \y | ||
340 | .endm | ||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 4c8c9c10a388..e35fec34453e 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -140,6 +140,29 @@ ENTRY(cpu_v7_do_resume) | |||
140 | ENDPROC(cpu_v7_do_resume) | 140 | ENDPROC(cpu_v7_do_resume) |
141 | #endif | 141 | #endif |
142 | 142 | ||
143 | #ifdef CONFIG_CPU_PJ4B | ||
144 | globl_equ cpu_pj4b_switch_mm, cpu_v7_switch_mm | ||
145 | globl_equ cpu_pj4b_set_pte_ext, cpu_v7_set_pte_ext | ||
146 | globl_equ cpu_pj4b_proc_init, cpu_v7_proc_init | ||
147 | globl_equ cpu_pj4b_proc_fin, cpu_v7_proc_fin | ||
148 | globl_equ cpu_pj4b_reset, cpu_v7_reset | ||
149 | #ifdef CONFIG_PJ4B_ERRATA_4742 | ||
150 | ENTRY(cpu_pj4b_do_idle) | ||
151 | dsb @ WFI may enter a low-power mode | ||
152 | wfi | ||
153 | dsb @barrier | ||
154 | mov pc, lr | ||
155 | ENDPROC(cpu_pj4b_do_idle) | ||
156 | #else | ||
157 | globl_equ cpu_pj4b_do_idle, cpu_v7_do_idle | ||
158 | #endif | ||
159 | globl_equ cpu_pj4b_dcache_clean_area, cpu_v7_dcache_clean_area | ||
160 | globl_equ cpu_pj4b_do_suspend, cpu_v7_do_suspend | ||
161 | globl_equ cpu_pj4b_do_resume, cpu_v7_do_resume | ||
162 | globl_equ cpu_pj4b_suspend_size, cpu_v7_suspend_size | ||
163 | |||
164 | #endif | ||
165 | |||
143 | __CPUINIT | 166 | __CPUINIT |
144 | 167 | ||
145 | /* | 168 | /* |
@@ -350,6 +373,9 @@ __v7_setup_stack: | |||
350 | 373 | ||
351 | @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) | 374 | @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) |
352 | define_processor_functions v7, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 | 375 | define_processor_functions v7, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 |
376 | #ifdef CONFIG_CPU_PJ4B | ||
377 | define_processor_functions pj4b, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 | ||
378 | #endif | ||
353 | 379 | ||
354 | .section ".rodata" | 380 | .section ".rodata" |
355 | 381 | ||
@@ -362,7 +388,7 @@ __v7_setup_stack: | |||
362 | /* | 388 | /* |
363 | * Standard v7 proc info content | 389 | * Standard v7 proc info content |
364 | */ | 390 | */ |
365 | .macro __v7_proc initfunc, mm_mmuflags = 0, io_mmuflags = 0, hwcaps = 0 | 391 | .macro __v7_proc initfunc, mm_mmuflags = 0, io_mmuflags = 0, hwcaps = 0, proc_fns = v7_processor_functions |
366 | ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ | 392 | ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ |
367 | PMD_SECT_AF | PMD_FLAGS_SMP | \mm_mmuflags) | 393 | PMD_SECT_AF | PMD_FLAGS_SMP | \mm_mmuflags) |
368 | ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ | 394 | ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ |
@@ -375,7 +401,7 @@ __v7_setup_stack: | |||
375 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_FAST_MULT | \ | 401 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_FAST_MULT | \ |
376 | HWCAP_EDSP | HWCAP_TLS | \hwcaps | 402 | HWCAP_EDSP | HWCAP_TLS | \hwcaps |
377 | .long cpu_v7_name | 403 | .long cpu_v7_name |
378 | .long v7_processor_functions | 404 | .long \proc_fns |
379 | .long v7wbi_tlb_fns | 405 | .long v7wbi_tlb_fns |
380 | .long v6_user_fns | 406 | .long v6_user_fns |
381 | .long v7_cache_fns | 407 | .long v7_cache_fns |
@@ -407,12 +433,14 @@ __v7_ca9mp_proc_info: | |||
407 | /* | 433 | /* |
408 | * Marvell PJ4B processor. | 434 | * Marvell PJ4B processor. |
409 | */ | 435 | */ |
436 | #ifdef CONFIG_CPU_PJ4B | ||
410 | .type __v7_pj4b_proc_info, #object | 437 | .type __v7_pj4b_proc_info, #object |
411 | __v7_pj4b_proc_info: | 438 | __v7_pj4b_proc_info: |
412 | .long 0x560f5800 | 439 | .long 0x560f5800 |
413 | .long 0xff0fff00 | 440 | .long 0xff0fff00 |
414 | __v7_proc __v7_pj4b_setup | 441 | __v7_proc __v7_pj4b_setup, proc_fns = pj4b_processor_functions |
415 | .size __v7_pj4b_proc_info, . - __v7_pj4b_proc_info | 442 | .size __v7_pj4b_proc_info, . - __v7_pj4b_proc_info |
443 | #endif | ||
416 | 444 | ||
417 | /* | 445 | /* |
418 | * ARM Ltd. Cortex A7 processor. | 446 | * ARM Ltd. Cortex A7 processor. |