[PATCH] riscv: vector: Fixup modules compile error

Conor Dooley conor.dooley at microchip.com
Mon May 29 06:42:34 PDT 2023


On Mon, May 29, 2023 at 03:38:45AM -0400, guoren at kernel.org wrote:
> From: Guo Ren <guoren at linux.alibaba.com>
> 
> Some .ko also need the riscv_v_user_allowed symbol.
> 
> ERROR: modpost: "riscv_v_user_allowed" [arch/riscv/kvm/kvm.ko]
> undefined!
> make[3]: ***
> [/home/guoren/source/kernel/linux/scripts/Makefile.modpost:136:
> Module.symvers] Error 1
> 
> Signed-off-by: Guo Ren <guoren at linux.alibaba.com>
> Signed-off-by: Guo Ren <guoren at kernel.org>
> ---
>  arch/riscv/kernel/vector.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/riscv/kernel/vector.c b/arch/riscv/kernel/vector.c
> index 1c4ac821e008..3ae08816d608 100644
> --- a/arch/riscv/kernel/vector.c
> +++ b/arch/riscv/kernel/vector.c
> @@ -129,6 +129,7 @@ bool riscv_v_user_allowed(void)
>  {
>  	return riscv_v_get_cur_ctrl(current) == PR_RISCV_V_VSTATE_CTRL_ON;
>  }
> +EXPORT_SYMBOL(riscv_v_user_allowed);

Is there a reason that this should not be EXPORT_SYMBOL_GPL()?

I figure Andy will roll this into this next revision..

Cheers,
Conor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20230529/de1ccac9/attachment.sig>


More information about the linux-riscv mailing list