linux/arch/arm64/include/asm
Sami Tolvanen 1764c3edc6 arm64: use a common .arch preamble for inline assembly
Commit 7c78f67e9b ("arm64: enable tlbi range instructions") breaks
LLVM's integrated assembler, because -Wa,-march is only passed to
external assemblers and therefore, the new instructions are not enabled
when IAS is used.

This change adds a common architecture version preamble, which can be
used in inline assembly blocks that contain instructions that require
a newer architecture version, and uses it to fix __TLBI_0 and __TLBI_1
with ARM64_TLB_RANGE.

Fixes: 7c78f67e9b ("arm64: enable tlbi range instructions")
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1106
Link: https://lore.kernel.org/r/20200827203608.1225689-1-samitolvanen@google.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2020-08-28 11:15:15 +01:00
..
vdso vdso/treewide: Add vdso_data pointer argument to __arch_get_hw_counter() 2020-08-06 10:57:30 +02:00
xen xen: fixes and cleanups for 5.4-rc2 2019-10-04 11:13:09 -07:00
acenv.h
acpi.h arm64/acpi: disallow AML memory opregions to access kernel memory 2020-07-14 18:02:03 +01:00
alternative.h arm64/alternatives: move length validation inside the subsection 2020-07-30 16:50:14 +01:00
arch_gicv3.h KVM: arm64: Annotate hyp NMI-related functions as __always_inline 2020-06-22 14:39:45 +01:00
arch_timer.h arm64: arch_timer: Allow an workaround descriptor to disable compat vdso 2020-07-08 21:57:51 +01:00
archrandom.h random: random.h should include archrandom.h, not the other way around 2020-08-05 12:39:48 -07:00
arm_dsu_pmu.h
arm-cci.h
asm_pointer_auth.h arm64: simplify ptrauth initialization 2020-04-28 11:23:21 +01:00
asm-bug.h
asm-offsets.h
asm-prototypes.h
asm-uaccess.h arm64 updates for 5.5: 2019-11-25 15:39:19 -08:00
assembler.h arm64: asm: Provide a mechanism for generating ELF note for BTI 2020-05-07 17:53:20 +01:00
atomic_ll_sc.h arm64: Move the LSE gas support detection to Kconfig 2020-01-15 12:50:48 +00:00
atomic_lse.h arm64: lse: fix LSE atomics with LLVM's integrated assembler 2020-01-16 17:25:10 +00:00
atomic.h locking/atomic: Move ATOMIC_INIT into linux/types.h 2020-07-29 16:14:18 +02:00
barrier.h arm64: barrier: Use '__unqual_scalar_typeof' for acquire/release macros 2020-04-16 12:28:35 +01:00
bitops.h
bitrev.h
boot.h
brk-imm.h
bug.h
cache.h arm64: Ask the compiler to __always_inline functions used by KVM at HYP 2020-02-22 11:01:47 +00:00
cacheflush.h arm64: use asm-generic/cacheflush.h 2020-06-08 11:05:57 -07:00
checksum.h arm64: csum: Fix handling of bad packets 2020-07-30 17:01:38 +01:00
clocksource.h arm64: Introduce asm/vdso/clocksource.h 2020-03-21 15:23:55 +01:00
cmpxchg.h arm64: fix unreachable code issue with cmpxchg 2019-09-17 12:11:50 +01:00
compat.h compat: provide compat_ptr() on all architectures 2020-01-03 09:32:51 +01:00
compiler.h arm64: use a common .arch preamble for inline assembly 2020-08-28 11:15:15 +01:00
cpu_ops.h arm64: Introduce get_cpu_ops() helper function 2020-03-24 17:24:19 +00:00
cpu.h arm64/cpuinfo: Add ID_MMFR4_EL1 into the cpuinfo_arm64 context 2020-05-21 15:47:12 +01:00
cpucaps.h arm64: tlb: Detect the ARMv8.4 TLBI RANGE feature 2020-07-15 15:57:30 +01:00
cpufeature.h arm64 and cross-arch updates for 5.9: 2020-08-03 14:11:08 -07:00
cpuidle.h
cputype.h arm64: Add MIDR value for KRYO4XX gold CPU cores 2020-07-03 16:39:16 +01:00
current.h
daifflags.h arm64: acpi: fix DAIF manipulation with pNMI 2020-01-22 14:41:22 +00:00
dcc.h
debug-monitors.h arm64: ptrace: Override SPSR.SS when single-stepping is enabled 2020-07-16 11:41:21 +01:00
device.h arm64: Remove dev->archdata.iommu pointer 2020-06-30 11:59:49 +02:00
dmi.h
efi.h efi/libstub: unify EFI call wrappers for non-x86 2020-04-23 20:15:06 +02:00
elf.h Split the old READ_IMPLIES_EXEC workaround from executable PT_GNU_STACK 2020-06-05 13:45:21 -07:00
esr.h Merge branch 'for-next/bti-user' into for-next/bti 2020-05-05 15:15:58 +01:00
exception.h arm64: Basic Branch Target Identification support 2020-03-16 17:19:48 +00:00
exec.h
extable.h bpf, arm64: Add BPF exception tables 2020-07-31 00:43:40 +02:00
fb.h
fixmap.h arm64/fixmap: make notes of fixed_addresses more precisely 2020-08-08 19:25:04 +01:00
fpsimd.h arm64: remove pointless __KERNEL__ guards 2019-08-05 11:06:33 +01:00
fpsimdmacros.h
ftrace.h arm64: implement ftrace with regs 2019-11-06 14:17:35 +00:00
futex.h futex: arch_futex_atomic_op_inuser() calling conventions change 2020-03-27 23:58:51 -04:00
hardirq.h arm64: Prepare arch_nmi_enter() for recursion 2020-05-19 15:51:17 +02:00
hugetlb.h arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs 2020-07-15 13:38:03 +01:00
hw_breakpoint.h arm64: remove pointless __KERNEL__ guards 2019-08-05 11:06:33 +01:00
hwcap.h arm64: Reserve HWCAP2_MTE as (1 << 18) 2020-07-24 11:55:29 +01:00
hypervisor.h
image.h
insn.h arm64: insn: Provide a better name for aarch64_insn_is_nop() 2020-05-04 16:06:29 +01:00
io.h mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
irq_work.h
irq.h
irqflags.h arm64: Relax ICC_PMR_EL1 accesses when ICC_CTLR_EL1.PMHE is clear 2019-10-15 12:26:09 +01:00
jump_label.h
kasan.h arm64: mm: Introduce vabits_actual 2019-08-09 11:17:21 +01:00
Kbuild KVM: arm64: Use common KVM implementation of MMU memory caches 2020-07-09 13:29:43 -04:00
kernel-pgtable.h arm64: Reduce the number of header files pulled into vmlinux.lds.S 2020-07-21 10:50:37 +01:00
kexec.h Revert "arm64: kexec: make dtb_mem always enabled" 2020-01-10 16:00:50 +00:00
kgdb.h
kprobes.h
kvm_arm.h arm64/kvm: disable access to AMU registers from kvm guests 2020-03-06 16:02:50 +00:00
kvm_asm.h Merge branch 'kvm-arm64/misc-5.9' into kvmarm-master/next-WIP 2020-07-28 16:26:16 +01:00
kvm_coproc.h KVM/arm64 updates for Linux 5.9: 2020-08-09 12:58:23 -04:00
kvm_emulate.h Merge branch 'kvm-arm64/misc-5.9' into kvmarm-master/next 2020-07-30 16:13:04 +01:00
kvm_host.h KVM: Pass MMU notifier range flags to kvm_unmap_hva_range() 2020-08-21 18:03:47 -04:00
kvm_hyp.h KVM: arm64: Remove __hyp_text macro, use build rules instead 2020-07-05 18:38:45 +01:00
kvm_mmu.h KVM/arm64 updates for Linux 5.9: 2020-08-09 12:58:23 -04:00
kvm_ptrauth.h KVM: arm64: Simplify PtrAuth alternative patching 2020-06-22 11:42:50 +01:00
kvm_ras.h
kvm_types.h KVM: arm64: Use common KVM implementation of MMU memory caches 2020-07-09 13:29:43 -04:00
linkage.h arm64: Don't insert a BTI instruction at inner labels 2020-06-24 14:24:29 +01:00
lse.h arm64: lse: Fix LSE atomics with LLVM 2020-02-18 18:10:49 +00:00
memory.h Merge branch 'for-next/read-barrier-depends' into for-next/core 2020-07-31 18:09:57 +01:00
mman.h arm64: Basic Branch Target Identification support 2020-03-16 17:19:48 +00:00
mmu_context.h arm64/mm: save memory access in check_and_switch_context() fast switch path 2020-07-30 12:58:40 +01:00
mmu.h KVM: arm64: Substitute RANDOMIZE_BASE for HARDEN_EL2_VECTORS 2020-07-28 10:41:11 +01:00
mmzone.h
module.h arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> 2020-04-23 10:50:26 +09:00
neon-intrinsics.h
neon.h
numa.h
page-def.h
page.h mm/vma: define a default value for VM_DATA_DEFAULT_FLAGS 2020-04-10 15:36:21 -07:00
paravirt.h arm64: Retrieve stolen time as paravirtualized guest 2019-10-21 19:20:31 +01:00
pci.h arm64: remove pointless __KERNEL__ guards 2019-08-05 11:06:33 +01:00
percpu.h
perf_event.h arm64: perf: Expose some new events via sysfs 2020-07-21 12:59:42 +01:00
pgalloc.h asm-generic: pgalloc: provide generic pgd_free() 2020-08-07 11:33:26 -07:00
pgtable-hwdef.h Merge branch 'for-next/tlbi' into for-next/core 2020-07-31 18:09:50 +01:00
pgtable-prot.h KVM: arm64: Fix definition of PAGE_HYP_DEVICE 2020-07-08 21:35:48 +01:00
pgtable-types.h arm64: add support for folded p4d page tables 2020-06-04 19:06:21 -07:00
pgtable.h arm64: tlb: Set the TTL field in flush_*_tlb_range 2020-07-07 11:23:47 +01:00
pointer_auth.h arm64: sync kernel APIAKey when installing 2020-04-21 15:52:56 +01:00
preempt.h sched/rt, arm64: Use CONFIG_PREEMPTION 2019-12-08 14:37:32 +01:00
probes.h
proc-fns.h arm64: mm: convert cpu_do_switch_mm() to C 2020-02-27 14:30:50 +00:00
processor.h arm64 updates for 5.7: 2020-03-31 10:05:01 -07:00
ptdump.h arm64: mm: convert mm/dump.c to use walk_page_range() 2020-02-04 03:05:25 +00:00
ptrace.h arm64: ptrace.h: delete duplicated word 2020-07-30 12:54:56 +01:00
pvclock-abi.h KVM: arm64: Implement PV_TIME_FEATURES call 2019-10-21 19:20:27 +01:00
scs.h scs: Move scs_overflow_check() out of architecture code 2020-05-18 17:47:40 +01:00
sdei.h
seccomp.h
sections.h arm64: Remove __exception_text_start and __exception_text_end from asm/section.h 2020-01-08 17:30:19 +00:00
shmparam.h
signal32.h arm64: remove pointless __KERNEL__ guards 2019-08-05 11:06:33 +01:00
simd.h arm64: fpsimd: Make sure SVE setup is complete before SIMD is used 2020-01-14 17:11:21 +00:00
smp_plat.h
smp.h - Fix tegra194-cpufreq module build failure caused __cpu_logical_map 2020-08-08 14:16:12 -07:00
sparsemem.h
spinlock_types.h
spinlock.h arm64/spinlock: fix a -Wunused-function warning 2020-02-10 11:29:24 +00:00
stack_pointer.h
stackprotector.h arm64: initialize ptrauth keys for kernel booting task 2020-03-18 09:50:20 +00:00
stacktrace.h arm64: add loglvl to dump_backtrace() 2020-06-09 09:39:11 -07:00
stage2_pgtable.h arm64: Add level-hinted TLB invalidation helper 2020-07-07 09:27:15 +01:00
stat.h
string.h
suspend.h arm64: Preserve register x18 when CPU is suspended 2020-05-15 16:35:50 +01:00
sync_bitops.h
syscall_wrapper.h arm64: simplify syscall wrapper ifdeffery 2019-10-14 10:55:00 +01:00
syscall.h arm64: compat: Ensure upper 32 bits of x0 are zero on syscall return 2020-07-16 11:41:31 +01:00
sysreg.h Merge branch 'for-next/tlbi' into for-next/core 2020-07-31 18:09:50 +01:00
system_misc.h
thread_info.h arm64: ptrace: Consistently use pseudo-singlestep exceptions 2020-07-16 11:41:07 +01:00
timex.h
tlb.h arm64: tlb: Set the TTL field in flush_tlb_range 2020-07-07 11:23:47 +01:00
tlbflush.h arm64: use a common .arch preamble for inline assembly 2020-08-28 11:15:15 +01:00
topology.h arch_topology, sched/core: Cleanup thermal pressure definition 2020-07-22 10:22:05 +02:00
traps.h arm64: remove __exception annotations 2019-10-28 11:22:38 +00:00
uaccess.h uaccess: remove segment_eq 2020-08-12 10:57:58 -07:00
unistd32.h all arch: remove system call sys_sysctl 2020-08-14 19:56:56 -07:00
unistd.h vfs: add faccessat2 syscall 2020-05-14 16:44:25 +02:00
uprobes.h
vdso.h arm64/vdso: Add time namespace page 2020-07-24 13:15:20 +01:00
vermagic.h arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> 2020-04-23 10:50:26 +09:00
virt.h KVM: arm64: Use build-time defines in has_vhe() 2020-07-05 18:38:01 +01:00
vmalloc.h mm/vmalloc: Add empty <asm/vmalloc.h> headers and use them from <linux/vmalloc.h> 2019-12-10 10:12:55 +01:00
vmap_stack.h mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
word-at-a-time.h
xor.h