mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,
	"linux-snps-arc@lists.infradead.org" 
	<linux-snps-arc@lists.infradead.org>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ARC: guard dsp early init against non ARCv2
Date: Tue, 28 Apr 2020 19:46:01 +0000	[thread overview]
Message-ID: <08a295ba-e6f0-65d2-cb64-3ea463797f6d@synopsys.com> (raw)
In-Reply-To: <20200428185024.5168-1-Eugeniy.Paltsev@synopsys.com>

On 4/28/20 11:50 AM, Eugeniy Paltsev wrote:
> As of today we guard early DSP init code with
> ARC_AUX_DSP_BUILD (0x7A) BCR check to verify that we have
> CPU with DSP configured. However that's not enough as in
> ARCv1 CPU the same BCR (0x7A) is used for checking MUL/MAC
> instructions presence.
>
> So, let's guard DSP early init against non ARCv2.
>
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
> ---
>  arch/arc/include/asm/dsp-impl.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arc/include/asm/dsp-impl.h b/arch/arc/include/asm/dsp-impl.h
> index e1aa212ca6eb..e64d945ae7df 100644
> --- a/arch/arc/include/asm/dsp-impl.h
> +++ b/arch/arc/include/asm/dsp-impl.h
> @@ -15,12 +15,14 @@
>  
>  /* clobbers r5 register */
>  .macro DSP_EARLY_INIT
> +#if defined(CONFIG_ISA_ARCV2)

ifdef is the canonical way for a single macro to check.

Also, this needs to be finer grained, i.e. CONFIG_ARC_DSP_KERNEL which is already
tied to ARCV2 only configs.

>  	lr	r5, [ARC_AUX_DSP_BUILD]
>  	bmsk	r5, r5, 7
>  	breq    r5, 0, 1f
>  	mov	r5, DSP_CTRL_DISABLED_ALL
>  	sr	r5, [ARC_AUX_DSP_CTRL]
>  1:
> +#endif
>  .endm
>  
>  /* clobbers r10, r11 registers pair */


  reply	other threads:[~2020-04-28 19:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 18:50 Eugeniy Paltsev
2020-04-28 19:46 ` Vineet Gupta [this message]
2020-04-29 17:12   ` Eugeniy Paltsev
2020-04-29 18:50     ` Vineet Gupta
2020-04-29  6:19 ` Jose Abreu
2020-04-29 10:03   ` Angelo Ribeiro

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=08a295ba-e6f0-65d2-cb64-3ea463797f6d@synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome