diff options
author | Stuart Menefy <stuart.menefy@st.com> | 2006-11-23 22:53:02 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-12-05 20:45:38 -0500 |
commit | c9f0b1c1410e9e637b819c5050fc8c1f1971e178 (patch) | |
tree | a7f675bcb2a282c0cb5b258b49514c73257eba8d | |
parent | 9b3a53ab76771e3669e50086c131e1574fe25847 (diff) |
sh: KSTK_EIP/KSTK_ESP consistency.
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>
-rw-r--r-- | include/asm-sh/processor.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index 4a90e7cd8199..6f1dd7ca1b1d 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h | |||
@@ -259,8 +259,8 @@ void show_trace(struct task_struct *tsk, unsigned long *sp, | |||
259 | struct pt_regs *regs); | 259 | struct pt_regs *regs); |
260 | extern unsigned long get_wchan(struct task_struct *p); | 260 | extern unsigned long get_wchan(struct task_struct *p); |
261 | 261 | ||
262 | #define KSTK_EIP(tsk) ((tsk)->thread.pc) | 262 | #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc) |
263 | #define KSTK_ESP(tsk) ((tsk)->thread.sp) | 263 | #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[15]) |
264 | 264 | ||
265 | #define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory") | 265 | #define cpu_sleep() __asm__ __volatile__ ("sleep" : : : "memory") |
266 | #define cpu_relax() barrier() | 266 | #define cpu_relax() barrier() |