提交 caad3c2a 编写于 作者: C Chuck Ebbert 提交者: Linus Torvalds

[PATCH] i386: cpu_relax() in crash.c and doublefault.c

Add cpu_relax() to infinite loops in crash.c and doublefault.c.  This is
the safest change.
Signed-off-by: NChuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 18698917
......@@ -114,7 +114,8 @@ static int crash_nmi_callback(struct pt_regs *regs, int cpu)
atomic_dec(&waiting_for_crash_ipi);
/* Assume hlt works */
halt();
for(;;);
for (;;)
cpu_relax();
return 1;
}
......
......@@ -44,7 +44,8 @@ static void doublefault_fn(void)
}
}
for (;;) /* nothing */;
for (;;)
cpu_relax();
}
struct tss_struct doublefault_tss __cacheline_aligned = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册