/usr/src/linux-headers-5.15.0-181/arch/arm/include/asm
NameSizeModeActions
hardware/-0755rm
mach/-0755rm
vdso/-0755rm
xen/-0755rm
archrandom.h1920644editdlrm
arch_gicv3.h63270644editdlrm
arch_timer.h31240644editdlrm
arm-cci.h5350644editdlrm
asm-offsets.h350644editdlrm
assembler.h131060644editdlrm
atomic.h125360644editdlrm
auxvec.h290644editdlrm
barrier.h29100644editdlrm
bitops.h76270644editdlrm
bitrev.h4510644editdlrm
bL_switcher.h21860644editdlrm
bug.h26200644editdlrm
bugs.h2970644editdlrm
cache.h7940644editdlrm
cacheflush.h157940644editdlrm
cachetype.h27790644editdlrm
checksum.h40260644editdlrm
clocksource.h1610644editdlrm
cmpxchg.h63280644editdlrm
compiler.h9780644editdlrm
cp15.h33020644editdlrm
cpu.h3870644editdlrm
cpufeature.h12910644editdlrm
cpuidle.h16280644editdlrm
cputype.h87660644editdlrm
cti.h37030644editdlrm
dcc.h6230644editdlrm
delay.h29030644editdlrm
device.h6360644editdlrm
div64.h26400644editdlrm
dma-direct.h13410644editdlrm
dma-iommu.h9080644editdlrm
dma-mapping.h47140644editdlrm
dma.h42870644editdlrm
dmi.h3780644editdlrm
domain.h37510644editdlrm
ecard.h61190644editdlrm
edac.h9950644editdlrm
efi.h25010644editdlrm
elf.h46360644editdlrm
entry-macro-multi.S3360644editdlrm
exception.h4160644editdlrm
fb.h3750644editdlrm
fiq.h13910644editdlrm
firmware.h17280644editdlrm
fixmap.h18810644editdlrm
floppy.h23180644editdlrm
fncpy.h25520644editdlrm
fpstate.h14780644editdlrm
ftrace.h18210644editdlrm
futex.h43570644editdlrm
glue-cache.h35150644editdlrm
glue-df.h21100644editdlrm
glue-pf.h10050644editdlrm
glue-proc.h44240644editdlrm
glue.h6130644editdlrm
gpio.h6150644editdlrm
hardirq.h2460644editdlrm
highmem.h23790644editdlrm
hugetlb-3level.h6900644editdlrm
hugetlb.h5130644editdlrm
hwcap.h3780644editdlrm
hw_breakpoint.h38110644editdlrm
hw_irq.h3490644editdlrm
hypervisor.h2240644editdlrm
ide.h5660644editdlrm
idmap.h3590644editdlrm
insn.h6360644editdlrm
io.h150270644editdlrm
irq.h8870644editdlrm
irqflags.h39690644editdlrm
irq_work.h2340644editdlrm
jump_label.h10090644editdlrm
kasan.h7080644editdlrm
kasan_def.h27260644editdlrm
Kbuild1860644editdlrm
kexec-internal.h2720644editdlrm
kexec.h22550644editdlrm
kgdb.h27830644editdlrm
kprobes.h22480644editdlrm
krait-l2-accessors.h2310644editdlrm
linkage.h2160644editdlrm
mc146818rtc.h7200644editdlrm
mcpm.h120610644editdlrm
mcs_spinlock.h5700644editdlrm
memblock.h2480644editdlrm
memory.h109450644editdlrm
mmu.h9530644editdlrm
mmu_context.h34610644editdlrm
module.h12160644editdlrm
module.lds.h1340644editdlrm
mpu.h33000644editdlrm
mtd-xip.h5200644editdlrm
neon.h10410644editdlrm
nwflash.h1950644editdlrm
opcodes-sec.h3500644editdlrm
opcodes-virt.h6840644editdlrm
opcodes.h81180644editdlrm
outercache.h32680644editdlrm
page-nommu.h8110644editdlrm
page.h34480644editdlrm
paravirt.h4770644editdlrm
patch.h4380644editdlrm
pci.h7940644editdlrm
percpu.h10690644editdlrm
perf_event.h7080644editdlrm
pgalloc.h33730644editdlrm
pgtable-2level-hwdef.h33850644editdlrm
pgtable-2level-types.h12780644editdlrm
pgtable-2level.h86450644editdlrm
pgtable-3level-hwdef.h34350644editdlrm
pgtable-3level-types.h13310644editdlrm
pgtable-3level.h81480644editdlrm
pgtable-hwdef.h3210644editdlrm
pgtable-nommu.h19790644editdlrm
pgtable.h104920644editdlrm
probes.h13320644editdlrm
proc-fns.h47540644editdlrm
processor.h31660644editdlrm
procinfo.h11520644editdlrm
prom.h5520644editdlrm
psci.h3790644editdlrm
ptdump.h9230644editdlrm
ptrace.h48410644editdlrm
seccomp.h2810644editdlrm
sections.h6220644editdlrm
secure_cntvoff.h1520644editdlrm
setup.h7730644editdlrm
set_memory.h7200644editdlrm
shmparam.h4190644editdlrm
signal.h5590644editdlrm
smp.h28390644editdlrm
smp_plat.h25350644editdlrm
smp_scu.h13520644editdlrm
smp_twd.h5900644editdlrm
sparsemem.h7160644editdlrm
spectre.h9060644editdlrm
spinlock.h56450644editdlrm
spinlock_types.h5410644editdlrm
stackprotector.h13570644editdlrm
stacktrace.h7420644editdlrm
string.h21650644editdlrm
suspend.h3690644editdlrm
swab.h10050644editdlrm
switch_to.h10580644editdlrm
sync_bitops.h15140644editdlrm
syscall.h23470644editdlrm
system_info.h7630644editdlrm
system_misc.h10050644editdlrm
tcm.h9250644editdlrm
therm.h6550644editdlrm
thread_info.h49740644editdlrm
thread_notify.h10860644editdlrm
timex.h4310644editdlrm
tlb.h14420644editdlrm
tlbflush.h179090644editdlrm
tls.h31660644editdlrm
topology.h11390644editdlrm
traps.h9110644editdlrm
uaccess-asm.h27030644editdlrm
uaccess.h174310644editdlrm
ucontext.h27450644editdlrm
unified.h9790644editdlrm
unistd.h15780644editdlrm
unwind.h11730644editdlrm
uprobes.h9480644editdlrm
user.h43020644editdlrm
v7m.h32330644editdlrm
vdso.h5070644editdlrm
vdso_datapage.h4440644editdlrm
vermagic.h8000644editdlrm
vfp.h29690644editdlrm
vfpmacros.h20740644editdlrm
vga.h3050644editdlrm
virt.h18550644editdlrm
vmalloc.h870644editdlrm
vmlinux.lds.h44900644editdlrm
word-at-a-time.h21280644editdlrm
xor.h52040644editdlrm
Edit: /usr/src/linux-headers-5.15.0-181/arch/arm/include/asm/tls.h (3166B)
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __ASMARM_TLS_H #define __ASMARM_TLS_H #include #include #ifdef __ASSEMBLY__ #include .macro switch_tls_none, base, tp, tpuser, tmp1, tmp2 .endm .macro switch_tls_v6k, base, tp, tpuser, tmp1, tmp2 mrc p15, 0, \tmp2, c13, c0, 2 @ get the user r/w register mcr p15, 0, \tp, c13, c0, 3 @ set TLS register mcr p15, 0, \tpuser, c13, c0, 2 @ and the user r/w register str \tmp2, [\base, #TI_TP_VALUE + 4] @ save it .endm .macro switch_tls_v6, base, tp, tpuser, tmp1, tmp2 ldr \tmp1, =elf_hwcap ldr \tmp1, [\tmp1, #0] mov \tmp2, #0xffff0fff tst \tmp1, #HWCAP_TLS @ hardware TLS available? streq \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0 mrcne p15, 0, \tmp2, c13, c0, 2 @ get the user r/w register mcrne p15, 0, \tp, c13, c0, 3 @ yes, set TLS register mcrne p15, 0, \tpuser, c13, c0, 2 @ set user r/w register strne \tmp2, [\base, #TI_TP_VALUE + 4] @ save it .endm .macro switch_tls_software, base, tp, tpuser, tmp1, tmp2 mov \tmp1, #0xffff0fff str \tp, [\tmp1, #-15] @ set TLS value at 0xffff0ff0 .endm #endif #ifdef CONFIG_TLS_REG_EMUL #define tls_emu 1 #define has_tls_reg 1 #define switch_tls switch_tls_none #elif defined(CONFIG_CPU_V6) #define tls_emu 0 #define has_tls_reg (elf_hwcap & HWCAP_TLS) #define switch_tls switch_tls_v6 #elif defined(CONFIG_CPU_32v6K) #define tls_emu 0 #define has_tls_reg 1 #define switch_tls switch_tls_v6k #else #define tls_emu 0 #define has_tls_reg 0 #define switch_tls switch_tls_software #endif #ifndef __ASSEMBLY__ static inline void set_tls(unsigned long val) { struct thread_info *thread; thread = current_thread_info(); thread->tp_value[0] = val; /* * This code runs with preemption enabled and therefore must * be reentrant with respect to switch_tls. * * We need to ensure ordering between the shadow state and the * hardware state, so that we don't corrupt the hardware state * with a stale shadow state during context switch. * * If we're preempted here, switch_tls will load TPIDRURO from * thread_info upon resuming execution and the following mcr * is merely redundant. */ barrier(); if (!tls_emu) { if (has_tls_reg) { asm("mcr p15, 0, %0, c13, c0, 3" : : "r" (val)); } else { #ifdef CONFIG_KUSER_HELPERS /* * User space must never try to access this * directly. Expect your app to break * eventually if you do so. The user helper * at 0xffff0fe0 must be used instead. (see * entry-armv.S for details) */ *((unsigned int *)0xffff0ff0) = val; #endif } } } static inline unsigned long get_tpuser(void) { unsigned long reg = 0; if (has_tls_reg && !tls_emu) __asm__("mrc p15, 0, %0, c13, c0, 2" : "=r" (reg)); return reg; } static inline void set_tpuser(unsigned long val) { /* Since TPIDRURW is fully context-switched (unlike TPIDRURO), * we need not update thread_info. */ if (has_tls_reg && !tls_emu) { asm("mcr p15, 0, %0, c13, c0, 2" : : "r" (val)); } } static inline void flush_tls(void) { set_tls(0); set_tpuser(0); } #endif #endif /* __ASMARM_TLS_H */