aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-07-18 14:03:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-07-18 14:03:48 -0400
commit9d37e6679dfddbb5fa605fb2d7ff448f7cd6d038 (patch)
tree7768cf19970973c436907dda0e58bc51217b265d
parent0e1dbccd8f60c1c83d86d693bb87363b7de2319c (diff)
parent0871b7248113ebfccbfabcd3fd1f867a2bc681f4 (diff)
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King: "A small set of ARM fixes for -rc3, most of them not far off one-liners, with the exception of fixing the V7 cache invalidation for incoming SMP processors which was causing problems for SoCFPGA devices" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: fix __virt_to_idmap build error on !MMU ARM: invalidate L1 before enabling coherency ARM: 8404/1: dma-mapping: fix off-by-one error in bitmap size check ARM: 8402/1: perf: Don't use of_node after putting it ARM: 8400/1: use virt_to_idmap to get phys_reset address
-rw-r--r--arch/arm/include/asm/memory.h2
-rw-r--r--arch/arm/kernel/perf_event.c3
-rw-r--r--arch/arm/kernel/reboot.c2
-rw-r--r--arch/arm/mm/dma-mapping.c2
-rw-r--r--arch/arm/mm/proc-v7.S14
5 files changed, 14 insertions, 9 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 6f225acc07c5..b7f6fb462ea0 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -286,7 +286,7 @@ extern phys_addr_t (*arch_virt_to_idmap)(unsigned long x);
286 */ 286 */
287static inline phys_addr_t __virt_to_idmap(unsigned long x) 287static inline phys_addr_t __virt_to_idmap(unsigned long x)
288{ 288{
289 if (arch_virt_to_idmap) 289 if (IS_ENABLED(CONFIG_MMU) && arch_virt_to_idmap)
290 return arch_virt_to_idmap(x); 290 return arch_virt_to_idmap(x);
291 else 291 else
292 return __virt_to_phys(x); 292 return __virt_to_phys(x);
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c
index 357f57ea83f4..54272e0be713 100644
--- a/arch/arm/kernel/perf_event.c
+++ b/arch/arm/kernel/perf_event.c
@@ -818,12 +818,13 @@ static int of_pmu_irq_cfg(struct arm_pmu *pmu)
818 if (arch_find_n_match_cpu_physical_id(dn, cpu, NULL)) 818 if (arch_find_n_match_cpu_physical_id(dn, cpu, NULL))
819 break; 819 break;
820 820
821 of_node_put(dn);
822 if (cpu >= nr_cpu_ids) { 821 if (cpu >= nr_cpu_ids) {
823 pr_warn("Failed to find logical CPU for %s\n", 822 pr_warn("Failed to find logical CPU for %s\n",
824 dn->name); 823 dn->name);
824 of_node_put(dn);
825 break; 825 break;
826 } 826 }
827 of_node_put(dn);
827 828
828 irqs[i] = cpu; 829 irqs[i] = cpu;
829 cpumask_set_cpu(cpu, &pmu->supported_cpus); 830 cpumask_set_cpu(cpu, &pmu->supported_cpus);
diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c
index 1a4d232796be..38269358fd25 100644
--- a/arch/arm/kernel/reboot.c
+++ b/arch/arm/kernel/reboot.c
@@ -50,7 +50,7 @@ static void __soft_restart(void *addr)
50 flush_cache_all(); 50 flush_cache_all();
51 51
52 /* Switch to the identity mapping. */ 52 /* Switch to the identity mapping. */
53 phys_reset = (phys_reset_t)(unsigned long)virt_to_phys(cpu_reset); 53 phys_reset = (phys_reset_t)(unsigned long)virt_to_idmap(cpu_reset);
54 phys_reset((unsigned long)addr); 54 phys_reset((unsigned long)addr);
55 55
56 /* Should never get here. */ 56 /* Should never get here. */
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 1ced8a0f7a52..cba12f34ff77 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -1971,7 +1971,7 @@ static int extend_iommu_mapping(struct dma_iommu_mapping *mapping)
1971{ 1971{
1972 int next_bitmap; 1972 int next_bitmap;
1973 1973
1974 if (mapping->nr_bitmaps > mapping->extensions) 1974 if (mapping->nr_bitmaps >= mapping->extensions)
1975 return -EINVAL; 1975 return -EINVAL;
1976 1976
1977 next_bitmap = mapping->nr_bitmaps; 1977 next_bitmap = mapping->nr_bitmaps;
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 0716bbe19872..de2b246fed38 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -274,7 +274,10 @@ __v7_ca15mp_setup:
274__v7_b15mp_setup: 274__v7_b15mp_setup:
275__v7_ca17mp_setup: 275__v7_ca17mp_setup:
276 mov r10, #0 276 mov r10, #0
2771: 2771: adr r12, __v7_setup_stack @ the local stack
278 stmia r12, {r0-r5, lr} @ v7_invalidate_l1 touches r0-r6
279 bl v7_invalidate_l1
280 ldmia r12, {r0-r5, lr}
278#ifdef CONFIG_SMP 281#ifdef CONFIG_SMP
279 ALT_SMP(mrc p15, 0, r0, c1, c0, 1) 282 ALT_SMP(mrc p15, 0, r0, c1, c0, 1)
280 ALT_UP(mov r0, #(1 << 6)) @ fake it for UP 283 ALT_UP(mov r0, #(1 << 6)) @ fake it for UP
@@ -283,7 +286,7 @@ __v7_ca17mp_setup:
283 orreq r0, r0, r10 @ Enable CPU-specific SMP bits 286 orreq r0, r0, r10 @ Enable CPU-specific SMP bits
284 mcreq p15, 0, r0, c1, c0, 1 287 mcreq p15, 0, r0, c1, c0, 1
285#endif 288#endif
286 b __v7_setup 289 b __v7_setup_cont
287 290
288/* 291/*
289 * Errata: 292 * Errata:
@@ -413,10 +416,11 @@ __v7_pj4b_setup:
413 416
414__v7_setup: 417__v7_setup:
415 adr r12, __v7_setup_stack @ the local stack 418 adr r12, __v7_setup_stack @ the local stack
416 stmia r12, {r0-r5, r7, r9, r11, lr} 419 stmia r12, {r0-r5, lr} @ v7_invalidate_l1 touches r0-r6
417 bl v7_invalidate_l1 420 bl v7_invalidate_l1
418 ldmia r12, {r0-r5, r7, r9, r11, lr} 421 ldmia r12, {r0-r5, lr}
419 422
423__v7_setup_cont:
420 and r0, r9, #0xff000000 @ ARM? 424 and r0, r9, #0xff000000 @ ARM?
421 teq r0, #0x41000000 425 teq r0, #0x41000000
422 bne __errata_finish 426 bne __errata_finish
@@ -480,7 +484,7 @@ ENDPROC(__v7_setup)
480 484
481 .align 2 485 .align 2
482__v7_setup_stack: 486__v7_setup_stack:
483 .space 4 * 11 @ 11 registers 487 .space 4 * 7 @ 12 registers
484 488
485 __INITDATA 489 __INITDATA
486 490