提交 dec8b1ca 编写于 作者: F Franck Bui-Huu 提交者: Ralf Baechle

[MIPS] Add BUG_ON assertion for attempt to run kernel on the wrong CPU type.

Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 89a8a5a6
......@@ -922,6 +922,14 @@ __init void cpu_probe(void)
default:
c->cputype = CPU_UNKNOWN;
}
/*
* Platform code can force the cpu type to optimize code
* generation. In that case be sure the cpu type is correctly
* manually setup otherwise it could trigger some nasty bugs.
*/
BUG_ON(current_cpu_type() != c->cputype);
if (c->options & MIPS_CPU_FPU) {
c->fpu_id = cpu_get_fpu_id();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册