Skip to content

Commit 40db936

Browse files
Eugeniy Paltsevvineetgarc
authored andcommitted
ARC: guard dsp early init against non ARCv2
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. Fixes: 4827d0c ("ARC: handle DSP presence in HW") Reported-by: Angelo Ribeiro <[email protected]> Suggested-by: Jose Abreu <[email protected]> Signed-off-by: Eugeniy Paltsev <[email protected]> Signed-off-by: Vineet Gupta <[email protected]>
1 parent 799587d commit 40db936

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/arc/include/asm/dsp-impl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515

1616
/* clobbers r5 register */
1717
.macro DSP_EARLY_INIT
18+
#ifdef CONFIG_ISA_ARCV2
1819
lr r5, [ARC_AUX_DSP_BUILD]
1920
bmsk r5, r5, 7
2021
breq r5, 0, 1f
2122
mov r5, DSP_CTRL_DISABLED_ALL
2223
sr r5, [ARC_AUX_DSP_CTRL]
2324
1:
25+
#endif
2426
.endm
2527

2628
/* clobbers r10, r11 registers pair */

0 commit comments

Comments
 (0)