1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <linux/linkage.h>
4 #include <asm-generic/export.h>
6 #include <asm/asm-extable.h>
15 #define ELEM_LMUL_SETTING m8
18 .macro fixup op reg addr lbl
21 _asm_extable 100b, \lbl
24 SYM_FUNC_START(__asm_vector_usercopy)
25 /* Enable access to user memory */
30 vsetvli iVL, iNum, e8, ELEM_LMUL_SETTING, ta, ma
31 fixup vle8.v vData, (pSrc), 10f
34 fixup vse8.v vData, (pDst), 11f
38 /* Exception fixup for vector load is shared with normal exit */
40 /* Disable access to user memory */
45 /* Exception fixup code for vector store. */
47 /* Undo the subtraction after vle8.v */
49 /* Make sure the scalar fallback skip already processed bytes */
53 SYM_FUNC_END(__asm_vector_usercopy)