* [PATCH] ARC: guard dsp early init against non ARCv2
@ 2020-04-28 18:50 ` Eugeniy Paltsev
0 siblings, 0 replies; 12+ messages in thread
From: Eugeniy Paltsev @ 2020-04-28 18:50 UTC (permalink / raw)
To: linux-snps-arc, Vineet Gupta
Cc: linux-kernel, Alexey Brodkin, Eugeniy Paltsev
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)
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 */
--
2.21.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] ARC: guard dsp early init against non ARCv2
@ 2020-04-28 18:50 ` Eugeniy Paltsev
0 siblings, 0 replies; 12+ messages in thread
From: Eugeniy Paltsev @ 2020-04-28 18:50 UTC (permalink / raw)
To: linux-snps-arc, Vineet Gupta
Cc: Alexey Brodkin, Eugeniy Paltsev, linux-kernel
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)
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 */
--
2.21.1
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] ARC: guard dsp early init against non ARCv2
2020-04-28 18:50 ` Eugeniy Paltsev
@ 2020-04-28 19:46 ` Vineet Gupta
-1 siblings, 0 replies; 12+ messages in thread
From: Vineet Gupta @ 2020-04-28 19:46 UTC (permalink / raw)
To: Eugeniy Paltsev, linux-snps-arc; +Cc: Alexey Brodkin, linux-kernel
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 */
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] ARC: guard dsp early init against non ARCv2
@ 2020-04-28 19:46 ` Vineet Gupta
0 siblings, 0 replies; 12+ messages in thread
From: Vineet Gupta @ 2020-04-28 19:46 UTC (permalink / raw)
To: Eugeniy Paltsev, linux-snps-arc; +Cc: Alexey Brodkin, linux-kernel
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 */
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH] ARC: guard dsp early init against non ARCv2
2020-04-28 18:50 ` Eugeniy Paltsev
@ 2020-04-29 6:19 ` Jose Abreu
-1 siblings, 0 replies; 12+ messages in thread
From: Jose Abreu @ 2020-04-29 6:19 UTC (permalink / raw)
To: Eugeniy Paltsev, linux-snps-arc, Vineet Gupta
Cc: Alexey Brodkin, Eugeniy Paltsev, linux-kernel, Angelo Ribeiro
From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Date: Apr/28/2020, 19:50:24 (UTC+00:00)
> 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>
Reported-by: Angelo Ribeiro
<angelor@synopsys.com>
---
Thanks,
Jose Miguel Abreu
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH] ARC: guard dsp early init against non ARCv2
@ 2020-04-29 6:19 ` Jose Abreu
0 siblings, 0 replies; 12+ messages in thread
From: Jose Abreu @ 2020-04-29 6:19 UTC (permalink / raw)
To: Eugeniy Paltsev, linux-snps-arc, Vineet Gupta
Cc: Angelo Ribeiro, Alexey Brodkin, Eugeniy Paltsev, linux-kernel
From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Date: Apr/28/2020, 19:50:24 (UTC+00:00)
> 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>
Reported-by: Angelo Ribeiro
<angelor@synopsys.com>
---
Thanks,
Jose Miguel Abreu
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH] ARC: guard dsp early init against non ARCv2
2020-04-29 6:19 ` Jose Abreu
@ 2020-04-29 10:03 ` Angelo Ribeiro
-1 siblings, 0 replies; 12+ messages in thread
From: Angelo Ribeiro @ 2020-04-29 10:03 UTC (permalink / raw)
To: Jose Abreu, Eugeniy Paltsev, linux-snps-arc, Vineet Gupta
Cc: Alexey Brodkin, Eugeniy Paltsev, linux-kernel
Hi Eugeniy,
Tested okay on a ARCv1.
Thanks
Angelo
Tested-by: Angelo Ribeiro <angelo.ribeiro@synopsys.com>
From: Jose Abreu <joabreu@synopsys.com>
Date: Wed, Apr 29, 2020 at 07:19:55
> From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
> Date: Apr/28/2020, 19:50:24 (UTC+00:00)
>
> > 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>
>
> Reported-by: Angelo Ribeiro
> <angelor@synopsys.com>
>
> ---
> Thanks,
> Jose Miguel Abreu
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH] ARC: guard dsp early init against non ARCv2
@ 2020-04-29 10:03 ` Angelo Ribeiro
0 siblings, 0 replies; 12+ messages in thread
From: Angelo Ribeiro @ 2020-04-29 10:03 UTC (permalink / raw)
To: Jose Abreu, Eugeniy Paltsev, linux-snps-arc, Vineet Gupta
Cc: Alexey Brodkin, Eugeniy Paltsev, linux-kernel
Hi Eugeniy,
Tested okay on a ARCv1.
Thanks
Angelo
Tested-by: Angelo Ribeiro <angelo.ribeiro@synopsys.com>
From: Jose Abreu <joabreu@synopsys.com>
Date: Wed, Apr 29, 2020 at 07:19:55
> From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
> Date: Apr/28/2020, 19:50:24 (UTC+00:00)
>
> > 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>
>
> Reported-by: Angelo Ribeiro
> <angelor@synopsys.com>
>
> ---
> Thanks,
> Jose Miguel Abreu
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] ARC: guard dsp early init against non ARCv2
2020-04-28 19:46 ` Vineet Gupta
@ 2020-04-29 17:12 ` Eugeniy Paltsev
-1 siblings, 0 replies; 12+ messages in thread
From: Eugeniy Paltsev @ 2020-04-29 17:12 UTC (permalink / raw)
To: Vineet Gupta; +Cc: Alexey Brodkin, linux-kernel, linux-snps-arc
Hi Vineet,
> From: Vineet Gupta <vgupta@synopsys.com>
> Sent: Tuesday, April 28, 2020 22:46
> To: Eugeniy Paltsev; linux-snps-arc@lists.infradead.org
> Cc: Alexey Brodkin; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] ARC: guard dsp early init against non ARCv2
>
> 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.
We shouldn't limit the scope of this code part [dsp early init] to the cases
were DSP support is enabled in kconfig - and that is the reason why this code
initially was guarded with BCR check only.
So, I change the check to
#if defined(CONFIG_ARC_DSP_HANDLED) || defined(CONFIG_ARC_DSP_NONE)
which is actually the equivalent to
#if defined(CONFIG_ISA_ARCV2)
but I don't think it's worth thing to do.
>
> > 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 */
---
Eugeniy Paltsev
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] ARC: guard dsp early init against non ARCv2
@ 2020-04-29 17:12 ` Eugeniy Paltsev
0 siblings, 0 replies; 12+ messages in thread
From: Eugeniy Paltsev @ 2020-04-29 17:12 UTC (permalink / raw)
To: Vineet Gupta; +Cc: linux-snps-arc, Alexey Brodkin, linux-kernel
Hi Vineet,
> From: Vineet Gupta <vgupta@synopsys.com>
> Sent: Tuesday, April 28, 2020 22:46
> To: Eugeniy Paltsev; linux-snps-arc@lists.infradead.org
> Cc: Alexey Brodkin; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] ARC: guard dsp early init against non ARCv2
>
> 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.
We shouldn't limit the scope of this code part [dsp early init] to the cases
were DSP support is enabled in kconfig - and that is the reason why this code
initially was guarded with BCR check only.
So, I change the check to
#if defined(CONFIG_ARC_DSP_HANDLED) || defined(CONFIG_ARC_DSP_NONE)
which is actually the equivalent to
#if defined(CONFIG_ISA_ARCV2)
but I don't think it's worth thing to do.
>
> > 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 */
---
Eugeniy Paltsev
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] ARC: guard dsp early init against non ARCv2
2020-04-29 17:12 ` Eugeniy Paltsev
@ 2020-04-29 18:50 ` Vineet Gupta
-1 siblings, 0 replies; 12+ messages in thread
From: Vineet Gupta @ 2020-04-29 18:50 UTC (permalink / raw)
To: Eugeniy Paltsev; +Cc: Alexey Brodkin, linux-kernel, linux-snps-arc
On 4/29/20 10:12 AM, Eugeniy Paltsev wrote:
> Hi Vineet,
>
>> From: Vineet Gupta <vgupta@synopsys.com>
>> Sent: Tuesday, April 28, 2020 22:46
>> To: Eugeniy Paltsev; linux-snps-arc@lists.infradead.org
>> Cc: Alexey Brodkin; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH] ARC: guard dsp early init against non ARCv2
>>
>> 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.
> We shouldn't limit the scope of this code part [dsp early init] to the cases
> were DSP support is enabled in kconfig - and that is the reason why this code
> initially was guarded with BCR check only.
>
> So, I change the check to
>
> #if defined(CONFIG_ARC_DSP_HANDLED) || defined(CONFIG_ARC_DSP_NONE)
You are right. It needs to be disabled if the hardware exists independent of Kconfig.
> which is actually the equivalent to
>
> #if defined(CONFIG_ISA_ARCV2)
>
> but I don't think it's worth thing to do.
Agree.
-Vineet
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] ARC: guard dsp early init against non ARCv2
@ 2020-04-29 18:50 ` Vineet Gupta
0 siblings, 0 replies; 12+ messages in thread
From: Vineet Gupta @ 2020-04-29 18:50 UTC (permalink / raw)
To: Eugeniy Paltsev; +Cc: linux-snps-arc, Alexey Brodkin, linux-kernel
On 4/29/20 10:12 AM, Eugeniy Paltsev wrote:
> Hi Vineet,
>
>> From: Vineet Gupta <vgupta@synopsys.com>
>> Sent: Tuesday, April 28, 2020 22:46
>> To: Eugeniy Paltsev; linux-snps-arc@lists.infradead.org
>> Cc: Alexey Brodkin; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH] ARC: guard dsp early init against non ARCv2
>>
>> 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.
> We shouldn't limit the scope of this code part [dsp early init] to the cases
> were DSP support is enabled in kconfig - and that is the reason why this code
> initially was guarded with BCR check only.
>
> So, I change the check to
>
> #if defined(CONFIG_ARC_DSP_HANDLED) || defined(CONFIG_ARC_DSP_NONE)
You are right. It needs to be disabled if the hardware exists independent of Kconfig.
> which is actually the equivalent to
>
> #if defined(CONFIG_ISA_ARCV2)
>
> but I don't think it's worth thing to do.
Agree.
-Vineet
_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-04-29 18:50 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 18:50 [PATCH] ARC: guard dsp early init against non ARCv2 Eugeniy Paltsev
2020-04-28 18:50 ` Eugeniy Paltsev
2020-04-28 19:46 ` Vineet Gupta
2020-04-28 19:46 ` Vineet Gupta
2020-04-29 17:12 ` Eugeniy Paltsev
2020-04-29 17:12 ` Eugeniy Paltsev
2020-04-29 18:50 ` Vineet Gupta
2020-04-29 18:50 ` Vineet Gupta
2020-04-29 6:19 ` Jose Abreu
2020-04-29 6:19 ` Jose Abreu
2020-04-29 10:03 ` Angelo Ribeiro
2020-04-29 10:03 ` Angelo Ribeiro
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.