Commit 047ff68b authored by Sander Vanheule's avatar Sander Vanheule Committed by Thomas Bogendoerfer
Browse files

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: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: default avatarSander Vanheule <sander@svanheule.net>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 95339b70
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;