mirror of
https://github.com/torvalds/linux.git
synced 2024-12-12 22:23:55 +00:00
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: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Sander Vanheule <sander@svanheule.net> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
95339b7067
commit
047ff68b43
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user