Remove extra local_bh_disable/enable from arch do_softirq
PATCH 1/1 Remove extra local_bh_disable/enable from arch do_softirq
At the moment, powerpc and s390 have their own versions of do_softirq which include local_bh_disable() and __local_bh_enable() calls. They end up calling __do_softirq (in kernel/softirq.c) which also does local_bh_disable/enable.
Apparently the two levels of disable/enable trigger a warning from some validation code that Ingo is working on, and he would like to see the outer level removed. But to do that, we have to move the account_system_vtime calls that are currently in the arch do_softirq() implementations for powerpc and s390 into the generic __do_softirq() (this is a no-op for other archs because account_system_vtime is defined to be an empty inline function on all other archs). This patch does that.
---
The s390 change here needs to be acked by the s390 folks, in case there's a subtlety on s390 that I have missed.
arch/powerpc/kernel/irq.c +1 -6
@@ -425,13 +425,8 @@ void do_softirq(void)local_irq_save (flags); -if (local_softirq_pending ()) { -account_system_vtime (current); -local_bh_disable (); +if (local_softirq_pending ())do_softirq_onstack (); -account_system_vtime (current); -__local_bh_enable (); - }local_irq_restore (flags); }
arch/s390/kernel/irq.c +0 -8
@@ -69,10 +69,6 @@ asmlinkage void do_softirq(void)local_irq_save (flags); -account_system_vtime (current); - -local_bh_disable (); -if (local_softirq_pending ()) {/* Get current stack pointer. */ asmvolatile ("la %0,0(15)" :"=a" (old));
@@ -95,10 +91,6 @@ asmlinkage void do_softirq(void)__do_softirq (); } -account_system_vtime (current); - -__local_bh_enable (); -local_irq_restore (flags); }
kernel/softirq.c +2 -0
@@ -81,6 +81,7 @@ asmlinkage void __do_softirq(void) pending =local_softirq_pending (); +account_system_vtime (current);local_bh_disable (); cpu =smp_processor_id (); restart:
@@ -109,6 +110,7 @@ restart:if (pending)wakeup_softirqd (); +account_system_vtime (current);__local_bh_enable (); }
Quoted 14 lines · Paul Mackerras
At the moment, powerpc and s390 have their own versions of
do_softirqwhich includelocal_bh_disable()and__local_bh_enable()calls. They end up calling__do_softirq(inkernel/softirq.c) which also does local_bh_disable/enable.Apparently the two levels of disable/enable trigger a warning from some validation code that Ingo is working on, and he would like to see the outer level removed. But to do that, we have to move the
account_system_vtimecalls that are currently in the archdo_softirq()implementations for powerpc and s390 into the generic__do_softirq()(this is a no-op for other archs becauseaccount_system_vtimeis defined to be an empty inline function on all other archs). This patch does that.
Quoted 1 line
Signed-off-by Paul Mackerras <[email protected]>
thanks - this solves the problem nicely.
Ingo
Quoted 5 lines · Paul Mackerras
At the moment, powerpc and s390 have their own versions of
do_softirqwhich includelocal_bh_disable()and__local_bh_enable()calls. They end up calling__do_softirq(inkernel/softirq.c) which also does local_bh_disable/enable.
Quoted 8 lines
Apparently the two levels of disable/enable trigger a warning from some validation code that Ingo is working on, and he would like to see the outer level removed. But to do that, we have to move the
account_system_vtimecalls that are currently in the archdo_softirq()implementations for powerpc and s390 into the generic__do_softirq()(this is a no-op for other archs becauseaccount_system_vtimeis defined to be an empty inline function on all other archs). This patch does that.
Nod, Heiko stumbled over that one as well as he ported the lock validator patch. Moving the account_system_vtime call is the correct solution.
Signature · 8 lines
blue skies, Martin. Martin Schwidefsky Linux for zSeries Development & Services IBM Deutschland Entwicklung GmbH "Reality continues to ruin my life." - Calvin.