diff options
author | Mark Rutland <mark.rutland@arm.com> | 2013-12-02 11:11:00 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2013-12-06 12:21:49 -0500 |
commit | 3cea71bc6b470372ae407881b87128aadf0afec0 (patch) | |
tree | 1a86fe9baff107a795717772ab25c3371656d3cf /arch/arm64 | |
parent | dc1ccc48159d63eca5089e507c82c7d22ef60839 (diff) |
arm64: ensure completion of TLB invalidatation
Currently there is no dsb between the tlbi in __cpu_setup and the write
to SCTLR_EL1 which enables the MMU in __turn_mmu_on. This means that the
TLB invalidation is not guaranteed to have completed at the point
address translation is enabled, leading to a number of possible issues
including incorrect translations and TLB conflict faults.
This patch moves the tlbi in __cpu_setup above an existing dsb used to
synchronise I-cache invalidation, ensuring that the TLBs have been
invalidated at the point the MMU is enabled.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/mm/proc.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 421b99fd635d..0f7fec52c7f8 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S | |||
@@ -111,12 +111,12 @@ ENTRY(__cpu_setup) | |||
111 | bl __flush_dcache_all | 111 | bl __flush_dcache_all |
112 | mov lr, x28 | 112 | mov lr, x28 |
113 | ic iallu // I+BTB cache invalidate | 113 | ic iallu // I+BTB cache invalidate |
114 | tlbi vmalle1is // invalidate I + D TLBs | ||
114 | dsb sy | 115 | dsb sy |
115 | 116 | ||
116 | mov x0, #3 << 20 | 117 | mov x0, #3 << 20 |
117 | msr cpacr_el1, x0 // Enable FP/ASIMD | 118 | msr cpacr_el1, x0 // Enable FP/ASIMD |
118 | msr mdscr_el1, xzr // Reset mdscr_el1 | 119 | msr mdscr_el1, xzr // Reset mdscr_el1 |
119 | tlbi vmalle1is // invalidate I + D TLBs | ||
120 | /* | 120 | /* |
121 | * Memory region attributes for LPAE: | 121 | * Memory region attributes for LPAE: |
122 | * | 122 | * |