Re: [PATCH] crypto: Use padlock.ko only as a module

From: Randy Dunlap
Date: Sat Apr 28 2007 - 18:35:44 EST


On Sat, 28 Apr 2007 17:44:42 +0100 Simon Arlott wrote:

> The padlock.ko module is completely useless when compiled in
> because it can't do anything and gets run too early to output
> anything useful:
>
> [ 6.052000] padlock: No VIA PadLock drivers have been loaded.
> [ 6.052000] padlock: Using VIA PadLock ACE for AES algorithm.
> [ 6.052000] padlock: Using VIA PadLock ACE for SHA1/SHA256 algorithms.
>
> Signed-off-by: Simon Arlott <simon@xxxxxxxxxxx>
> Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> ---
> drivers/crypto/Makefile | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
> index 6059cf8..f0f7a73 100644
> --- a/drivers/crypto/Makefile
> +++ b/drivers/crypto/Makefile
> @@ -1,4 +1,6 @@
> -obj-$(CONFIG_CRYPTO_DEV_PADLOCK) += padlock.o
> +ifeq ($(CONFIG_CRYPTO_DEV_PADLOCK),m)
> +obj-m += padlock.o
> +endif
> obj-$(CONFIG_CRYPTO_DEV_PADLOCK_AES) += padlock-aes.o
> obj-$(CONFIG_CRYPTO_DEV_PADLOCK_SHA) += padlock-sha.o
> obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o
> --

I think that we prefer to enforce config symbols in Kconfig files,
not in Makefiles. E.g.,

---
drivers/crypto/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2621-pv.orig/drivers/crypto/Kconfig
+++ linux-2621-pv/drivers/crypto/Kconfig
@@ -2,7 +2,7 @@ menu "Hardware crypto devices"

config CRYPTO_DEV_PADLOCK
tristate "Support for VIA PadLock ACE"
- depends on X86_32
+ depends on X86_32 && m
select CRYPTO_ALGAPI
default m
help


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/