Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <yijun@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>

authored by

Jun Yi and committed by
Huacai Chen
f62b7626 ab6e57a6

+6 -32
-1
arch/loongarch/Kconfig
··· 69 69 select GENERIC_TIME_VSYSCALL 70 70 select GPIOLIB 71 71 select HAVE_ARCH_AUDITSYSCALL 72 - select HAVE_ARCH_COMPILER_H 73 72 select HAVE_ARCH_MMAP_RND_BITS if MMU 74 73 select HAVE_ARCH_SECCOMP_FILTER 75 74 select HAVE_ARCH_TRACEHOOK
+4 -9
arch/loongarch/include/asm/atomic.h
··· 10 10 #include <linux/types.h> 11 11 #include <asm/barrier.h> 12 12 #include <asm/cmpxchg.h> 13 - #include <asm/compiler.h> 14 13 15 14 #if __SIZEOF_LONG__ == 4 16 15 #define __LL "ll.w " ··· 162 163 " beqz %1, 1b \n" 163 164 "2: \n" 164 165 __WEAK_LLSC_MB 165 - : "=&r" (result), "=&r" (temp), 166 - "+" GCC_OFF_SMALL_ASM() (v->counter) 166 + : "=&r" (result), "=&r" (temp), "+ZC" (v->counter) 167 167 : "I" (-i)); 168 168 } else { 169 169 __asm__ __volatile__( ··· 174 176 " beqz %1, 1b \n" 175 177 "2: \n" 176 178 __WEAK_LLSC_MB 177 - : "=&r" (result), "=&r" (temp), 178 - "+" GCC_OFF_SMALL_ASM() (v->counter) 179 + : "=&r" (result), "=&r" (temp), "+ZC" (v->counter) 179 180 : "r" (i)); 180 181 } 181 182 ··· 323 326 " beqz %1, 1b \n" 324 327 "2: \n" 325 328 __WEAK_LLSC_MB 326 - : "=&r" (result), "=&r" (temp), 327 - "+" GCC_OFF_SMALL_ASM() (v->counter) 329 + : "=&r" (result), "=&r" (temp), "+ZC" (v->counter) 328 330 : "I" (-i)); 329 331 } else { 330 332 __asm__ __volatile__( ··· 335 339 " beqz %1, 1b \n" 336 340 "2: \n" 337 341 __WEAK_LLSC_MB 338 - : "=&r" (result), "=&r" (temp), 339 - "+" GCC_OFF_SMALL_ASM() (v->counter) 342 + : "=&r" (result), "=&r" (temp), "+ZC" (v->counter) 340 343 : "r" (i)); 341 344 } 342 345
-15
arch/loongarch/include/asm/compiler.h
··· 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 */
+2 -3
arch/loongarch/include/asm/futex.h
··· 8 8 #include <linux/futex.h> 9 9 #include <linux/uaccess.h> 10 10 #include <asm/barrier.h> 11 - #include <asm/compiler.h> 12 11 #include <asm/errno.h> 13 12 14 13 #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ ··· 94 95 " "__UA_ADDR "\t1b, 4b \n" 95 96 " "__UA_ADDR "\t2b, 4b \n" 96 97 " .previous \n" 97 - : "+r" (ret), "=&r" (val), "=" GCC_OFF_SMALL_ASM() (*uaddr) 98 - : GCC_OFF_SMALL_ASM() (*uaddr), "Jr" (oldval), "Jr" (newval), 98 + : "+r" (ret), "=&r" (val), "=ZC" (*uaddr) 99 + : "ZC" (*uaddr), "Jr" (oldval), "Jr" (newval), 99 100 "i" (-EFAULT) 100 101 : "memory", "t0"); 101 102
-1
arch/loongarch/include/asm/irqflags.h
··· 9 9 10 10 #include <linux/compiler.h> 11 11 #include <linux/stringify.h> 12 - #include <asm/compiler.h> 13 12 #include <asm/loongarch.h> 14 13 15 14 static inline void arch_local_irq_enable(void)
-1
arch/loongarch/include/asm/local.h
··· 9 9 #include <linux/bitops.h> 10 10 #include <linux/atomic.h> 11 11 #include <asm/cmpxchg.h> 12 - #include <asm/compiler.h> 13 12 14 13 typedef struct { 15 14 atomic_long_t a;
-1
arch/loongarch/kernel/reset.c
··· 13 13 #include <linux/console.h> 14 14 15 15 #include <acpi/reboot.h> 16 - #include <asm/compiler.h> 17 16 #include <asm/idle.h> 18 17 #include <asm/loongarch.h> 19 18 #include <asm/reboot.h>
-1
arch/loongarch/lib/delay.c
··· 7 7 #include <linux/smp.h> 8 8 #include <linux/timex.h> 9 9 10 - #include <asm/compiler.h> 11 10 #include <asm/processor.h> 12 11 13 12 void __delay(unsigned long cycles)