]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
raid6: riscv: Prevent compiler from breaking inline vector assembly code
authorChunyan Zhang <zhangchunyan@iscas.ac.cn>
Tue, 18 Nov 2025 04:19:24 +0000 (21:19 -0700)
committerPaul Walmsley <pjw@kernel.org>
Wed, 19 Nov 2025 16:19:28 +0000 (09:19 -0700)
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 <zhangchunyan@iscas.ac.cn>
Link: https://patch.msgid.link/20250718072711.3865118-4-zhangchunyan@iscas.ac.cn
[pjw@kernel.org: cleaned up commit message]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
lib/raid6/rvv.c

index 89da5fc247aa942c880f79322412099e168fa877..015f3ee4da259596d5ca94caa96a838f09f9a2a0 100644 (file)
@@ -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;