You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
@@ -32,8 +32,10 @@
|
||||
|
||||
#ifndef CONFIG_SMP
|
||||
#define TTB_FLAGS TTB_RGN_WBWA
|
||||
#define PMD_FLAGS PMD_SECT_WB
|
||||
#else
|
||||
#define TTB_FLAGS TTB_RGN_WBWA|TTB_S
|
||||
#define PMD_FLAGS PMD_SECT_WBWA|PMD_SECT_S
|
||||
#endif
|
||||
|
||||
ENTRY(cpu_v6_proc_init)
|
||||
@@ -222,10 +224,9 @@ __v6_proc_info:
|
||||
.long 0x0007b000
|
||||
.long 0x0007f000
|
||||
.long PMD_TYPE_SECT | \
|
||||
PMD_SECT_BUFFERABLE | \
|
||||
PMD_SECT_CACHEABLE | \
|
||||
PMD_SECT_AP_WRITE | \
|
||||
PMD_SECT_AP_READ
|
||||
PMD_SECT_AP_READ | \
|
||||
PMD_FLAGS
|
||||
.long PMD_TYPE_SECT | \
|
||||
PMD_SECT_XN | \
|
||||
PMD_SECT_AP_WRITE | \
|
||||
|
||||
Reference in New Issue
Block a user