]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU
authorWill Deacon <will.deacon@arm.com>
Fri, 7 Feb 2014 18:12:20 +0000 (19:12 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 10 Feb 2014 11:44:26 +0000 (11:44 +0000)
commit7e5b05c8407e5bfeb607a8d23b55470fcf50fe86
treed3bb5504e13472fad2bdbb928b8a7cdfeee1c594
parent83489a7480143a11074860533286576a3db2acf6
ARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU

During __v{6,7}_setup, we invalidate the TLBs since we are about to
enable the MMU on return to head.S. Unfortunately, without a subsequent
dsb instruction, the invalidation is not guaranteed to have completed by
the time we write to the sctlr, potentially exposing us to junk/stale
translations cached in the TLB.

This patch reworks the init functions so that the dsb used to ensure
completion of cache/predictor maintenance is also used to ensure
completion of the TLB invalidation.

Cc: <stable@vger.kernel.org>
Reported-by: Albin Tonnerre <Albin.Tonnerre@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/proc-v6.S
arch/arm/mm/proc-v7.S