/usr/src/linux-headers-5.15.0-181/arch/arm64/include/asm
NameSizeModeActions
vdso/-0755rm
xen/-0755rm
acenv.h3950644editdlrm
acpi.h49420644editdlrm
alternative-macros.h55370644editdlrm
alternative.h10130644editdlrm
archrandom.h31210644editdlrm
arch_gicv3.h40550644editdlrm
arch_timer.h46310644editdlrm
arm-cci.h2540644editdlrm
arm_dsu_pmu.h30070644editdlrm
asm-bug.h9520644editdlrm
asm-offsets.h350644editdlrm
asm-prototypes.h9580644editdlrm
asm-uaccess.h22960644editdlrm
asm_pointer_auth.h24320644editdlrm
assembler.h211640644editdlrm
atomic.h86180644editdlrm
atomic_ll_sc.h102540644editdlrm
atomic_lse.h112330644editdlrm
barrier.h54290644editdlrm
bitops.h8500644editdlrm
bitrev.h4520644editdlrm
boot.h3690644editdlrm
brk-imm.h8890644editdlrm
bug.h5720644editdlrm
cache.h32480644editdlrm
cacheflush.h48730644editdlrm
checksum.h10880644editdlrm
clocksource.h1360644editdlrm
cmpxchg.h80570644editdlrm
compat.h39190644editdlrm
compiler.h13090644editdlrm
cpu.h15200644editdlrm
cpufeature.h290010644editdlrm
cpuidle.h13300644editdlrm
cputype.h118040644editdlrm
cpu_ops.h24090644editdlrm
current.h5170644editdlrm
daifflags.h35330644editdlrm
dcc.h9810644editdlrm
debug-monitors.h32840644editdlrm
device.h1890644editdlrm
dmi.h8500644editdlrm
efi.h44940644editdlrm
el2_setup.h53630644editdlrm
elf.h81960644editdlrm
esr.h125490644editdlrm
exception.h30150644editdlrm
exec.h2780644editdlrm
extable.h11270644editdlrm
fb.h4600644editdlrm
fixmap.h30990644editdlrm
fpsimd.h54900644editdlrm
fpsimdmacros.h60040644editdlrm
ftrace.h29620644editdlrm
futex.h29530644editdlrm
hardirq.h23350644editdlrm
hugetlb.h19200644editdlrm
hwcap.h52070644editdlrm
hw_breakpoint.h40910644editdlrm
hyperv-tlfs.h20770644editdlrm
hypervisor.h2280644editdlrm
hyp_image.h19110644editdlrm
image.h15090644editdlrm
insn-def.h5710644editdlrm
insn.h218840644editdlrm
io.h66310644editdlrm
irq.h3950644editdlrm
irqflags.h29330644editdlrm
irq_work.h1920644editdlrm
jump_label.h11950644editdlrm
kasan.h15680644editdlrm
Kbuild1860644editdlrm
kernel-pgtable.h50230644editdlrm
kexec.h27950644editdlrm
kfence.h4100644editdlrm
kgdb.h33460644editdlrm
kprobes.h10630644editdlrm
kvm_arm.h126190644editdlrm
kvm_asm.h99210644editdlrm
kvm_emulate.h124620644editdlrm
kvm_host.h259120644editdlrm
kvm_hyp.h43890644editdlrm
kvm_mmu.h88740644editdlrm
kvm_mte.h13780644editdlrm
kvm_pgtable.h196760644editdlrm
kvm_ptrauth.h35430644editdlrm
kvm_ras.h6030644editdlrm
kvm_types.h1850644editdlrm
linkage.h17510644editdlrm
lse.h12670644editdlrm
memory.h118380644editdlrm
mman.h26990644editdlrm
mmu.h24760644editdlrm
mmu_context.h69440644editdlrm
mmzone.h2660644editdlrm
module.h18100644editdlrm
module.lds.h6460644editdlrm
mshyperv.h13870644editdlrm
mte-def.h5050644editdlrm
mte-kasan.h36400644editdlrm
mte.h34260644editdlrm
neon-intrinsics.h9590644editdlrm
neon.h3850644editdlrm
numa.h1650644editdlrm
page-def.h4410644editdlrm
page.h13650644editdlrm
paravirt.h5800644editdlrm
patching.h3700644editdlrm
pci.h7640644editdlrm
percpu.h81750644editdlrm
perf_event.h107850644editdlrm
pgalloc.h22690644editdlrm
pgtable-hwdef.h101670644editdlrm
pgtable-prot.h43020644editdlrm
pgtable-types.h13050644editdlrm
pgtable.h299650644editdlrm
pointer_auth.h46510644editdlrm
preempt.h23660644editdlrm
probes.h6500644editdlrm
proc-fns.h5620644editdlrm
processor.h100020644editdlrm
ptdump.h8890644editdlrm
ptrace.h105390644editdlrm
pvclock-abi.h3740644editdlrm
rwonce.h20090644editdlrm
scs.h4970644editdlrm
sdei.h19670644editdlrm
seccomp.h8700644editdlrm
sections.h10990644editdlrm
setup.h1950644editdlrm
set_memory.h4870644editdlrm
shmparam.h4250644editdlrm
signal.h6500644editdlrm
signal32.h19800644editdlrm
simd.h14880644editdlrm
smp.h39550644editdlrm
smp_plat.h8240644editdlrm
sparsemem.h6820644editdlrm
spectre.h30000644editdlrm
spinlock.h6010644editdlrm
spinlock_types.h3600644editdlrm
stackprotector.h13590644editdlrm
stacktrace.h43140644editdlrm
stack_pointer.h2470644editdlrm
stage2_pgtable.h10580644editdlrm
stat.h9470644editdlrm
string.h19720644editdlrm
suspend.h16940644editdlrm
sync_bitops.h10850644editdlrm
syscall.h21460644editdlrm
syscall_wrapper.h31200644editdlrm
sysreg.h457730644editdlrm
system_misc.h8800644editdlrm
thread_info.h38870644editdlrm
timex.h3430644editdlrm
tlb.h23320644editdlrm
tlbflush.h118910644editdlrm
topology.h12030644editdlrm
trans_pgd.h10360644editdlrm
traps.h29090644editdlrm
uaccess.h137180644editdlrm
unistd.h13610644editdlrm
unistd32.h315680644editdlrm
uprobes.h5790644editdlrm
vdso.h6310644editdlrm
vectors.h17750644editdlrm
vermagic.h2000644editdlrm
virt.h35690644editdlrm
vmalloc.h6940644editdlrm
vmap_stack.h7030644editdlrm
word-at-a-time.h17970644editdlrm
xor.h16680644editdlrm
Edit: /usr/src/linux-headers-5.15.0-181/arch/arm64/include/asm/processor.h (10002B)
/* SPDX-License-Identifier: GPL-2.0-only */ /* * Based on arch/arm/include/asm/processor.h * * Copyright (C) 1995-1999 Russell King * Copyright (C) 2012 ARM Ltd. */ #ifndef __ASM_PROCESSOR_H #define __ASM_PROCESSOR_H /* * On arm64 systems, unaligned accesses by the CPU are cheap, and so there is * no point in shifting all network buffers by 2 bytes just to make some IP * header fields appear aligned in memory, potentially sacrificing some DMA * performance on some platforms. */ #define NET_IP_ALIGN 0 #define MTE_CTRL_GCR_USER_EXCL_SHIFT 0 #define MTE_CTRL_GCR_USER_EXCL_MASK 0xffff #define MTE_CTRL_TCF_SYNC (1UL << 16) #define MTE_CTRL_TCF_ASYNC (1UL << 17) #ifndef __ASSEMBLY__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* * TASK_SIZE - the maximum size of a user space task. * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area. */ #define DEFAULT_MAP_WINDOW_64 (UL(1) << VA_BITS_MIN) #define TASK_SIZE_64 (UL(1) << vabits_actual) #define TASK_SIZE_MAX (UL(1) << VA_BITS) #ifdef CONFIG_COMPAT #if defined(CONFIG_ARM64_64K_PAGES) && defined(CONFIG_KUSER_HELPERS) /* * With CONFIG_ARM64_64K_PAGES enabled, the last page is occupied * by the compat vectors page. */ #define TASK_SIZE_32 UL(0x100000000) #else #define TASK_SIZE_32 (UL(0x100000000) - PAGE_SIZE) #endif /* CONFIG_ARM64_64K_PAGES */ #define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ TASK_SIZE_32 : TASK_SIZE_64) #define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \ TASK_SIZE_32 : TASK_SIZE_64) #define DEFAULT_MAP_WINDOW (test_thread_flag(TIF_32BIT) ? \ TASK_SIZE_32 : DEFAULT_MAP_WINDOW_64) #else #define TASK_SIZE TASK_SIZE_64 #define DEFAULT_MAP_WINDOW DEFAULT_MAP_WINDOW_64 #endif /* CONFIG_COMPAT */ #ifdef CONFIG_ARM64_FORCE_52BIT #define STACK_TOP_MAX TASK_SIZE_64 #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 4)) #else #define STACK_TOP_MAX DEFAULT_MAP_WINDOW_64 #define TASK_UNMAPPED_BASE (PAGE_ALIGN(DEFAULT_MAP_WINDOW / 4)) #endif /* CONFIG_ARM64_FORCE_52BIT */ #ifdef CONFIG_COMPAT #define AARCH32_VECTORS_BASE 0xffff0000 #define STACK_TOP (test_thread_flag(TIF_32BIT) ? \ AARCH32_VECTORS_BASE : STACK_TOP_MAX) #else #define STACK_TOP STACK_TOP_MAX #endif /* CONFIG_COMPAT */ #ifndef CONFIG_ARM64_FORCE_52BIT #define arch_get_mmap_end(addr) ((addr > DEFAULT_MAP_WINDOW) ? TASK_SIZE :\ DEFAULT_MAP_WINDOW) #define arch_get_mmap_base(addr, base) ((addr > DEFAULT_MAP_WINDOW) ? \ base + TASK_SIZE - DEFAULT_MAP_WINDOW :\ base) #endif /* CONFIG_ARM64_FORCE_52BIT */ extern phys_addr_t arm64_dma_phys_limit; #define ARCH_LOW_ADDRESS_LIMIT (arm64_dma_phys_limit - 1) struct debug_info { #ifdef CONFIG_HAVE_HW_BREAKPOINT /* Have we suspended stepping by a debugger? */ int suspended_step; /* Allow breakpoints and watchpoints to be disabled for this thread. */ int bps_disabled; int wps_disabled; /* Hardware breakpoints pinned to this task. */ struct perf_event *hbp_break[ARM_MAX_BRP]; struct perf_event *hbp_watch[ARM_MAX_WRP]; #endif }; enum fp_type { FP_STATE_CURRENT, /* Save based on current task state. */ FP_STATE_FPSIMD, FP_STATE_SVE, }; struct cpu_context { unsigned long x19; unsigned long x20; unsigned long x21; unsigned long x22; unsigned long x23; unsigned long x24; unsigned long x25; unsigned long x26; unsigned long x27; unsigned long x28; unsigned long fp; unsigned long sp; unsigned long pc; }; struct thread_struct { struct cpu_context cpu_context; /* cpu context */ /* * Whitelisted fields for hardened usercopy: * Maintainers must ensure manually that this contains no * implicit padding. */ struct { unsigned long tp_value; /* TLS register */ unsigned long tp2_value; struct user_fpsimd_state fpsimd_state; } uw; enum fp_type fp_type; /* registers FPSIMD or SVE? */ unsigned int fpsimd_cpu; void *sve_state; /* SVE registers, if any */ unsigned int sve_vl; /* SVE vector length */ unsigned int sve_vl_onexec; /* SVE vl after next exec */ unsigned long fault_address; /* fault info */ unsigned long fault_code; /* ESR_EL1 value */ struct debug_info debug; /* debugging */ #ifdef CONFIG_ARM64_PTR_AUTH struct ptrauth_keys_user keys_user; #ifdef CONFIG_ARM64_PTR_AUTH_KERNEL struct ptrauth_keys_kernel keys_kernel; #endif #endif #ifdef CONFIG_ARM64_MTE u64 mte_ctrl; #endif u64 sctlr_user; }; #define SCTLR_USER_MASK \ (SCTLR_ELx_ENIA | SCTLR_ELx_ENIB | SCTLR_ELx_ENDA | SCTLR_ELx_ENDB | \ SCTLR_EL1_TCF0_MASK) static inline void arch_thread_struct_whitelist(unsigned long *offset, unsigned long *size) { /* Verify that there is no padding among the whitelisted fields: */ BUILD_BUG_ON(sizeof_field(struct thread_struct, uw) != sizeof_field(struct thread_struct, uw.tp_value) + sizeof_field(struct thread_struct, uw.tp2_value) + sizeof_field(struct thread_struct, uw.fpsimd_state)); *offset = offsetof(struct thread_struct, uw); *size = sizeof_field(struct thread_struct, uw); } #ifdef CONFIG_COMPAT #define task_user_tls(t) \ ({ \ unsigned long *__tls; \ if (is_compat_thread(task_thread_info(t))) \ __tls = &(t)->thread.uw.tp2_value; \ else \ __tls = &(t)->thread.uw.tp_value; \ __tls; \ }) #else #define task_user_tls(t) (&(t)->thread.uw.tp_value) #endif /* Sync TPIDR_EL0 back to thread_struct for current */ void tls_preserve_current_state(void); #define INIT_THREAD { \ .fpsimd_cpu = NR_CPUS, \ } static inline void start_thread_common(struct pt_regs *regs, unsigned long pc) { s32 previous_syscall = regs->syscallno; memset(regs, 0, sizeof(*regs)); regs->syscallno = previous_syscall; regs->pc = pc; if (system_uses_irq_prio_masking()) regs->pmr_save = GIC_PRIO_IRQON; } static inline void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp) { start_thread_common(regs, pc); regs->pstate = PSR_MODE_EL0t; spectre_v4_enable_task_mitigation(current); regs->sp = sp; } #ifdef CONFIG_COMPAT static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp) { start_thread_common(regs, pc); regs->pstate = PSR_AA32_MODE_USR; if (pc & 1) regs->pstate |= PSR_AA32_T_BIT; #ifdef __AARCH64EB__ regs->pstate |= PSR_AA32_E_BIT; #endif spectre_v4_enable_task_mitigation(current); regs->compat_sp = sp; } #endif static __always_inline bool is_ttbr0_addr(unsigned long addr) { /* entry assembly clears tags for TTBR0 addrs */ return addr < TASK_SIZE; } static __always_inline bool is_ttbr1_addr(unsigned long addr) { /* TTBR1 addresses may have a tag if KASAN_SW_TAGS is in use */ return arch_kasan_reset_tag(addr) >= PAGE_OFFSET; } /* Forward declaration, a strange C thing */ struct task_struct; /* Free all resources held by a thread. */ extern void release_thread(struct task_struct *); unsigned long __get_wchan(struct task_struct *p); void update_sctlr_el1(u64 sctlr); /* Thread switching */ extern struct task_struct *cpu_switch_to(struct task_struct *prev, struct task_struct *next); #define task_pt_regs(p) \ ((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1) #define KSTK_EIP(tsk) ((unsigned long)task_pt_regs(tsk)->pc) #define KSTK_ESP(tsk) user_stack_pointer(task_pt_regs(tsk)) /* * Prefetching support */ #define ARCH_HAS_PREFETCH static inline void prefetch(const void *ptr) { asm volatile("prfm pldl1keep, %a0\n" : : "p" (ptr)); } #define ARCH_HAS_PREFETCHW static inline void prefetchw(const void *ptr) { asm volatile("prfm pstl1keep, %a0\n" : : "p" (ptr)); } #define ARCH_HAS_SPINLOCK_PREFETCH static inline void spin_lock_prefetch(const void *ptr) { asm volatile(ARM64_LSE_ATOMIC_INSN( "prfm pstl1strm, %a0", "nop") : : "p" (ptr)); } extern unsigned long __ro_after_init signal_minsigstksz; /* sigframe size */ extern void __init minsigstksz_setup(void); /* * Not at the top of the file due to a direct #include cycle between * and . Deferring this #include * ensures that contents of processor.h are visible to fpsimd.h even if * processor.h is included first. * * These prctl helpers are the only things in this file that require * fpsimd.h. The core code expects them to be in this header. */ #include /* Userspace interface for PR_SVE_{SET,GET}_VL prctl()s: */ #define SVE_SET_VL(arg) sve_set_current_vl(arg) #define SVE_GET_VL() sve_get_current_vl() /* PR_PAC_RESET_KEYS prctl */ #define PAC_RESET_KEYS(tsk, arg) ptrauth_prctl_reset_keys(tsk, arg) /* PR_PAC_{SET,GET}_ENABLED_KEYS prctl */ #define PAC_SET_ENABLED_KEYS(tsk, keys, enabled) \ ptrauth_set_enabled_keys(tsk, keys, enabled) #define PAC_GET_ENABLED_KEYS(tsk) ptrauth_get_enabled_keys(tsk) #ifdef CONFIG_ARM64_TAGGED_ADDR_ABI /* PR_{SET,GET}_TAGGED_ADDR_CTRL prctl */ long set_tagged_addr_ctrl(struct task_struct *task, unsigned long arg); long get_tagged_addr_ctrl(struct task_struct *task); #define SET_TAGGED_ADDR_CTRL(arg) set_tagged_addr_ctrl(current, arg) #define GET_TAGGED_ADDR_CTRL() get_tagged_addr_ctrl(current) #endif /* * For CONFIG_GCC_PLUGIN_STACKLEAK * * These need to be macros because otherwise we get stuck in a nightmare * of header definitions for the use of task_stack_page. */ /* * The top of the current task's task stack */ #define current_top_of_stack() ((unsigned long)current->stack + THREAD_SIZE) #define on_thread_stack() (on_task_stack(current, current_stack_pointer, 1, NULL)) #endif /* __ASSEMBLY__ */ #endif /* __ASM_PROCESSOR_H */