diff options
author | Allan Graves <allan.graves@oracle.com> | 2005-10-04 14:53:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-04 16:22:01 -0400 |
commit | fad1c45c939bb246a488be1fa06f539e85b80545 (patch) | |
tree | 2a368da0e73817083caed84f4fe8085fcb654554 /include/asm-um/processor-generic.h | |
parent | 71dc036247573e377703233af289019f4aa3176e (diff) |
[PATCH] uml: Fix sysrq-r support for skas mode
The old code had the IP and SP coming from the registers in the thread
struct, which are completely wrong since those are the userspace
registers. This fixes that by pulling the correct values from the
jmp_buf in which the kernel state of each thread is stored.
Signed-off-by: Allan Graves <allan.graves@oracle.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-um/processor-generic.h')
-rw-r--r-- | include/asm-um/processor-generic.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h index 2d242360c3d6..075771c371f6 100644 --- a/include/asm-um/processor-generic.h +++ b/include/asm-um/processor-generic.h | |||
@@ -13,6 +13,7 @@ struct task_struct; | |||
13 | #include "linux/config.h" | 13 | #include "linux/config.h" |
14 | #include "asm/ptrace.h" | 14 | #include "asm/ptrace.h" |
15 | #include "choose-mode.h" | 15 | #include "choose-mode.h" |
16 | #include "registers.h" | ||
16 | 17 | ||
17 | struct mm_struct; | 18 | struct mm_struct; |
18 | 19 | ||
@@ -136,19 +137,15 @@ extern struct cpuinfo_um cpu_data[]; | |||
136 | #define current_cpu_data boot_cpu_data | 137 | #define current_cpu_data boot_cpu_data |
137 | #endif | 138 | #endif |
138 | 139 | ||
139 | #define KSTK_EIP(tsk) (PT_REGS_IP(&tsk->thread.regs)) | ||
140 | #define KSTK_ESP(tsk) (PT_REGS_SP(&tsk->thread.regs)) | ||
141 | #define get_wchan(p) (0) | ||
142 | 140 | ||
141 | #ifdef CONFIG_MODE_SKAS | ||
142 | #define KSTK_REG(tsk, reg) \ | ||
143 | ({ union uml_pt_regs regs; \ | ||
144 | get_thread_regs(®s, tsk->thread.mode.skas.switch_buf); \ | ||
145 | UPT_REG(®s, reg); }) | ||
146 | #else | ||
147 | #define KSTK_REG(tsk, reg) (0xbadbabe) | ||
143 | #endif | 148 | #endif |
149 | #define get_wchan(p) (0) | ||
144 | 150 | ||
145 | /* | 151 | #endif |
146 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
147 | * Emacs will notice this stuff at the end of the file and automatically | ||
148 | * adjust the settings for this buffer only. This must remain at the end | ||
149 | * of the file. | ||
150 | * --------------------------------------------------------------------------- | ||
151 | * Local variables: | ||
152 | * c-file-style: "linux" | ||
153 | * End: | ||
154 | */ | ||