Skip to content

Commit e9cbf62

Browse files
James Hoganralfbaechle
authored andcommitted
MIPS: Fix MSA asm warnings in control reg accessors
Building an MSA capable kernel with a toolchain that supports MSA produces warnings such as this: CC arch/mips/kernel/cpu-probe.o {standard input}: Assembler messages: {standard input}:4786: Warning: the `msa' extension requires 64-bit FPRs This is due to ".set msa" without ".set fp=64" in the inline assembly of control register accessors, since MSA requires the 64-bit FPU registers (FR=1). Add the missing fp=64 in these functions to silence the warnings. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13554/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 7bf0d5e commit e9cbf62

File tree

1 file changed

+2
-0
lines changed
  • arch/mips/include/asm

1 file changed

+2
-0
lines changed

arch/mips/include/asm/msa.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ static inline unsigned int read_msa_##name(void) \
168168
unsigned int reg; \
169169
__asm__ __volatile__( \
170170
" .set push\n" \
171+
" .set fp=64\n" \
171172
" .set msa\n" \
172173
" cfcmsa %0, $" #cs "\n" \
173174
" .set pop\n" \
@@ -179,6 +180,7 @@ static inline void write_msa_##name(unsigned int val) \
179180
{ \
180181
__asm__ __volatile__( \
181182
" .set push\n" \
183+
" .set fp=64\n" \
182184
" .set msa\n" \
183185
" ctcmsa $" #cs ", %0\n" \
184186
" .set pop\n" \

0 commit comments

Comments
 (0)