uaccess.S (ab1c247094e323177a578b38f0325bf79f0317ac) | uaccess.S (c2a658d419246108c9bf065ec347355de5ba8a05) |
---|---|
1#include <linux/linkage.h> 2#include <asm-generic/export.h> 3#include <asm/asm.h> 4#include <asm/asm-extable.h> 5#include <asm/csr.h> | 1#include <linux/linkage.h> 2#include <asm-generic/export.h> 3#include <asm/asm.h> 4#include <asm/asm-extable.h> 5#include <asm/csr.h> |
6#include <asm/hwcap.h> 7#include <asm/alternative-macros.h> |
|
6 7 .macro fixup op reg addr lbl 8100: 9 \op \reg, \addr 10 _asm_extable 100b, \lbl 11 .endm 12 13SYM_FUNC_START(__asm_copy_to_user) | 8 9 .macro fixup op reg addr lbl 10100: 11 \op \reg, \addr 12 _asm_extable 100b, \lbl 13 .endm 14 15SYM_FUNC_START(__asm_copy_to_user) |
16#ifdef CONFIG_RISCV_ISA_V 17 ALTERNATIVE("j fallback_scalar_usercopy", "nop", 0, RISCV_ISA_EXT_v, CONFIG_RISCV_ISA_V) 18 REG_L t0, riscv_v_usercopy_threshold 19 bltu a2, t0, fallback_scalar_usercopy 20 tail enter_vector_usercopy 21#endif 22SYM_FUNC_START(fallback_scalar_usercopy) |
|
14 15 /* Enable access to user memory */ 16 li t6, SR_SUM 17 csrs CSR_STATUS, t6 18 19 /* 20 * Save the terminal address which will be used to compute the number 21 * of bytes copied in case of a fixup exception. --- 154 unchanged lines hidden (view full) --- 176 177 /* Exception fixup code */ 17810: 179 /* Disable access to user memory */ 180 csrc CSR_STATUS, t6 181 sub a0, t5, a0 182 ret 183SYM_FUNC_END(__asm_copy_to_user) | 23 24 /* Enable access to user memory */ 25 li t6, SR_SUM 26 csrs CSR_STATUS, t6 27 28 /* 29 * Save the terminal address which will be used to compute the number 30 * of bytes copied in case of a fixup exception. --- 154 unchanged lines hidden (view full) --- 185 186 /* Exception fixup code */ 18710: 188 /* Disable access to user memory */ 189 csrc CSR_STATUS, t6 190 sub a0, t5, a0 191 ret 192SYM_FUNC_END(__asm_copy_to_user) |
193SYM_FUNC_END(fallback_scalar_usercopy) |
|
184EXPORT_SYMBOL(__asm_copy_to_user) 185SYM_FUNC_ALIAS(__asm_copy_from_user, __asm_copy_to_user) 186EXPORT_SYMBOL(__asm_copy_from_user) 187 188 189SYM_FUNC_START(__clear_user) 190 191 /* Enable access to user memory */ --- 45 unchanged lines hidden --- | 194EXPORT_SYMBOL(__asm_copy_to_user) 195SYM_FUNC_ALIAS(__asm_copy_from_user, __asm_copy_to_user) 196EXPORT_SYMBOL(__asm_copy_from_user) 197 198 199SYM_FUNC_START(__clear_user) 200 201 /* Enable access to user memory */ --- 45 unchanged lines hidden --- |