Skip to content

Commit e72b23d

Browse files
danglin44hdeller
authored andcommitted
parisc: Do not use an ordered store in pa_tlb_lock()
No need to use an ordered store in pa_tlb_lock() and update the comment regarng usage of the sid register to unlocak a spinlock in tlb_unlock0(). Signed-off-by: John David Anglin <[email protected]> Signed-off-by: Helge Deller <[email protected]> Cc: <[email protected]> # v5.0+
1 parent 157e9af commit e72b23d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

arch/parisc/kernel/entry.S

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,15 +455,20 @@
455455
LDREG 0(\ptp),\pte
456456
bb,<,n \pte,_PAGE_PRESENT_BIT,3f
457457
b \fault
458-
stw,ma \spc,0(\tmp)
458+
stw \spc,0(\tmp)
459459
99: ALTERNATIVE(98b, 99b, ALT_COND_NO_SMP, INSN_NOP)
460460
#endif
461461
2: LDREG 0(\ptp),\pte
462462
bb,>=,n \pte,_PAGE_PRESENT_BIT,\fault
463463
3:
464464
.endm
465465

466-
/* Release pa_tlb_lock lock without reloading lock address. */
466+
/* Release pa_tlb_lock lock without reloading lock address.
467+
Note that the values in the register spc are limited to
468+
NR_SPACE_IDS (262144). Thus, the stw instruction always
469+
stores a nonzero value even when register spc is 64 bits.
470+
We use an ordered store to ensure all prior accesses are
471+
performed prior to releasing the lock. */
467472
.macro tlb_unlock0 spc,tmp
468473
#ifdef CONFIG_SMP
469474
98: or,COND(=) %r0,\spc,%r0

0 commit comments

Comments
 (0)