* [PATCH] MIPS: CPS: Guard mips_mt_set_cpuoptions call
@ 2015-06-18 15:30 Tony Wu
2015-06-18 15:38 ` Markos Chandras
0 siblings, 1 reply; 3+ messages in thread
From: Tony Wu @ 2015-06-18 15:30 UTC (permalink / raw)
To: linux-mips, ralf; +Cc: Paul Burton
Guard mips_mt_set_cpuoptions with MT specific options to
avoid undefined reference error on multicore platform
without multithreading support.
Signed-off-by: Tony Wu <tung7970@gmail.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
---
arch/mips/kernel/smp-cps.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c
index 5570bc8..85633d6 100644
--- a/arch/mips/kernel/smp-cps.c
+++ b/arch/mips/kernel/smp-cps.c
@@ -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;
--
1.7.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: CPS: Guard mips_mt_set_cpuoptions call
@ 2015-06-18 15:38 ` Markos Chandras
0 siblings, 0 replies; 3+ messages in thread
From: Markos Chandras @ 2015-06-18 15:38 UTC (permalink / raw)
To: Tony Wu, linux-mips, ralf; +Cc: Paul Burton
On 06/18/2015 04:30 PM, Tony Wu wrote:
> Guard mips_mt_set_cpuoptions with MT specific options to
> avoid undefined reference error on multicore platform
> without multithreading support.
>
> Signed-off-by: Tony Wu <tung7970@gmail.com>
> Cc: Paul Burton <paul.burton@imgtec.com>
> Cc: linux-mips@linux-mips.org
> ---
> arch/mips/kernel/smp-cps.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c
> index 5570bc8..85633d6 100644
> --- a/arch/mips/kernel/smp-cps.c
> +++ b/arch/mips/kernel/smp-cps.c
> @@ -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?
--
markos
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: CPS: Guard mips_mt_set_cpuoptions call
@ 2015-06-18 15:38 ` Markos Chandras
0 siblings, 0 replies; 3+ messages in thread
From: Markos Chandras @ 2015-06-18 15:38 UTC (permalink / raw)
To: Tony Wu, linux-mips, ralf; +Cc: Paul Burton
On 06/18/2015 04:30 PM, Tony Wu wrote:
> Guard mips_mt_set_cpuoptions with MT specific options to
> avoid undefined reference error on multicore platform
> without multithreading support.
>
> Signed-off-by: Tony Wu <tung7970@gmail.com>
> Cc: Paul Burton <paul.burton@imgtec.com>
> Cc: linux-mips@linux-mips.org
> ---
> arch/mips/kernel/smp-cps.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c
> index 5570bc8..85633d6 100644
> --- a/arch/mips/kernel/smp-cps.c
> +++ b/arch/mips/kernel/smp-cps.c
> @@ -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?
--
markos
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-18 15:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-18 15:30 [PATCH] MIPS: CPS: Guard mips_mt_set_cpuoptions call Tony Wu
2015-06-18 15:38 ` Markos Chandras
2015-06-18 15:38 ` Markos Chandras
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.