[PATCH] lockdep: irqtrace subsystem, move account_system_vtime() calls into kernel/softirq.c

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.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Paul Mackerras and committed by Linus Torvalds 829035fd 8688cfce

+5 -14
+1 -6
arch/powerpc/kernel/irq.c
··· 424 425 local_irq_save(flags); 426 427 - if (local_softirq_pending()) { 428 - account_system_vtime(current); 429 - local_bh_disable(); 430 do_softirq_onstack(); 431 - account_system_vtime(current); 432 - _local_bh_enable(); 433 - } 434 435 local_irq_restore(flags); 436 }
··· 424 425 local_irq_save(flags); 426 427 + if (local_softirq_pending()) 428 do_softirq_onstack(); 429 430 local_irq_restore(flags); 431 }
-8
arch/s390/kernel/irq.c
··· 69 70 local_irq_save(flags); 71 72 - account_system_vtime(current); 73 - 74 - local_bh_disable(); 75 - 76 if (local_softirq_pending()) { 77 /* Get current stack pointer. */ 78 asm volatile("la %0,0(15)" : "=a" (old)); ··· 90 /* We are already on the async stack. */ 91 __do_softirq(); 92 } 93 - 94 - account_system_vtime(current); 95 - 96 - _local_bh_enable(); 97 98 local_irq_restore(flags); 99 }
··· 69 70 local_irq_save(flags); 71 72 if (local_softirq_pending()) { 73 /* Get current stack pointer. */ 74 asm volatile("la %0,0(15)" : "=a" (old)); ··· 94 /* We are already on the async stack. */ 95 __do_softirq(); 96 } 97 98 local_irq_restore(flags); 99 }
+4
kernel/softirq.c
··· 193 int cpu; 194 195 pending = local_softirq_pending(); 196 __local_bh_disable((unsigned long)__builtin_return_address(0)); 197 trace_softirq_enter(); 198 ··· 226 wakeup_softirqd(); 227 228 trace_softirq_exit(); 229 _local_bh_enable(); 230 } 231
··· 193 int cpu; 194 195 pending = local_softirq_pending(); 196 + account_system_vtime(current); 197 + 198 __local_bh_disable((unsigned long)__builtin_return_address(0)); 199 trace_softirq_enter(); 200 ··· 224 wakeup_softirqd(); 225 226 trace_softirq_exit(); 227 + 228 + account_system_vtime(current); 229 _local_bh_enable(); 230 } 231