aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mm/mm-armv.c4
-rw-r--r--include/asm-arm/system.h6
2 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c
index f14b2d0f3690..95273de4f772 100644
--- a/arch/arm/mm/mm-armv.c
+++ b/arch/arm/mm/mm-armv.c
@@ -376,7 +376,7 @@ void __init build_mem_type_table(void)
376 ecc_mask = 0; 376 ecc_mask = 0;
377 } 377 }
378 378
379 if (cpu_arch <= CPU_ARCH_ARMv5TEJ) { 379 if (cpu_arch <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) {
380 for (i = 0; i < ARRAY_SIZE(mem_types); i++) { 380 for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
381 if (mem_types[i].prot_l1) 381 if (mem_types[i].prot_l1)
382 mem_types[i].prot_l1 |= PMD_BIT4; 382 mem_types[i].prot_l1 |= PMD_BIT4;
@@ -631,7 +631,7 @@ void setup_mm_for_reboot(char mode)
631 pgd = init_mm.pgd; 631 pgd = init_mm.pgd;
632 632
633 base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT; 633 base_pmdval = PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT;
634 if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ) 634 if (cpu_architecture() <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale())
635 base_pmdval |= PMD_BIT4; 635 base_pmdval |= PMD_BIT4;
636 636
637 for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++, pgd++) { 637 for (i = 0; i < FIRST_USER_PGD_NR + USER_PTRS_PER_PGD; i++, pgd++) {
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 95b3abf4851b..7c9568d30307 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -127,6 +127,12 @@ static inline int cpu_is_xsc3(void)
127} 127}
128#endif 128#endif
129 129
130#if !defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_CPU_XSC3)
131#define cpu_is_xscale() 0
132#else
133#define cpu_is_xscale() 1
134#endif
135
130#define set_cr(x) \ 136#define set_cr(x) \
131 __asm__ __volatile__( \ 137 __asm__ __volatile__( \
132 "mcr p15, 0, %0, c1, c0, 0 @ set CR" \ 138 "mcr p15, 0, %0, c1, c0, 0 @ set CR" \