History

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

Linus Torvalds committed 11 years ago

Commit 9d37e662 parents 0e1dbcc 0871b725 files · +14 −9Browse files

Unified · Split

5 files
  1. arch/arm/include/asm/memory.h +1 −1
  2. arch/arm/kernel/perf_event.c +2 −1
  3. arch/arm/kernel/reboot.c +1 −1
  4. arch/arm/mm/dma-mapping.c +1 −1
  5. arch/arm/mm/proc-v7.S +9 −5
arch/arm/include/asm/memory.h+1−1
@@ -286,7 +286,7 @@ extern phys_addr_t (*arch_virt_to_idmap)(unsigned long x); · 285 unmodified lines
286286 */
287287 static inline phys_addr_t __virt_to_idmap(unsigned long x)
288288 {
289− if (arch_virt_to_idmap)
289+ if (IS_ENABLED(CONFIG_MMU) && arch_virt_to_idmap)
290290 return arch_virt_to_idmap(x);
291291 else
292292 return __virt_to_phys(x);
arch/arm/kernel/perf_event.c+2−1
@@ -818,12 +818,13 @@ static int of_pmu_irq_cfg(struct arm_pmu *pmu) · 817 unmodified lines
818818 if (arch_find_n_match_cpu_physical_id(dn, cpu, NULL))
819819 break;
820820
821− of_node_put(dn);
822821 if (cpu >= nr_cpu_ids) {
823822 pr_warn("Failed to find logical CPU for %s\n",
824823 dn->name);
824+ of_node_put(dn);
825825 break;
826826 }
827+ of_node_put(dn);
827828
828829 irqs[i] = cpu;
829830 cpumask_set_cpu(cpu, &pmu->supported_cpus);
arch/arm/kernel/reboot.c+1−1
@@ -50,7 +50,7 @@ static void __soft_restart(void *addr) · 49 unmodified lines
5050 flush_cache_all();
5151
5252 /* 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);
5454 phys_reset((unsigned long)addr);
5555
5656 /* Should never get here. */
arch/arm/mm/dma-mapping.c+1−1
@@ -1971,7 +1971,7 @@ static int extend_iommu_mapping(struct dma_iommu_mapping *mapping) · 1970 unmodified lines
19711971 {
19721972 int next_bitmap;
19731973
1974− if (mapping->nr_bitmaps > mapping->extensions)
1974+ if (mapping->nr_bitmaps >= mapping->extensions)
19751975 return -EINVAL;
19761976
19771977 next_bitmap = mapping->nr_bitmaps;
arch/arm/mm/proc-v7.S+9−5
@@ -274,7 +274,10 @@ __v7_ca15mp_setup: · 273 unmodified lines
274274 __v7_b15mp_setup:
275275 __v7_ca17mp_setup:
276276 mov r10, #0
277−1:
277+1: 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}
278281 #ifdef CONFIG_SMP
279282 ALT_SMP(mrc p15, 0, r0, c1, c0, 1)
280283 ALT_UP(mov r0, #(1 << 6)) @ fake it for UP
@@ -283,7 +286,7 @@ __v7_ca17mp_setup: · 2 unmodified lines
283286 orreq r0, r0, r10 @ Enable CPU-specific SMP bits
284287 mcreq p15, 0, r0, c1, c0, 1
285288 #endif
286− b __v7_setup
289+ b __v7_setup_cont
287290
288291 /*
289292 * Errata:
@@ -413,10 +416,11 @@ __v7_pj4b_setup: · 123 unmodified lines
413416
414417 __v7_setup:
415418 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
417420 bl v7_invalidate_l1
418− ldmia r12, {r0-r5, r7, r9, r11, lr}
421+ ldmia r12, {r0-r5, lr}
419422
423+__v7_setup_cont:
420424 and r0, r9, #0xff000000 @ ARM?
421425 teq r0, #0x41000000
422426 bne __errata_finish
@@ -480,7 +484,7 @@ ENDPROC(__v7_setup) · 57 unmodified lines
480484
481485 .align 2
482486 __v7_setup_stack:
483− .space 4 * 11 @ 11 registers
487+ .space 4 * 7 @ 12 registers
484488
485489 __INITDATA
486490