MIPS: CPS: Guard mips_mt_set_cpuoptions call
PATCH 1/1 MIPS: CPS: Guard mips_mt_set_cpuoptions call
Guard mips_mt_set_cpuoptions with MT specific options to avoid undefined reference error on multicore platform without multithreading support.
--- arch/mips/kernel/smp-cps.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/mips/kernel/smp-cps.c +2 -1
@@ -102,7 +102,8 @@ static void __init cps_prepare_cpus(unsigned int max_cpus)bool cca_unsuitable;u32 *entry_code; -mips_mt_set_cpuoptions (); +if (config_enabled (CONFIG_MIPS_MT_SMP ) && cpu_has_mipsmt) +mips_mt_set_cpuoptions ();/* Detect whether the CCA is unsuited to multi-core SMP */ cca =read_c0_config () &CONF_CM_CMASK ;
Signature · 1 line
1.7.5
Quoted 17 lines · Tony Wu
Guard
mips_mt_set_cpuoptionswith MT specific options to avoid undefined reference error on multicore platform without multithreading support.--- arch/mips/kernel/smp-cps.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)arch/mips/kernel/smp-cps.c +0
-0
arch/mips/kernel/smp-cps.c static void __init cps_prepare_cpus(unsigned int max_cpus) · line 109
Quoted 9 lines
arch/mips/kernel/smp-cps.c +2
-1@@ -102,7 +102,8 @@ static void __init cps_prepare_cpus(unsigned int max_cpus)bool cca_unsuitable;u32 *entry_code; -mips_mt_set_cpuoptions (); +if (config_enabled (CONFIG_MIPS_MT_SMP ) && cpu_has_mipsmt) +mips_mt_set_cpuoptions ();/* Detect whether the CCA is unsuited to multi-core SMP */ cca =read_c0_config () &CONF_CM_CMASK ;
How come you hit a build problem here? according to arch/mips/include/asm/mips_mt.h the mips_mt_set_cpuoptions() is a NOP when CONFIG_MIPS_MT is not selected so it should work for non-MT multicore CPUs. Am I missing something?
Signature · 1 line
markos