From: Chunyan Zhang Date: Tue, 18 Nov 2025 04:19:24 +0000 (-0700) Subject: raid6: riscv: Prevent compiler from breaking inline vector assembly code X-Git-Tag: v6.19-rc1~105^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fcce9f028fb75ce03e4221f5f4f652741d178c4;p=thirdparty%2Fkernel%2Flinux.git raid6: riscv: Prevent compiler from breaking inline vector assembly code To prevent the compiler from breaking the inline vector assembly code, this code must be built without compiler support for vector. Signed-off-by: Chunyan Zhang Link: https://patch.msgid.link/20250718072711.3865118-4-zhangchunyan@iscas.ac.cn [pjw@kernel.org: cleaned up commit message] Signed-off-by: Paul Walmsley --- diff --git a/lib/raid6/rvv.c b/lib/raid6/rvv.c index 89da5fc247aa9..015f3ee4da259 100644 --- a/lib/raid6/rvv.c +++ b/lib/raid6/rvv.c @@ -20,6 +20,10 @@ static int rvv_has_vector(void) return has_vector(); } +#ifdef __riscv_vector +#error "This code must be built without compiler support for vector" +#endif + static void raid6_rvv1_gen_syndrome_real(int disks, unsigned long bytes, void **ptrs) { u8 **dptr = (u8 **)ptrs;