[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SHXPR01MB067059F064CD56ED58DE6F9A8A43A@SHXPR01MB0670.CHNPR01.prod.partner.outlook.cn>
Date: Thu, 1 Feb 2024 06:40:09 +0000
From: JiaJie Ho <jiajie.ho@...rfivetech.com>
To: 'Herbert Xu' <herbert@...dor.apana.org.au>
CC: "'David S . Miller'" <davem@...emloft.net>, 'Rob Herring'
<robh+dt@...nel.org>, 'Krzysztof Kozlowski'
<krzysztof.kozlowski+dt@...aro.org>, 'Conor Dooley' <conor+dt@...nel.org>,
"'linux-crypto@...r.kernel.org'" <linux-crypto@...r.kernel.org>,
"'devicetree@...r.kernel.org'" <devicetree@...r.kernel.org>,
"'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 4/5] crypto: starfive: Add sm3 support for JH8100
> > Currently, the object files defining new algo register/unregister functions
> weren't included in Makefile for unsupported device.
> > Compiler will still check for these definitions if IS_ENABLED is used instead of
> ifdef causing build errors.
>
> Please point me to specific examples of something that's included in the
> output and shouldn't be.
>
When compiling both CRYPTO_DEV_JH7110 and CRYPTO_DEV_JH8100 as module,
the compiler flags the following functions as undefined even though they are folded in IS_REACHABLE
#if IS_REACHABLE(CONFIG_CRYPTO_DEV_JH8100)
int starfive_sm3_register_algs(void);
void starfive_sm3_unregister_algs(void);
int starfive_sm4_register_algs(void);
void starfive_sm4_unregister_algs(void);
void starfive_sm3_done_task(unsigned long param);
#endif
ERROR: modpost: "starfive_sm3_done_task" [drivers/crypto/starfive/jh7110-crypto.ko] undefined!
ERROR: modpost: "starfive_sm4_register_algs" [drivers/crypto/starfive/jh7110-crypto.ko] undefined!
ERROR: modpost: "starfive_sm3_unregister_algs" [drivers/crypto/starfive/jh7110-crypto.ko] undefined!
ERROR: modpost: "starfive_sm3_register_algs" [drivers/crypto/starfive/jh7110-crypto.ko] undefined!
ERROR: modpost: "starfive_sm4_unregister_algs" [drivers/crypto/starfive/jh7110-crypto.ko] undefined!
The object files defining these functions aren't included for CRYPTO_DEV_JH7110 in the Makefile.
obj-$(CONFIG_CRYPTO_DEV_JH7110) += jh7110-crypto.o
jh7110-crypto-objs := jh7110-cryp.o jh7110-hash.o jh7110-rsa.o jh7110-aeso
obj-$(CONFIG_CRYPTO_DEV_JH8100) += jh8100-crypto.o
jh8100-crypto-objs := jh7110-cryp.o jh7110-hash.o jh7110-rsa.o jh7110-aeso jh8100-sm3.o jh8100-sm4.o
Thanks,
Jia Jie
Powered by blists - more mailing lists