提交 047ff68b 编写于 作者: S Sander Vanheule 提交者: Thomas Bogendoerfer

MIPS: only register MT SMP ops if MT is supported

Verify that the current CPU actually supports multi-threading before
registering MT SMP ops, instead of unconditionally registering them if
the kernel is compiled with CONFIG_MIPS_MT_SMP.
Suggested-by: NJiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: NSander Vanheule <sander@svanheule.net>
Signed-off-by: NThomas Bogendoerfer <tsbogend@alpha.franken.de>
上级 95339b70
......@@ -101,6 +101,9 @@ static inline int register_vsmp_smp_ops(void)
#ifdef CONFIG_MIPS_MT_SMP
extern const struct plat_smp_ops vsmp_smp_ops;
if (!cpu_has_mipsmt)
return -ENODEV;
register_smp_ops(&vsmp_smp_ops);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册