Skip to content

Commit

Permalink
sh: KSTK_EIP/KSTK_ESP consistency.
Browse files Browse the repository at this point in the history
Two of the fields in /proc/[number]/stat are documented in
proc(5) as:

      kstkesp %lu
	     The current value of esp (stack pointer), as
	     found in the kernel stack page for the process.

      kstkeip %lu
	     The current EIP (instruction pointer).

The SH currently prints the the last SP and PC of the process
inside the kernel, while most other archs use the last user
space values.

This patch modifes the SH to display the user space values.

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Stuart Menefy authored and Paul Mundt committed Dec 6, 2006
1 parent 9b3a53a commit c9f0b1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/asm-sh/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ void show_trace(struct task_struct *tsk, unsigned long *sp,
struct pt_regs *regs);
extern unsigned long get_wchan(struct task_struct *p);

#define KSTK_EIP(tsk) ((tsk)->thread.pc)
#define KSTK_ESP(tsk) ((tsk)->thread.sp)
#define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc)
#define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[15])

#define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory")
#define cpu_relax() barrier()
Expand Down

0 comments on commit c9f0b1c

Please sign in to comment.