diff mbox series

[v2,09/11] MIPS: bmips: Switch to new topology interface

Message ID 20200412032123.3896114-10-jiaxun.yang@flygoat.com (mailing list archive)
State Deferred
Headers show
Series MIPS: Topology & DeviceTree CPU rework v2 | expand

Commit Message

Jiaxun Yang April 12, 2020, 3:20 a.m. UTC
Change the parameter of cpu_set_core from cpudata to cpuid.
Also set cluster id for bmips as it have different method to probe
actual hwid of CPU, and smp_store_cpuinfo is using cluster id to
determine if we should probe topology info again.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 arch/mips/kernel/smp-bmips.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c
index 9058e9dcf080..c40bb37eab38 100644
--- a/arch/mips/kernel/smp-bmips.c
+++ b/arch/mips/kernel/smp-bmips.c
@@ -247,7 +247,8 @@  static void bmips_init_secondary(void)
 		break;
 	case CPU_BMIPS5000:
 		write_c0_brcm_action(ACTION_CLR_IPI(smp_processor_id(), 0));
-		cpu_set_core(&current_cpu_data, (read_c0_brcm_config() >> 25) & 3);
+		cpu_set_core(smp_processor_id(), (read_c0_brcm_config() >> 25) & 3);
+		cpu_set_cluster(smp_processor_id(), 0);
 		break;
 	}
 }