提交 3d3eeb2e 编写于 作者: P Paul E. McKenney 提交者: David S. Miller

sparc64: Eliminate obsolete __handle_softirq() function

The invocation of softirq is now handled by irq_exit(), so there is no
need for sparc64 to invoke it on the trap-return path.  In fact, doing so
is a bug because if the trap occurred in the idle loop, this invocation
can result in lockdep-RCU failures.  The problem is that RCU ignores idle
CPUs, and the sparc64 trap-return path to the softirq handlers fails to
tell RCU that the CPU must be considered non-idle while those handlers
are executing.  This means that RCU is ignoring any RCU read-side critical
sections in those handlers, which in turn means that RCU-protected data
can be yanked out from under those read-side critical sections.

The shiny new lockdep-RCU ability to detect RCU read-side critical sections
that RCU is ignoring located this problem.

The fix is straightforward: Make sparc64 stop manually invoking the
softirq handlers.
Reported-by: NMeelis Roos <mroos@linux.ee>
Suggested-by: NDavid Miller <davem@davemloft.net>
Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: NMeelis Roos <mroos@linux.ee>
Cc: stable@vger.kernel.org
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9e0daff3
...@@ -20,11 +20,6 @@ ...@@ -20,11 +20,6 @@
.text .text
.align 32 .align 32
__handle_softirq:
call do_softirq
nop
ba,a,pt %xcc, __handle_softirq_continue
nop
__handle_preemption: __handle_preemption:
call schedule call schedule
wrpr %g0, RTRAP_PSTATE, %pstate wrpr %g0, RTRAP_PSTATE, %pstate
...@@ -89,9 +84,7 @@ rtrap: ...@@ -89,9 +84,7 @@ rtrap:
cmp %l1, 0 cmp %l1, 0
/* mm/ultra.S:xcall_report_regs KNOWS about this load. */ /* mm/ultra.S:xcall_report_regs KNOWS about this load. */
bne,pn %icc, __handle_softirq
ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1
__handle_softirq_continue:
rtrap_xcall: rtrap_xcall:
sethi %hi(0xf << 20), %l4 sethi %hi(0xf << 20), %l4
and %l1, %l4, %l4 and %l1, %l4, %l4
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册