]> cvs.zerfleddert.de Git - ms2-kexec/blobdiff - tlb-v7.S
update offsets to new european GB kernel, set software booting from USB
[ms2-kexec] / tlb-v7.S
index a26a605b73bd91688417dddc00378f286bfc6a33..f8f396242c24c25868e724aacdeed0e9e86377e0 100644 (file)
--- a/tlb-v7.S
+++ b/tlb-v7.S
  */
 #include <linux/init.h>
 #include <linux/linkage.h>
+#include "assembler.h"
 #include <asm/asm-offsets.h>
 #include <asm/page.h>
-#include <asm/tlbflush.h>
+#include "tlbflush.h"
 #include "proc-macros.S"
 
 /*
@@ -40,18 +41,16 @@ ENTRY(v7wbi_flush_user_tlb_range)
        asid    r3, r3                          @ mask ASID
        orr     r0, r3, r0, lsl #PAGE_SHIFT     @ Create initial MVA
        mov     r1, r1, lsl #PAGE_SHIFT
-       vma_vm_flags r2, r2                     @ get vma->vm_flags
 1:
-#ifdef CONFIG_SMP
-       mcr     p15, 0, r0, c8, c3, 1           @ TLB invalidate U MVA (shareable) 
-#else
-       mcr     p15, 0, r0, c8, c7, 1           @ TLB invalidate U MVA
-#endif
+       ALT_SMP(mcr     p15, 0, r0, c8, c3, 1)  @ TLB invalidate U MVA (shareable)
+       ALT_UP(mcr      p15, 0, r0, c8, c7, 1)  @ TLB invalidate U MVA
+
        add     r0, r0, #PAGE_SZ
        cmp     r0, r1
        blo     1b
        mov     ip, #0
-       mcr     p15, 0, ip, c7, c5, 6           @ flush BTAC/BTB
+       ALT_SMP(mcr     p15, 0, ip, c7, c1, 6)  @ flush BTAC/BTB Inner Shareable
+       ALT_UP(mcr      p15, 0, ip, c7, c5, 6)  @ flush BTAC/BTB
        dsb
        mov     pc, lr
 ENDPROC(v7wbi_flush_user_tlb_range)
@@ -71,16 +70,14 @@ ENTRY(v7wbi_flush_kern_tlb_range)
        mov     r0, r0, lsl #PAGE_SHIFT
        mov     r1, r1, lsl #PAGE_SHIFT
 1:
-#ifdef CONFIG_SMP
-       mcr     p15, 0, r0, c8, c3, 1           @ TLB invalidate U MVA (shareable)
-#else
-       mcr     p15, 0, r0, c8, c7, 1           @ TLB invalidate U MVA
-#endif
+       ALT_SMP(mcr     p15, 0, r0, c8, c3, 1)  @ TLB invalidate U MVA (shareable)
+       ALT_UP(mcr      p15, 0, r0, c8, c7, 1)  @ TLB invalidate U MVA
        add     r0, r0, #PAGE_SZ
        cmp     r0, r1
        blo     1b
        mov     r2, #0
-       mcr     p15, 0, r2, c7, c5, 6           @ flush BTAC/BTB
+       ALT_SMP(mcr     p15, 0, r2, c7, c1, 6)  @ flush BTAC/BTB Inner Shareable
+       ALT_UP(mcr      p15, 0, r2, c7, c5, 6)  @ flush BTAC/BTB
        dsb
        isb
        mov     pc, lr
@@ -92,5 +89,6 @@ ENDPROC(v7wbi_flush_kern_tlb_range)
 ENTRY(v7wbi_tlb_fns)
        .long   v7wbi_flush_user_tlb_range
        .long   v7wbi_flush_kern_tlb_range
-       .long   v7wbi_tlb_flags
+       ALT_SMP(.long   v7wbi_tlb_flags_smp)
+       ALT_UP(.long    v7wbi_tlb_flags_up)
        .size   v7wbi_tlb_fns, . - v7wbi_tlb_fns
Impressum, Datenschutz