aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@stericsson.com>2010-10-06 06:07:28 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-10-08 04:59:36 -0400
commit5fb31a96e1e0078f1e82736ccd72a61ecabe6a4f (patch)
treee85c3838b54becf015c51a9b377e69cb96a9cd85
parentc4e259c859538e94007d1f04a488540375189551 (diff)
ARM: 6431/1: fix isb regression on CPU < v7
The kernel does not compile for my ARM926EJ-S system U300 due to the isb instruction inserted in generic assember statement from commit 8925ec4c530094b878e7e28a1fd78e7122afd973, "ARM: 6385/1: setup: detect aliasing I-cache when D-cache is non-aliasing" hey the isb is only available when assembling for v7 so let's use the generic isb() macro from setup.h instead. Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/kernel/setup.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 9fc483393ba..e0430d036ce 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -246,11 +246,12 @@ static int cpu_has_aliasing_icache(unsigned int arch)
246 /* arch specifies the register format */ 246 /* arch specifies the register format */
247 switch (arch) { 247 switch (arch) {
248 case CPU_ARCH_ARMv7: 248 case CPU_ARCH_ARMv7:
249 asm("mcr p15, 2, %1, c0, c0, 0 @ set CSSELR\n" 249 asm("mcr p15, 2, %0, c0, c0, 0 @ set CSSELR"
250 "isb\n" 250 : /* No output operands */
251 "mrc p15, 1, %0, c0, c0, 0 @ read CCSIDR"
252 : "=r" (id_reg)
253 : "r" (1)); 251 : "r" (1));
252 isb();
253 asm("mrc p15, 1, %0, c0, c0, 0 @ read CCSIDR"
254 : "=r" (id_reg));
254 line_size = 4 << ((id_reg & 0x7) + 2); 255 line_size = 4 << ((id_reg & 0x7) + 2);
255 num_sets = ((id_reg >> 13) & 0x7fff) + 1; 256 num_sets = ((id_reg >> 13) & 0x7fff) + 1;
256 aliasing_icache = (line_size * num_sets) > PAGE_SIZE; 257 aliasing_icache = (line_size * num_sets) > PAGE_SIZE;