diff options
author | akpm@osdl.org <akpm@osdl.org> | 2006-01-09 23:51:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:01:26 -0500 |
commit | 82409411571ad89d271dc46f7fa26149fad9efdf (patch) | |
tree | 3e7523c55a2d883f2a7d9ac3285ed6ebb864fb1b /arch/i386 | |
parent | aed615a95f6dcc243daa99cc80658ad9ada95097 (diff) |
[PATCH] kdump: i386 save ss esp bug fix
)
From: Vivek Goyal <vgoyal@in.ibm.com>
This patch fixes a minor bug based on Andi Kleen's suggestion. asm's can't be
broken in this particular case, hence merging them.
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/kernel/crash.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c index 0248e084017c..10fe6569751e 100644 --- a/arch/i386/kernel/crash.c +++ b/arch/i386/kernel/crash.c | |||
@@ -108,8 +108,10 @@ static void crash_setup_regs(struct pt_regs *newregs, struct pt_regs *oldregs) | |||
108 | { | 108 | { |
109 | memcpy(newregs, oldregs, sizeof(*newregs)); | 109 | memcpy(newregs, oldregs, sizeof(*newregs)); |
110 | newregs->esp = (unsigned long)&(oldregs->esp); | 110 | newregs->esp = (unsigned long)&(oldregs->esp); |
111 | __asm__ __volatile__("xorl %eax, %eax;"); | 111 | __asm__ __volatile__( |
112 | __asm__ __volatile__ ("movw %%ss, %%ax;" :"=a"(newregs->xss)); | 112 | "xorl %%eax, %%eax\n\t" |
113 | "movw %%ss, %%ax\n\t" | ||
114 | :"=a"(newregs->xss)); | ||
113 | } | 115 | } |
114 | 116 | ||
115 | /* We may have saved_regs from where the error came from | 117 | /* We may have saved_regs from where the error came from |