All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: Tony Wu <tung7970@gmail.com>, <linux-mips@linux-mips.org>,
	<ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@imgtec.com>
Subject: Re: [PATCH] MIPS: CPS: Guard mips_mt_set_cpuoptions call
Date: Thu, 18 Jun 2015 16:38:13 +0100	[thread overview]
Message-ID: <5582E5E5.6080005@imgtec.com> (raw)
In-Reply-To: <20150618232909-tung7970@googlemail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: Tony Wu <tung7970@gmail.com>,
	linux-mips@linux-mips.org, ralf@linux-mips.org
Cc: Paul Burton <paul.burton@imgtec.com>
Subject: Re: [PATCH] MIPS: CPS: Guard mips_mt_set_cpuoptions call
Date: Thu, 18 Jun 2015 16:38:13 +0100	[thread overview]
Message-ID: <5582E5E5.6080005@imgtec.com> (raw)
Message-ID: <20150618153813.qKzr7oWpD76CEZYKn_jdfwNy-0-1k8IDQo0AtImnUjE@z> (raw)
In-Reply-To: <20150618232909-tung7970@googlemail.com>

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

  reply	other threads:[~2015-06-18 15:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 15:30 [PATCH] MIPS: CPS: Guard mips_mt_set_cpuoptions call Tony Wu
2015-06-18 15:38 ` Markos Chandras [this message]
2015-06-18 15:38   ` Markos Chandras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5582E5E5.6080005@imgtec.com \
    --to=markos.chandras@imgtec.com \
    --cc=linux-mips@linux-mips.org \
    --cc=paul.burton@imgtec.com \
    --cc=ralf@linux-mips.org \
    --cc=tung7970@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.