Skip to content

Commit ae2f5e5

Browse files
committed
MIPS: IP22: Fix build error due to binutils 2.25 uselessnes.
Fix the following build error with binutils 2.25. CC arch/mips/mm/sc-ip22.o {standard input}: Assembler messages: {standard input}:132: Error: number (0x9000000080000000) larger than 32 bits {standard input}:159: Error: number (0x9000000080000000) larger than 32 bits {standard input}:200: Error: number (0x9000000080000000) larger than 32 bits scripts/Makefile.build:293: recipe for target 'arch/mips/mm/sc-ip22.o' failed make[1]: *** [arch/mips/mm/sc-ip22.o] Error 1 MIPS has used .set mips3 to temporarily switch the assembler to 64 bit mode in 64 bit kernels virtually forever. Binutils 2.25 broke this behavious partially by happily accepting 64 bit instructions in .set mips3 mode but puking on 64 bit constants when generating 32 bit ELF. Binutils 2.26 restored the old behaviour again. Fix build with binutils 2.25 by open coding the offending dli $1, 0x9000000080000000 as li $1, 0x9000 dsll $1, $1, 48 which is ugly be the only thing that will build on all binutils vintages. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: stable@vger.kernel.org
1 parent f9f1c8d commit ae2f5e5

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

arch/mips/mm/sc-ip22.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,18 @@ static inline void indy_sc_wipe(unsigned long first, unsigned long last)
3939
" li $1, 0x80 # Go 64 bit \n"
4040
" mtc0 $1, $12 \n"
4141
" \n"
42-
" dli $1, 0x9000000080000000 \n"
42+
" # \n"
43+
" # Open code a dli $1, 0x9000000080000000 \n"
44+
" # \n"
45+
" # Required because binutils 2.25 will happily accept \n"
46+
" # 64 bit instructions in .set mips3 mode but puke on \n"
47+
" # 64 bit constants when generating 32 bit ELF \n"
48+
" # \n"
49+
" lui $1,0x9000 \n"
50+
" dsll $1,$1,0x10 \n"
51+
" ori $1,$1,0x8000 \n"
52+
" dsll $1,$1,0x10 \n"
53+
" \n"
4354
" or %0, $1 # first line to flush \n"
4455
" or %1, $1 # last line to flush \n"
4556
" .set at \n"

0 commit comments

Comments
 (0)