Skip to content

Commit 1027247

Browse files
author
Russell King
committed
ARM: Add L2 cache handling to smp boot support
The page table and secondary data which we're asking the secondary CPU to make use of has to hit RAM to ensure that the secondary CPU can see it since it may not be taking part in coherency or cache searches at this point. Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent d10fca9 commit 1027247

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎arch/arm/kernel/smp.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,16 @@ int __cpuinit __cpu_up(unsigned int cpu)
9999
*pmd = __pmd((PHYS_OFFSET & PGDIR_MASK) |
100100
PMD_TYPE_SECT | PMD_SECT_AP_WRITE);
101101
flush_pmd_entry(pmd);
102+
outer_clean_range(__pa(pmd), __pa(pmd + 1));
102103

103104
/*
104105
* We need to tell the secondary core where to find
105106
* its stack and the page tables.
106107
*/
107108
secondary_data.stack = task_stack_page(idle) + THREAD_START_SP;
108109
secondary_data.pgdir = virt_to_phys(pgd);
109-
wmb();
110+
__cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data));
111+
outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1));
110112

111113
/*
112114
* Now bring the CPU into our world.

0 commit comments

Comments
 (0)