ARM: ensure initial page tables are setup for SMP systems
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 1 Nov 2009 17:44:24 +0000 (17:44 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 2 Nov 2009 16:59:59 +0000 (16:59 +0000)
commit4b46d6416548fb6a0940dfd9911fd895eb6247b3
treec2a890342019c9df5e6187ad185a28208b786341
parent6603a4fd5195a004dec5f9568e38ff76bae630c1
ARM: ensure initial page tables are setup for SMP systems

Mapping the same memory using two different attributes (memory
type, shareability, cacheability) is unpredictable.  During boot,
we encounter a situation when we're updating the kernel's page
tables which can lead to dirty cache lines existing in the cache
which are subsequently missed.  This causes stack corruption,
and therefore a crash.

Therefore, ensure that the shared and cacheability settings
matches the configuration that will be used later; this together
with the restriction in early_cachepolicy() ensures that we won't
create a mismatch during boot.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/mmu.c
arch/arm/mm/proc-v6.S
arch/arm/mm/proc-v7.S