Skip to content

Commit

Permalink
[PATCH] lockdep: irqtrace subsystem, move account_system_vtime() call…
Browse files Browse the repository at this point in the history
…s 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>
  • Loading branch information
Paul Mackerras authored and Linus Torvalds committed Jul 3, 2006
1 parent 8688cfc commit 829035f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
7 changes: 1 addition & 6 deletions arch/powerpc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,13 +424,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);
}
Expand Down
8 changes: 0 additions & 8 deletions arch/s390/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
asm volatile("la %0,0(15)" : "=a" (old));
Expand All @@ -95,10 +91,6 @@ asmlinkage void do_softirq(void)
__do_softirq();
}

account_system_vtime(current);

_local_bh_enable();

local_irq_restore(flags);
}

Expand Down
4 changes: 4 additions & 0 deletions kernel/softirq.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ asmlinkage void __do_softirq(void)
int cpu;

pending = local_softirq_pending();
account_system_vtime(current);

__local_bh_disable((unsigned long)__builtin_return_address(0));
trace_softirq_enter();

Expand Down Expand Up @@ -224,6 +226,8 @@ asmlinkage void __do_softirq(void)
wakeup_softirqd();

trace_softirq_exit();

account_system_vtime(current);
_local_bh_enable();
}

Expand Down

0 comments on commit 829035f

Please sign in to comment.