Skip to content

Commit f62b762

Browse files
Jun Yichenhuacai
authored andcommitted
LoongArch: Remove useless header compiler.h
The content of LoongArch's compiler.h is trivial, with some unused anywhere, so inline the definitions and remove the header. Signed-off-by: Jun Yi <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent ab6e57a commit f62b762

File tree

8 files changed

+6
-32
lines changed

8 files changed

+6
-32
lines changed

arch/loongarch/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ config LOONGARCH
6969
select GENERIC_TIME_VSYSCALL
7070
select GPIOLIB
7171
select HAVE_ARCH_AUDITSYSCALL
72-
select HAVE_ARCH_COMPILER_H
7372
select HAVE_ARCH_MMAP_RND_BITS if MMU
7473
select HAVE_ARCH_SECCOMP_FILTER
7574
select HAVE_ARCH_TRACEHOOK

arch/loongarch/include/asm/atomic.h

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <linux/types.h>
1111
#include <asm/barrier.h>
1212
#include <asm/cmpxchg.h>
13-
#include <asm/compiler.h>
1413

1514
#if __SIZEOF_LONG__ == 4
1615
#define __LL "ll.w "
@@ -163,8 +162,7 @@ static inline int arch_atomic_sub_if_positive(int i, atomic_t *v)
163162
" beqz %1, 1b \n"
164163
"2: \n"
165164
__WEAK_LLSC_MB
166-
: "=&r" (result), "=&r" (temp),
167-
"+" GCC_OFF_SMALL_ASM() (v->counter)
165+
: "=&r" (result), "=&r" (temp), "+ZC" (v->counter)
168166
: "I" (-i));
169167
} else {
170168
__asm__ __volatile__(
@@ -176,8 +174,7 @@ static inline int arch_atomic_sub_if_positive(int i, atomic_t *v)
176174
" beqz %1, 1b \n"
177175
"2: \n"
178176
__WEAK_LLSC_MB
179-
: "=&r" (result), "=&r" (temp),
180-
"+" GCC_OFF_SMALL_ASM() (v->counter)
177+
: "=&r" (result), "=&r" (temp), "+ZC" (v->counter)
181178
: "r" (i));
182179
}
183180

@@ -326,8 +323,7 @@ static inline long arch_atomic64_sub_if_positive(long i, atomic64_t *v)
326323
" beqz %1, 1b \n"
327324
"2: \n"
328325
__WEAK_LLSC_MB
329-
: "=&r" (result), "=&r" (temp),
330-
"+" GCC_OFF_SMALL_ASM() (v->counter)
326+
: "=&r" (result), "=&r" (temp), "+ZC" (v->counter)
331327
: "I" (-i));
332328
} else {
333329
__asm__ __volatile__(
@@ -339,8 +335,7 @@ static inline long arch_atomic64_sub_if_positive(long i, atomic64_t *v)
339335
" beqz %1, 1b \n"
340336
"2: \n"
341337
__WEAK_LLSC_MB
342-
: "=&r" (result), "=&r" (temp),
343-
"+" GCC_OFF_SMALL_ASM() (v->counter)
338+
: "=&r" (result), "=&r" (temp), "+ZC" (v->counter)
344339
: "r" (i));
345340
}
346341

arch/loongarch/include/asm/compiler.h

Lines changed: 0 additions & 15 deletions
This file was deleted.

arch/loongarch/include/asm/futex.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <linux/futex.h>
99
#include <linux/uaccess.h>
1010
#include <asm/barrier.h>
11-
#include <asm/compiler.h>
1211
#include <asm/errno.h>
1312

1413
#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
@@ -95,8 +94,8 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, u32 oldval, u32 newv
9594
" "__UA_ADDR "\t1b, 4b \n"
9695
" "__UA_ADDR "\t2b, 4b \n"
9796
" .previous \n"
98-
: "+r" (ret), "=&r" (val), "=" GCC_OFF_SMALL_ASM() (*uaddr)
99-
: GCC_OFF_SMALL_ASM() (*uaddr), "Jr" (oldval), "Jr" (newval),
97+
: "+r" (ret), "=&r" (val), "=ZC" (*uaddr)
98+
: "ZC" (*uaddr), "Jr" (oldval), "Jr" (newval),
10099
"i" (-EFAULT)
101100
: "memory", "t0");
102101

arch/loongarch/include/asm/irqflags.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include <linux/compiler.h>
1111
#include <linux/stringify.h>
12-
#include <asm/compiler.h>
1312
#include <asm/loongarch.h>
1413

1514
static inline void arch_local_irq_enable(void)

arch/loongarch/include/asm/local.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <linux/bitops.h>
1010
#include <linux/atomic.h>
1111
#include <asm/cmpxchg.h>
12-
#include <asm/compiler.h>
1312

1413
typedef struct {
1514
atomic_long_t a;

arch/loongarch/kernel/reset.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <linux/console.h>
1414

1515
#include <acpi/reboot.h>
16-
#include <asm/compiler.h>
1716
#include <asm/idle.h>
1817
#include <asm/loongarch.h>
1918
#include <asm/reboot.h>

arch/loongarch/lib/delay.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <linux/smp.h>
88
#include <linux/timex.h>
99

10-
#include <asm/compiler.h>
1110
#include <asm/processor.h>
1211

1312
void __delay(unsigned long cycles)

0 commit comments

Comments
 (0)