From 3c58d7a51341fa032eda45d8b9904dbfae120ef5 Mon Sep 17 00:00:00 2001 From: Chunyan Zhang Date: Mon, 17 Nov 2025 21:19:25 -0700 Subject: raid6: riscv: Allow code to be compiled in userspace To support userspace raid6test, this patch adds __KERNEL__ ifdef for kernel header inclusions also userspace wrapper definitions to allow code to be compiled in userspace. This patch also drops the NSIZE macro, instead of using the vector length, which can work for both kernel and user space. Reviewed-by: Alexandre Ghiti Signed-off-by: Chunyan Zhang Link: https://patch.msgid.link/20250718072711.3865118-5-zhangchunyan@iscas.ac.cn Signed-off-by: Paul Walmsley --- lib/raid6/recov_rvv.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/raid6/recov_rvv.c') diff --git a/lib/raid6/recov_rvv.c b/lib/raid6/recov_rvv.c index 5f779719c3d3..40c393206b6a 100644 --- a/lib/raid6/recov_rvv.c +++ b/lib/raid6/recov_rvv.c @@ -4,13 +4,8 @@ * Author: Chunyan Zhang */ -#include #include - -static int rvv_has_vector(void) -{ - return has_vector(); -} +#include "rvv.h" static void __raid6_2data_recov_rvv(int bytes, u8 *p, u8 *q, u8 *dp, u8 *dq, const u8 *pbmul, -- cgit