History

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.

Jun Yi committed 4 years ago

Commit f62b7621 parent ab6e57a8 files · +6 −32Browse files

Unified · Split

8 files
  1. arch/loongarch/Kconfig +0 −1
  2. arch/loongarch/include/asm/atomic.h +4 −9
  3. arch/loongarch/include/asm/compiler.h +0 −15
  4. arch/loongarch/include/asm/futex.h +2 −3
  5. arch/loongarch/include/asm/irqflags.h +0 −1
  6. arch/loongarch/include/asm/local.h +0 −1
  7. arch/loongarch/kernel/reset.c +0 −1
  8. arch/loongarch/lib/delay.c +0 −1
arch/loongarch/Kconfig+0−1
@@ -69,7 +69,6 @@ config LOONGARCH · 68 unmodified lines
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+4−9
@@ -10,7 +10,6 @@ · 9 unmodified lines
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) · 146 unmodified lines
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) · 5 unmodified lines
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) · 142 unmodified lines
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) · 5 unmodified lines
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+0−15
@@ -1,15 +0,0 @@
1−/* SPDX-License-Identifier: GPL-2.0 */
2−/*
3− * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
4− */
5−#ifndef _ASM_COMPILER_H
6−#define _ASM_COMPILER_H
7−
8−#define GCC_OFF_SMALL_ASM() "ZC"
9−
10−#define LOONGARCH_ISA_LEVEL "loongarch"
11−#define LOONGARCH_ISA_ARCH_LEVEL "arch=loongarch"
12−#define LOONGARCH_ISA_LEVEL_RAW loongarch
13−#define LOONGARCH_ISA_ARCH_LEVEL_RAW LOONGARCH_ISA_LEVEL_RAW
14−
15−#endif /* _ASM_COMPILER_H */
arch/loongarch/include/asm/futex.h+2−3
@@ -8,7 +8,6 @@ · 7 unmodified lines
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 · 80 unmodified lines
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+0−1
@@ -9,7 +9,6 @@ · 8 unmodified lines
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+0−1
@@ -9,7 +9,6 @@ · 8 unmodified lines
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+0−1
@@ -13,7 +13,6 @@ · 12 unmodified lines
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+0−1
@@ -7,7 +7,6 @@ · 6 unmodified lines
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)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t