Skip to content

Commit 2a26f4e

Browse files
committed
xtensa: don't leave invalid TLB entry in fast_store_prohibited
When fast_store_prohibited needs to go to the C-level exception handler it leaves TLB entry that caused page fault in the TLB. If the faulting task gets switched to a different CPU and completes page table update there the TLB entry will get out of sync with the page table which may cause a livelock on access to that page. Invalidate faulting TLB entry on a slow path exit from the fast_store_prohibited. Signed-off-by: Max Filippov <[email protected]>
1 parent 5442b8c commit 2a26f4e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/xtensa/kernel/entry.S

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1882,7 +1882,11 @@ ENTRY(fast_store_prohibited)
18821882
j 8b
18831883

18841884
2: /* If there was a problem, handle fault in C */
1885-
1885+
rsr a1, excvaddr
1886+
pdtlb a0, a1
1887+
bbci.l a0, DTLB_HIT_BIT, 1f
1888+
idtlb a0
1889+
1:
18861890
rsr a3, depc # still holds a2
18871891
s32i a3, a2, PT_AREG2
18881892
mov a1, a2

0 commit comments

Comments
 (0)