Commit a5d157e0 authored by Björn Steinbrink's avatar Björn Steinbrink Committed by Linus Torvalds

[PATCH] i386: Fix softirq accounting with 4K stacks

Copy the softirq bits in preempt_count from the current context into the
hardirq context when using 4K stacks to make the softirq_count macro work
correctly and thereby fix softirq cpu time accounting.
Signed-off-by: default avatarBjörn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: default avatarArjan van de Ven <arjan@linux.intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1d77062b
...@@ -95,6 +95,14 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs) ...@@ -95,6 +95,14 @@ fastcall unsigned int do_IRQ(struct pt_regs *regs)
irqctx->tinfo.task = curctx->tinfo.task; irqctx->tinfo.task = curctx->tinfo.task;
irqctx->tinfo.previous_esp = current_stack_pointer; irqctx->tinfo.previous_esp = current_stack_pointer;
/*
* Copy the softirq bits in preempt_count so that the
* softirq checks work in the hardirq context.
*/
irqctx->tinfo.preempt_count =
irqctx->tinfo.preempt_count & ~SOFTIRQ_MASK |
curctx->tinfo.preempt_count & SOFTIRQ_MASK;
asm volatile( asm volatile(
" xchgl %%ebx,%%esp \n" " xchgl %%ebx,%%esp \n"
" call __do_IRQ \n" " call __do_IRQ \n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment