1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __ASM_LSUI_H 3 #define __ASM_LSUI_H 4 5 #include <linux/compiler_types.h> 6 #include <linux/stringify.h> 7 #include <asm/alternative.h> 8 #include <asm/alternative-macros.h> 9 #include <asm/cpucaps.h> 10 11 #define __LSUI_PREAMBLE ".arch_extension lsui\n" 12 13 #ifdef CONFIG_ARM64_LSUI 14 15 #define __lsui_llsc_body(op, ...) \ 16 ({ \ 17 alternative_has_cap_unlikely(ARM64_HAS_LSUI) ? \ 18 __lsui_##op(__VA_ARGS__) : __llsc_##op(__VA_ARGS__); \ 19 }) 20 21 #else /* CONFIG_ARM64_LSUI */ 22 23 #define __lsui_llsc_body(op, ...) __llsc_##op(__VA_ARGS__) 24 25 #endif /* CONFIG_ARM64_LSUI */ 26 27 #endif /* __ASM_LSUI_H */ 28