提交 82409411 编写于 作者: A akpm@osdl.org 提交者: Linus Torvalds

[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: NVivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 aed615a9
......@@ -108,8 +108,10 @@ static void crash_setup_regs(struct pt_regs *newregs, struct pt_regs *oldregs)
{
memcpy(newregs, oldregs, sizeof(*newregs));
newregs->esp = (unsigned long)&(oldregs->esp);
__asm__ __volatile__("xorl %eax, %eax;");
__asm__ __volatile__ ("movw %%ss, %%ax;" :"=a"(newregs->xss));
__asm__ __volatile__(
"xorl %%eax, %%eax\n\t"
"movw %%ss, %%ax\n\t"
:"=a"(newregs->xss));
}
/* We may have saved_regs from where the error came from
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册