diff options
-rw-r--r-- | arch/arm/mm/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mm/mmu.c | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 58109ae34709..76a3ba668e2e 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -599,7 +599,7 @@ config CPU_DCACHE_SIZE | |||
599 | 599 | ||
600 | config CPU_DCACHE_WRITETHROUGH | 600 | config CPU_DCACHE_WRITETHROUGH |
601 | bool "Force write through D-cache" | 601 | bool "Force write through D-cache" |
602 | depends on (CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020 || CPU_V6) && !CPU_DCACHE_DISABLE | 602 | depends on (CPU_ARM740T || CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM940T || CPU_ARM946E || CPU_ARM1020) && !CPU_DCACHE_DISABLE |
603 | default y if CPU_ARM925T | 603 | default y if CPU_ARM925T |
604 | help | 604 | help |
605 | Say Y here to use the data cache in writethrough mode. Unless you | 605 | Say Y here to use the data cache in writethrough mode. Unless you |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 3b5e47dc0c97..e5d61ee3d4a1 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -114,6 +114,10 @@ static void __init early_cachepolicy(char **p) | |||
114 | } | 114 | } |
115 | if (i == ARRAY_SIZE(cache_policies)) | 115 | if (i == ARRAY_SIZE(cache_policies)) |
116 | printk(KERN_ERR "ERROR: unknown or unsupported cache policy\n"); | 116 | printk(KERN_ERR "ERROR: unknown or unsupported cache policy\n"); |
117 | if (cpu_architecture() >= CPU_ARCH_ARMv6) { | ||
118 | printk(KERN_WARNING "Only cachepolicy=writeback supported on ARMv6 and later\n"); | ||
119 | cachepolicy = CPOLICY_WRITEBACK; | ||
120 | } | ||
117 | flush_cache_all(); | 121 | flush_cache_all(); |
118 | set_cr(cr_alignment); | 122 | set_cr(cr_alignment); |
119 | } | 123 | } |
@@ -252,13 +256,15 @@ static void __init build_mem_type_table(void) | |||
252 | int cpu_arch = cpu_architecture(); | 256 | int cpu_arch = cpu_architecture(); |
253 | int i; | 257 | int i; |
254 | 258 | ||
259 | if (cpu_arch < CPU_ARCH_ARMv6) { | ||
255 | #if defined(CONFIG_CPU_DCACHE_DISABLE) | 260 | #if defined(CONFIG_CPU_DCACHE_DISABLE) |
256 | if (cachepolicy > CPOLICY_BUFFERED) | 261 | if (cachepolicy > CPOLICY_BUFFERED) |
257 | cachepolicy = CPOLICY_BUFFERED; | 262 | cachepolicy = CPOLICY_BUFFERED; |
258 | #elif defined(CONFIG_CPU_DCACHE_WRITETHROUGH) | 263 | #elif defined(CONFIG_CPU_DCACHE_WRITETHROUGH) |
259 | if (cachepolicy > CPOLICY_WRITETHROUGH) | 264 | if (cachepolicy > CPOLICY_WRITETHROUGH) |
260 | cachepolicy = CPOLICY_WRITETHROUGH; | 265 | cachepolicy = CPOLICY_WRITETHROUGH; |
261 | #endif | 266 | #endif |
267 | } | ||
262 | if (cpu_arch < CPU_ARCH_ARMv5) { | 268 | if (cpu_arch < CPU_ARCH_ARMv5) { |
263 | if (cachepolicy >= CPOLICY_WRITEALLOC) | 269 | if (cachepolicy >= CPOLICY_WRITEALLOC) |
264 | cachepolicy = CPOLICY_WRITEBACK; | 270 | cachepolicy = CPOLICY_WRITEBACK; |