
From: <pluto@pld-linux.org>


Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/i386/kernel/irq.c         |    4 ++--
 25-akpm/include/asm-i386/thread_info.h |    7 +------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff -puN arch/i386/kernel/irq.c~optimize-stack-pointer-access-reduce-register-usage arch/i386/kernel/irq.c
--- 25/arch/i386/kernel/irq.c~optimize-stack-pointer-access-reduce-register-usage	2004-11-07 22:37:11.986711424 -0800
+++ 25-akpm/arch/i386/kernel/irq.c	2004-11-07 22:37:11.991710664 -0800
@@ -87,7 +87,7 @@ fastcall unsigned int do_IRQ(struct pt_r
 		/* build the stack frame on the IRQ stack */
 		isp = (u32*) ((char*)irqctx + sizeof(*irqctx));
 		irqctx->tinfo.task = curctx->tinfo.task;
-		irqctx->tinfo.previous_esp = current_stack_pointer();
+		irqctx->tinfo.previous_esp = current_stack_pointer;
 
 		asm volatile(
 			"       xchgl   %%ebx,%%esp      \n"
@@ -168,7 +168,7 @@ asmlinkage void do_softirq(void)
 		curctx = current_thread_info();
 		irqctx = softirq_ctx[smp_processor_id()];
 		irqctx->tinfo.task = curctx->task;
-		irqctx->tinfo.previous_esp = current_stack_pointer();
+		irqctx->tinfo.previous_esp = current_stack_pointer;
 
 		/* build the stack frame on the softirq stack */
 		isp = (u32*) ((char*)irqctx + sizeof(*irqctx));
diff -puN include/asm-i386/thread_info.h~optimize-stack-pointer-access-reduce-register-usage include/asm-i386/thread_info.h
--- 25/include/asm-i386/thread_info.h~optimize-stack-pointer-access-reduce-register-usage	2004-11-07 22:37:11.987711272 -0800
+++ 25-akpm/include/asm-i386/thread_info.h	2004-11-07 22:37:11.992710512 -0800
@@ -92,12 +92,7 @@ static inline struct thread_info *curren
 }
 
 /* how to get the current stack pointer from C */
-static inline unsigned long current_stack_pointer(void)
-{
-	unsigned long ti;
-	__asm__("movl %%esp,%0; ":"=r" (ti) : );
-	return ti;
-}
+register unsigned long current_stack_pointer asm("esp");
 
 /* thread information allocation */
 #ifdef CONFIG_DEBUG_STACK_USAGE
_
