Part 1/4 of the perfctr interrupt fixes:
- Move perfctr_suspend_thread() call from __switch_to()
to the beginning of switch_to(). Ensures that suspend
actions are done when the owner task still is 'current'.
Signed-off-by: Mikael Pettersson <[email protected]>
arch/i386/kernel/process.c | 2 --
include/asm-i386/system.h | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff -rupN linux-2.6.10-rc1-mm4/arch/i386/kernel/process.c linux-2.6.10-rc1-mm4.perfctr-x86-core-update/arch/i386/kernel/process.c
--- linux-2.6.10-rc1-mm4/arch/i386/kernel/process.c 2004-11-10 18:02:47.000000000 +0100
+++ linux-2.6.10-rc1-mm4.perfctr-x86-core-update/arch/i386/kernel/process.c 2004-11-11 00:19:11.294844304 +0100
@@ -600,8 +600,6 @@ struct task_struct fastcall * __switch_t
/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
- perfctr_suspend_thread(prev);
-
__unlazy_fpu(prev_p);
/*
diff -rupN linux-2.6.10-rc1-mm4/include/asm-i386/system.h linux-2.6.10-rc1-mm4.perfctr-x86-core-update/include/asm-i386/system.h
--- linux-2.6.10-rc1-mm4/include/asm-i386/system.h 2004-10-28 19:28:41.000000000 +0200
+++ linux-2.6.10-rc1-mm4.perfctr-x86-core-update/include/asm-i386/system.h 2004-11-11 00:19:39.000000000 +0100
@@ -14,6 +14,7 @@ extern struct task_struct * FASTCALL(__s
#define switch_to(prev,next,last) do { \
unsigned long esi,edi; \
+ perfctr_suspend_thread(&(prev)->thread); \
asm volatile("pushfl\n\t" \
"pushl %%ebp\n\t" \
"movl %%esp,%0\n\t" /* save ESP */ \