Skip to content

Commit d1f1f98

Browse files
committed
sparc64: Set %l4 properly on trap return after handling signals.
If we did some signal processing, we have to reload the pt_regs tstate register because it's value may have changed. In doing so we also have to extract the %pil value contained in there anre load that into %l4. This value is at bit 20 and thus needs to be shifted down before we later write it into the %pil register. Most of the time this is harmless as we are returning to userspace and the %pil is zero for that case. Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b3e1eb8 commit d1f1f98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/sparc/kernel/rtrap_64.S

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ __handle_signal:
8484
ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1
8585
sethi %hi(0xf << 20), %l4
8686
and %l1, %l4, %l4
87+
andn %l1, %l4, %l1
8788
ba,pt %xcc, __handle_preemption_continue
88-
andn %l1, %l4, %l1
89+
srl %l4, 20, %l4
8990

9091
/* When returning from a NMI (%pil==15) interrupt we want to
9192
* avoid running softirqs, doing IRQ tracing, preempting, etc.

0 commit comments

Comments
 (0)