]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/arm/mm/cache-v7.S
ARM: 7321/1: cache-v7: Disable preemption when reading CCSIDR
[karo-tx-linux.git] / arch / arm / mm / cache-v7.S
index 07c4bc8ea0a4aaf3cfd1bfcd819bd1061ec090e1..7a24d39661f09b702b3373f8a5ef82389795842f 100644 (file)
@@ -54,9 +54,15 @@ loop1:
        and     r1, r1, #7                      @ mask of the bits for current cache only
        cmp     r1, #2                          @ see what cache we have at this level
        blt     skip                            @ skip if no cache, or just i-cache
+#ifdef CONFIG_PREEMPT
+       save_and_disable_irqs r9                @ make cssr&csidr read atomic
+#endif
        mcr     p15, 2, r10, c0, c0, 0          @ select current cache level in cssr
        isb                                     @ isb to sych the new cssr&csidr
        mrc     p15, 1, r1, c0, c0, 0           @ read the new csidr
+#ifdef CONFIG_PREEMPT
+       restore_irqs_notrace r9
+#endif
        and     r2, r1, #7                      @ extract the length of the cache lines
        add     r2, r2, #4                      @ add 4 (line length offset)
        ldr     r4, =0x3ff