/
usr
/
src
/
linux-headers-5.15.0-190
/
arch
/
xtensa
/
include
/
asm
/
/usr/src/linux-headers-5.15.0-190/arch/xtensa/include/asm
mkdir
upload
Name
Size
Mode
Actions
asm-offsets.h
35
0644
edit
dl
rm
asm-uaccess.h
4180
0644
edit
dl
rm
asmmacro.h
4763
0644
edit
dl
rm
atomic.h
7301
0644
edit
dl
rm
barrier.h
594
0644
edit
dl
rm
bitops.h
5398
0644
edit
dl
rm
bootparam.h
1402
0644
edit
dl
rm
cache.h
1114
0644
edit
dl
rm
cacheasm.h
3856
0644
edit
dl
rm
cacheflush.h
5968
0644
edit
dl
rm
checksum.h
5893
0644
edit
dl
rm
cmpxchg.h
5684
0644
edit
dl
rm
coprocessor.h
4623
0644
edit
dl
rm
core.h
830
0644
edit
dl
rm
current.h
679
0644
edit
dl
rm
delay.h
1668
0644
edit
dl
rm
dma.h
1830
0644
edit
dl
rm
elf.h
5115
0644
edit
dl
rm
fixmap.h
1106
0644
edit
dl
rm
flat.h
440
0644
edit
dl
rm
ftrace.h
979
0644
edit
dl
rm
futex.h
3889
0644
edit
dl
rm
highmem.h
2167
0644
edit
dl
rm
hw_breakpoint.h
1597
0644
edit
dl
rm
initialize_mmu.h
5196
0644
edit
dl
rm
io.h
1959
0644
edit
dl
rm
irq.h
1127
0644
edit
dl
rm
irqflags.h
2069
0644
edit
dl
rm
jump_label.h
1655
0644
edit
dl
rm
kasan.h
859
0644
edit
dl
rm
Kbuild
230
0644
edit
dl
rm
kmem_layout.h
2790
0644
edit
dl
rm
linkage.h
154
0644
edit
dl
rm
mmu.h
462
0644
edit
dl
rm
mmu_context.h
3624
0644
edit
dl
rm
mxregs.h
1330
0644
edit
dl
rm
nommu_context.h
156
0644
edit
dl
rm
page.h
5793
0644
edit
dl
rm
pci-bridge.h
2170
0644
edit
dl
rm
pci.h
1302
0644
edit
dl
rm
perf_event.h
108
0644
edit
dl
rm
pgalloc.h
1405
0644
edit
dl
rm
pgtable.h
14470
0644
edit
dl
rm
platform.h
1528
0644
edit
dl
rm
processor.h
7705
0644
edit
dl
rm
ptrace.h
3321
0644
edit
dl
rm
regs.h
4017
0644
edit
dl
rm
seccomp.h
287
0644
edit
dl
rm
serial.h
443
0644
edit
dl
rm
shmparam.h
561
0644
edit
dl
rm
signal.h
502
0644
edit
dl
rm
smp.h
967
0644
edit
dl
rm
spinlock.h
472
0644
edit
dl
rm
spinlock_types.h
317
0644
edit
dl
rm
stackprotector.h
1140
0644
edit
dl
rm
stacktrace.h
1158
0644
edit
dl
rm
string.h
3385
0644
edit
dl
rm
switch_to.h
601
0644
edit
dl
rm
syscall.h
2140
0644
edit
dl
rm
sysmem.h
426
0644
edit
dl
rm
thread_info.h
3965
0644
edit
dl
rm
timex.h
1440
0644
edit
dl
rm
tlb.h
475
0644
edit
dl
rm
tlbflush.h
5620
0644
edit
dl
rm
traps.h
2779
0644
edit
dl
rm
uaccess.h
9375
0644
edit
dl
rm
ucontext.h
540
0644
edit
dl
rm
unistd.h
370
0644
edit
dl
rm
vectors.h
3276
0644
edit
dl
rm
vermagic.h
433
0644
edit
dl
rm
vmalloc.h
96
0644
edit
dl
rm
Edit:
/usr/src/linux-headers-5.15.0-190/arch/xtensa/include/asm/asm-uaccess.h
(4180B)
/* * include/asm-xtensa/uaccess.h * * User space memory access functions * * These routines provide basic accessing functions to the user memory * space for the kernel. This header file provides functions such as: * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2001 - 2005 Tensilica Inc. */ #ifndef _XTENSA_ASM_UACCESS_H #define _XTENSA_ASM_UACCESS_H #include <linux/errno.h> #include <asm/types.h> #include <asm/current.h> #include <asm/asm-offsets.h> #include <asm/processor.h> /* * These assembly macros mirror the C macros in asm/uaccess.h. They * should always have identical functionality. See * arch/xtensa/kernel/sys.S for usage. */ #define KERNEL_DS 0 #define USER_DS 1 /* * get_fs reads current->thread.current_ds into a register. * On Entry: * <ad> anything * <sp> stack * On Exit: * <ad> contains current->thread.current_ds */ .macro get_fs ad, sp GET_CURRENT(\ad,\sp) #if THREAD_CURRENT_DS > 1020 addi \ad, \ad, TASK_THREAD l32i \ad, \ad, THREAD_CURRENT_DS - TASK_THREAD #else l32i \ad, \ad, THREAD_CURRENT_DS #endif .endm /* * set_fs sets current->thread.current_ds to some value. * On Entry: * <at> anything (temp register) * <av> value to write * <sp> stack * On Exit: * <at> destroyed (actually, current) * <av> preserved, value to write */ .macro set_fs at, av, sp GET_CURRENT(\at,\sp) s32i \av, \at, THREAD_CURRENT_DS .endm /* * kernel_ok determines whether we should bypass addr/size checking. * See the equivalent C-macro version below for clarity. * On success, kernel_ok branches to a label indicated by parameter * <success>. This implies that the macro falls through to the next * insruction on an error. * * Note that while this macro can be used independently, we designed * in for optimal use in the access_ok macro below (i.e., we fall * through on error). * * On Entry: * <at> anything (temp register) * <success> label to branch to on success; implies * fall-through macro on error * <sp> stack pointer * On Exit: * <at> destroyed (actually, current->thread.current_ds) */ #if ((KERNEL_DS != 0) || (USER_DS == 0)) # error Assembly macro kernel_ok fails #endif .macro kernel_ok at, sp, success get_fs \at, \sp beqz \at, \success .endm /* * user_ok determines whether the access to user-space memory is allowed. * See the equivalent C-macro version below for clarity. * * On error, user_ok branches to a label indicated by parameter * <error>. This implies that the macro falls through to the next * instruction on success. * * Note that while this macro can be used independently, we designed * in for optimal use in the access_ok macro below (i.e., we fall * through on success). * * On Entry: * <aa> register containing memory address * <as> register containing memory size * <at> temp register * <error> label to branch to on error; implies fall-through * macro on success * On Exit: * <aa> preserved * <as> preserved * <at> destroyed (actually, (TASK_SIZE + 1 - size)) */ .macro user_ok aa, as, at, error movi \at, __XTENSA_UL_CONST(TASK_SIZE) bgeu \as, \at, \error sub \at, \at, \as bgeu \aa, \at, \error .endm /* * access_ok determines whether a memory access is allowed. See the * equivalent C-macro version below for clarity. * * On error, access_ok branches to a label indicated by parameter * <error>. This implies that the macro falls through to the next * instruction on success. * * Note that we assume success is the common case, and we optimize the * branch fall-through case on success. * * On Entry: * <aa> register containing memory address * <as> register containing memory size * <at> temp register * <sp> * <error> label to branch to on error; implies fall-through * macro on success * On Exit: * <aa> preserved * <as> preserved * <at> destroyed */ .macro access_ok aa, as, at, sp, error kernel_ok \at, \sp, .Laccess_ok_\@ user_ok \aa, \as, \at, \error .Laccess_ok_\@: .endm #endif /* _XTENSA_ASM_UACCESS_H */
Save
cmd:
run