Skip to content

Commit a809d46

Browse files
committed
MIPS: Fix gigaton of warning building with microMIPS.
With binutils 2.24 the attempt to switch with microMIPS mode to MIPS III mode through .set mips3 results in *lots* of warnings like {standard input}: Assembler messages: {standard input}:397: Warning: the 64-bit MIPS architecture does not support the `smartmips' extension during a kernel build. Fixed by using .set arch=r4000 instead. This breaks support for building the kernel with binutils 2.13 which was supported for 32 bit kernels only anyway and 2.14 which was a bad vintage for MIPS anyway. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 30ee615 commit a809d46

18 files changed

Lines changed: 84 additions & 84 deletions

File tree

‎arch/mips/alchemy/common/sleeper.S‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ LEAF(alchemy_sleep_au1000)
9595

9696
/* cache following instructions, as memory gets put to sleep */
9797
la t0, 1f
98-
.set mips3
98+
.set arch=r4000
9999
cache 0x14, 0(t0)
100100
cache 0x14, 32(t0)
101101
cache 0x14, 64(t0)
@@ -121,7 +121,7 @@ LEAF(alchemy_sleep_au1550)
121121

122122
/* cache following instructions, as memory gets put to sleep */
123123
la t0, 1f
124-
.set mips3
124+
.set arch=r4000
125125
cache 0x14, 0(t0)
126126
cache 0x14, 32(t0)
127127
cache 0x14, 64(t0)
@@ -163,7 +163,7 @@ LEAF(alchemy_sleep_au1300)
163163
la t1, 4f
164164
subu t2, t1, t0
165165

166-
.set mips3
166+
.set arch=r4000
167167

168168
1: cache 0x14, 0(t0)
169169
subu t2, t2, 32

‎arch/mips/include/asm/asm.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ symbol = value
146146

147147
#define PREF(hint,addr) \
148148
.set push; \
149-
.set mips4; \
149+
.set arch=r5000; \
150150
pref hint, addr; \
151151
.set pop
152152

@@ -159,7 +159,7 @@ symbol = value
159159

160160
#define PREFX(hint,addr) \
161161
.set push; \
162-
.set mips4; \
162+
.set arch=r5000; \
163163
prefx hint, addr; \
164164
.set pop
165165

‎arch/mips/include/asm/atomic.h‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static __inline__ void atomic_add(int i, atomic_t * v)
5353
int temp;
5454

5555
__asm__ __volatile__(
56-
" .set mips3 \n"
56+
" .set arch=r4000 \n"
5757
"1: ll %0, %1 # atomic_add \n"
5858
" addu %0, %2 \n"
5959
" sc %0, %1 \n"
@@ -66,7 +66,7 @@ static __inline__ void atomic_add(int i, atomic_t * v)
6666

6767
do {
6868
__asm__ __volatile__(
69-
" .set mips3 \n"
69+
" .set arch=r4000 \n"
7070
" ll %0, %1 # atomic_add \n"
7171
" addu %0, %2 \n"
7272
" sc %0, %1 \n"
@@ -96,7 +96,7 @@ static __inline__ void atomic_sub(int i, atomic_t * v)
9696
int temp;
9797

9898
__asm__ __volatile__(
99-
" .set mips3 \n"
99+
" .set arch=r4000 \n"
100100
"1: ll %0, %1 # atomic_sub \n"
101101
" subu %0, %2 \n"
102102
" sc %0, %1 \n"
@@ -109,7 +109,7 @@ static __inline__ void atomic_sub(int i, atomic_t * v)
109109

110110
do {
111111
__asm__ __volatile__(
112-
" .set mips3 \n"
112+
" .set arch=r4000 \n"
113113
" ll %0, %1 # atomic_sub \n"
114114
" subu %0, %2 \n"
115115
" sc %0, %1 \n"
@@ -139,7 +139,7 @@ static __inline__ int atomic_add_return(int i, atomic_t * v)
139139
int temp;
140140

141141
__asm__ __volatile__(
142-
" .set mips3 \n"
142+
" .set arch=r4000 \n"
143143
"1: ll %1, %2 # atomic_add_return \n"
144144
" addu %0, %1, %3 \n"
145145
" sc %0, %2 \n"
@@ -153,7 +153,7 @@ static __inline__ int atomic_add_return(int i, atomic_t * v)
153153

154154
do {
155155
__asm__ __volatile__(
156-
" .set mips3 \n"
156+
" .set arch=r4000 \n"
157157
" ll %1, %2 # atomic_add_return \n"
158158
" addu %0, %1, %3 \n"
159159
" sc %0, %2 \n"
@@ -188,7 +188,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v)
188188
int temp;
189189

190190
__asm__ __volatile__(
191-
" .set mips3 \n"
191+
" .set arch=r4000 \n"
192192
"1: ll %1, %2 # atomic_sub_return \n"
193193
" subu %0, %1, %3 \n"
194194
" sc %0, %2 \n"
@@ -205,7 +205,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v)
205205

206206
do {
207207
__asm__ __volatile__(
208-
" .set mips3 \n"
208+
" .set arch=r4000 \n"
209209
" ll %1, %2 # atomic_sub_return \n"
210210
" subu %0, %1, %3 \n"
211211
" sc %0, %2 \n"
@@ -248,7 +248,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
248248
int temp;
249249

250250
__asm__ __volatile__(
251-
" .set mips3 \n"
251+
" .set arch=r4000 \n"
252252
"1: ll %1, %2 # atomic_sub_if_positive\n"
253253
" subu %0, %1, %3 \n"
254254
" bltz %0, 1f \n"
@@ -266,7 +266,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v)
266266
int temp;
267267

268268
__asm__ __volatile__(
269-
" .set mips3 \n"
269+
" .set arch=r4000 \n"
270270
"1: ll %1, %2 # atomic_sub_if_positive\n"
271271
" subu %0, %1, %3 \n"
272272
" bltz %0, 1f \n"
@@ -420,7 +420,7 @@ static __inline__ void atomic64_add(long i, atomic64_t * v)
420420
long temp;
421421

422422
__asm__ __volatile__(
423-
" .set mips3 \n"
423+
" .set arch=r4000 \n"
424424
"1: lld %0, %1 # atomic64_add \n"
425425
" daddu %0, %2 \n"
426426
" scd %0, %1 \n"
@@ -433,7 +433,7 @@ static __inline__ void atomic64_add(long i, atomic64_t * v)
433433

434434
do {
435435
__asm__ __volatile__(
436-
" .set mips3 \n"
436+
" .set arch=r4000 \n"
437437
" lld %0, %1 # atomic64_add \n"
438438
" daddu %0, %2 \n"
439439
" scd %0, %1 \n"
@@ -463,7 +463,7 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v)
463463
long temp;
464464

465465
__asm__ __volatile__(
466-
" .set mips3 \n"
466+
" .set arch=r4000 \n"
467467
"1: lld %0, %1 # atomic64_sub \n"
468468
" dsubu %0, %2 \n"
469469
" scd %0, %1 \n"
@@ -476,7 +476,7 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v)
476476

477477
do {
478478
__asm__ __volatile__(
479-
" .set mips3 \n"
479+
" .set arch=r4000 \n"
480480
" lld %0, %1 # atomic64_sub \n"
481481
" dsubu %0, %2 \n"
482482
" scd %0, %1 \n"
@@ -506,7 +506,7 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v)
506506
long temp;
507507

508508
__asm__ __volatile__(
509-
" .set mips3 \n"
509+
" .set arch=r4000 \n"
510510
"1: lld %1, %2 # atomic64_add_return \n"
511511
" daddu %0, %1, %3 \n"
512512
" scd %0, %2 \n"
@@ -520,7 +520,7 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v)
520520

521521
do {
522522
__asm__ __volatile__(
523-
" .set mips3 \n"
523+
" .set arch=r4000 \n"
524524
" lld %1, %2 # atomic64_add_return \n"
525525
" daddu %0, %1, %3 \n"
526526
" scd %0, %2 \n"
@@ -556,7 +556,7 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
556556
long temp;
557557

558558
__asm__ __volatile__(
559-
" .set mips3 \n"
559+
" .set arch=r4000 \n"
560560
"1: lld %1, %2 # atomic64_sub_return \n"
561561
" dsubu %0, %1, %3 \n"
562562
" scd %0, %2 \n"
@@ -571,7 +571,7 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
571571

572572
do {
573573
__asm__ __volatile__(
574-
" .set mips3 \n"
574+
" .set arch=r4000 \n"
575575
" lld %1, %2 # atomic64_sub_return \n"
576576
" dsubu %0, %1, %3 \n"
577577
" scd %0, %2 \n"
@@ -615,7 +615,7 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
615615
long temp;
616616

617617
__asm__ __volatile__(
618-
" .set mips3 \n"
618+
" .set arch=r4000 \n"
619619
"1: lld %1, %2 # atomic64_sub_if_positive\n"
620620
" dsubu %0, %1, %3 \n"
621621
" bltz %0, 1f \n"
@@ -633,7 +633,7 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v)
633633
long temp;
634634

635635
__asm__ __volatile__(
636-
" .set mips3 \n"
636+
" .set arch=r4000 \n"
637637
"1: lld %1, %2 # atomic64_sub_if_positive\n"
638638
" dsubu %0, %1, %3 \n"
639639
" bltz %0, 1f \n"

‎arch/mips/include/asm/bitops.h‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
7979

8080
if (kernel_uses_llsc && R10000_LLSC_WAR) {
8181
__asm__ __volatile__(
82-
" .set mips3 \n"
82+
" .set arch=r4000 \n"
8383
"1: " __LL "%0, %1 # set_bit \n"
8484
" or %0, %2 \n"
8585
" " __SC "%0, %1 \n"
@@ -101,7 +101,7 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
101101
} else if (kernel_uses_llsc) {
102102
do {
103103
__asm__ __volatile__(
104-
" .set mips3 \n"
104+
" .set arch=r4000 \n"
105105
" " __LL "%0, %1 # set_bit \n"
106106
" or %0, %2 \n"
107107
" " __SC "%0, %1 \n"
@@ -131,7 +131,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
131131

132132
if (kernel_uses_llsc && R10000_LLSC_WAR) {
133133
__asm__ __volatile__(
134-
" .set mips3 \n"
134+
" .set arch=r4000 \n"
135135
"1: " __LL "%0, %1 # clear_bit \n"
136136
" and %0, %2 \n"
137137
" " __SC "%0, %1 \n"
@@ -153,7 +153,7 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
153153
} else if (kernel_uses_llsc) {
154154
do {
155155
__asm__ __volatile__(
156-
" .set mips3 \n"
156+
" .set arch=r4000 \n"
157157
" " __LL "%0, %1 # clear_bit \n"
158158
" and %0, %2 \n"
159159
" " __SC "%0, %1 \n"
@@ -197,7 +197,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
197197
unsigned long temp;
198198

199199
__asm__ __volatile__(
200-
" .set mips3 \n"
200+
" .set arch=r4000 \n"
201201
"1: " __LL "%0, %1 # change_bit \n"
202202
" xor %0, %2 \n"
203203
" " __SC "%0, %1 \n"
@@ -211,7 +211,7 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr)
211211

212212
do {
213213
__asm__ __volatile__(
214-
" .set mips3 \n"
214+
" .set arch=r4000 \n"
215215
" " __LL "%0, %1 # change_bit \n"
216216
" xor %0, %2 \n"
217217
" " __SC "%0, %1 \n"
@@ -244,7 +244,7 @@ static inline int test_and_set_bit(unsigned long nr,
244244
unsigned long temp;
245245

246246
__asm__ __volatile__(
247-
" .set mips3 \n"
247+
" .set arch=r4000 \n"
248248
"1: " __LL "%0, %1 # test_and_set_bit \n"
249249
" or %2, %0, %3 \n"
250250
" " __SC "%2, %1 \n"
@@ -260,7 +260,7 @@ static inline int test_and_set_bit(unsigned long nr,
260260

261261
do {
262262
__asm__ __volatile__(
263-
" .set mips3 \n"
263+
" .set arch=r4000 \n"
264264
" " __LL "%0, %1 # test_and_set_bit \n"
265265
" or %2, %0, %3 \n"
266266
" " __SC "%2, %1 \n"
@@ -298,7 +298,7 @@ static inline int test_and_set_bit_lock(unsigned long nr,
298298
unsigned long temp;
299299

300300
__asm__ __volatile__(
301-
" .set mips3 \n"
301+
" .set arch=r4000 \n"
302302
"1: " __LL "%0, %1 # test_and_set_bit \n"
303303
" or %2, %0, %3 \n"
304304
" " __SC "%2, %1 \n"
@@ -314,7 +314,7 @@ static inline int test_and_set_bit_lock(unsigned long nr,
314314

315315
do {
316316
__asm__ __volatile__(
317-
" .set mips3 \n"
317+
" .set arch=r4000 \n"
318318
" " __LL "%0, %1 # test_and_set_bit \n"
319319
" or %2, %0, %3 \n"
320320
" " __SC "%2, %1 \n"
@@ -353,7 +353,7 @@ static inline int test_and_clear_bit(unsigned long nr,
353353
unsigned long temp;
354354

355355
__asm__ __volatile__(
356-
" .set mips3 \n"
356+
" .set arch=r4000 \n"
357357
"1: " __LL "%0, %1 # test_and_clear_bit \n"
358358
" or %2, %0, %3 \n"
359359
" xor %2, %3 \n"
@@ -386,7 +386,7 @@ static inline int test_and_clear_bit(unsigned long nr,
386386

387387
do {
388388
__asm__ __volatile__(
389-
" .set mips3 \n"
389+
" .set arch=r4000 \n"
390390
" " __LL "%0, %1 # test_and_clear_bit \n"
391391
" or %2, %0, %3 \n"
392392
" xor %2, %3 \n"
@@ -427,7 +427,7 @@ static inline int test_and_change_bit(unsigned long nr,
427427
unsigned long temp;
428428

429429
__asm__ __volatile__(
430-
" .set mips3 \n"
430+
" .set arch=r4000 \n"
431431
"1: " __LL "%0, %1 # test_and_change_bit \n"
432432
" xor %2, %0, %3 \n"
433433
" " __SC "%2, %1 \n"
@@ -443,7 +443,7 @@ static inline int test_and_change_bit(unsigned long nr,
443443

444444
do {
445445
__asm__ __volatile__(
446-
" .set mips3 \n"
446+
" .set arch=r4000 \n"
447447
" " __LL "%0, %1 # test_and_change_bit \n"
448448
" xor %2, %0, %3 \n"
449449
" " __SC "\t%2, %1 \n"

0 commit comments

Comments
 (0)