|
@@ -131,15 +131,13 @@ unsigned long profile_pc(struct pt_regs *regs)
|
|
unsigned long pc = instruction_pointer(regs);
|
|
unsigned long pc = instruction_pointer(regs);
|
|
|
|
|
|
#ifdef CONFIG_SMP
|
|
#ifdef CONFIG_SMP
|
|
- if (!user_mode_vm(regs) && in_lock_functions(pc)) {
|
|
|
|
|
|
+ if (!v8086_mode(regs) && SEGMENT_IS_KERNEL_CODE(regs->xcs) &&
|
|
|
|
+ in_lock_functions(pc)) {
|
|
#ifdef CONFIG_FRAME_POINTER
|
|
#ifdef CONFIG_FRAME_POINTER
|
|
return *(unsigned long *)(regs->ebp + 4);
|
|
return *(unsigned long *)(regs->ebp + 4);
|
|
#else
|
|
#else
|
|
- unsigned long *sp;
|
|
|
|
- if ((regs->xcs & 3) == 0)
|
|
|
|
- sp = (unsigned long *)®s->esp;
|
|
|
|
- else
|
|
|
|
- sp = (unsigned long *)regs->esp;
|
|
|
|
|
|
+ unsigned long *sp = (unsigned long *)®s->esp;
|
|
|
|
+
|
|
/* Return address is either directly at stack pointer
|
|
/* Return address is either directly at stack pointer
|
|
or above a saved eflags. Eflags has bits 22-31 zero,
|
|
or above a saved eflags. Eflags has bits 22-31 zero,
|
|
kernel addresses don't. */
|
|
kernel addresses don't. */
|