From: Jan Blunck Date: Thu, 15 Nov 2007 01:00:42 +0000 (-0800) Subject: oprofile: fix oops on x86 32-bit X-Git-Tag: v2.6.24-rc3~47 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=77f2878b4f78c0b29c4a2580665a446c77901152 oprofile: fix oops on x86 32-bit x86 32-bit isn't saving the stack pointer to pt_regs->esp when an interrupt occurs. Signed-off-by: Jan Blunck Tested-by: Robert Fitzsimons Cc: Andi Kleen Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Philippe Elie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h index 213c97300cb3..51ddb2590870 100644 --- a/include/asm-x86/ptrace.h +++ b/include/asm-x86/ptrace.h @@ -60,7 +60,7 @@ static inline int v8086_mode(struct pt_regs *regs) #define instruction_pointer(regs) ((regs)->eip) #define frame_pointer(regs) ((regs)->ebp) -#define stack_pointer(regs) ((regs)->esp) +#define stack_pointer(regs) ((unsigned long)(regs)) #define regs_return_value(regs) ((regs)->eax) extern unsigned long profile_pc(struct pt_regs *regs);