From 77f2878b4f78c0b29c4a2580665a446c77901152 Mon Sep 17 00:00:00 2001 From: Jan Blunck Date: Wed, 14 Nov 2007 17:00:42 -0800 Subject: [PATCH] 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 --- include/asm-x86/ptrace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h index 213c97300c..51ddb25908 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); -- 2.39.5