1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <linux/linkage.h>
5 #include <asm/asm-extable.h>
14 #define ELEM_LMUL_SETTING m8
17 .macro fixup op reg addr lbl
20 _asm_extable 100b, \lbl
23 SYM_FUNC_START(__asm_vector_usercopy)
24 /* Enable access to user memory */
29 vsetvli iVL, iNum, e8, ELEM_LMUL_SETTING, ta, ma
30 fixup vle8.v vData, (pSrc), 10f
33 fixup vse8.v vData, (pDst), 11f
37 /* Exception fixup for vector load is shared with normal exit */
39 /* Disable access to user memory */
44 /* Exception fixup code for vector store. */
46 /* Undo the subtraction after vle8.v */
48 /* Make sure the scalar fallback skip already processed bytes */
52 SYM_FUNC_END(__asm_vector_usercopy)