microblaze: Add sync to tlb operations
authorStefan Asserhall <stefan.asserhall@xilinx.com>
Tue, 4 Feb 2020 16:55:28 +0000 (17:55 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 25 Feb 2020 11:33:19 +0000 (12:33 +0100)
Do the real sync by using mbar instruction.

Signed-off-by: Stefan Asserhall <stefan.asserhall@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
arch/microblaze/kernel/misc.S

index 6759af6884515215f1e035dfe28ca1731b909c1b..1228a09d8109189268059fab809ae5180074bf26 100644 (file)
@@ -39,7 +39,7 @@ _tlbia_1:
        rsubi   r11, r12, MICROBLAZE_TLB_SIZE - 1
        bneid   r11, _tlbia_1 /* loop for all entries */
        addik   r12, r12, 1
-       /* sync */
+       mbar    1 /* sync */
        rtsd    r15, 8
        nop
        .size  _tlbia, . - _tlbia
@@ -58,6 +58,7 @@ _tlbie:
        blti    r12, _tlbie_1 /* Check if found */
        mts     rtlbhi, r0 /* flush: ensure V is clear */
        nop
+       mbar    1 /* sync */
 _tlbie_1:
        rtsd    r15, 8
        nop