Commit 6a457c22 authored by Catalin Marinas's avatar Catalin Marinas

Always set write-allocate caches on ARMv6 SMP

Otherwise, the caches can become uncoherent between cores.
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 69e9e83d
......@@ -376,6 +376,13 @@ void __init build_mem_type_table(void)
ecc_mask = 0;
}
#ifdef CONFIG_SMP
/* To ensure the cache coherency between multiple ARMv6 cores,
* the cache policy has to be write-allocate */
if (cpu_arch == CPU_ARCH_ARMv6 && cachepolicy >= CPOLICY_WRITEBACK)
cachepolicy = CPOLICY_WRITEALLOC;
#endif
if (cpu_arch <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) {
for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
if (mem_types[i].prot_l1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment