aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorSimon Arlott <simon@fire.lp0.eu>2007-05-02 08:08:26 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2007-05-02 08:08:26 -0400
commitf6259deacfd55607ae57cff422d3bc7694ea14e7 (patch)
treed984d50afb2ee4cfa941008fd879fd64ca9629a0 /drivers/crypto
parente196d6259141eda47aeafd88514aae652bfbfc7f (diff)
[CRYPTO] padlock: Remove pointless padlock module
When this is compiled in it is run too early to do 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. When it's a module it isn't doing anything special, the same functionality can be provided in userspace by "probeall padlock padlock-aes padlock-sha" in modules.conf if it is required. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Cc: Michal Ludvig <michal@logix.cz> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/Kconfig16
-rw-r--r--drivers/crypto/Makefile1
-rw-r--r--drivers/crypto/padlock.c58
3 files changed, 3 insertions, 72 deletions
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index ff8c4beaace4..f21fe66c9eef 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -1,10 +1,10 @@
1menu "Hardware crypto devices" 1menu "Hardware crypto devices"
2 2
3config CRYPTO_DEV_PADLOCK 3config CRYPTO_DEV_PADLOCK
4 tristate "Support for VIA PadLock ACE" 4 bool "Support for VIA PadLock ACE"
5 depends on X86_32 5 depends on X86_32
6 select CRYPTO_ALGAPI 6 select CRYPTO_ALGAPI
7 default m 7 default y
8 help 8 help
9 Some VIA processors come with an integrated crypto engine 9 Some VIA processors come with an integrated crypto engine
10 (so called VIA PadLock ACE, Advanced Cryptography Engine) 10 (so called VIA PadLock ACE, Advanced Cryptography Engine)
@@ -14,16 +14,6 @@ config CRYPTO_DEV_PADLOCK
14 The instructions are used only when the CPU supports them. 14 The instructions are used only when the CPU supports them.
15 Otherwise software encryption is used. 15 Otherwise software encryption is used.
16 16
17 Selecting M for this option will compile a helper module
18 padlock.ko that should autoload all below configured
19 algorithms. Don't worry if your hardware does not support
20 some or all of them. In such case padlock.ko will
21 simply write a single line into the kernel log informing
22 about its failure but everything will keep working fine.
23
24 If you are unsure, say M. The compiled module will be
25 called padlock.ko
26
27config CRYPTO_DEV_PADLOCK_AES 17config CRYPTO_DEV_PADLOCK_AES
28 tristate "PadLock driver for AES algorithm" 18 tristate "PadLock driver for AES algorithm"
29 depends on CRYPTO_DEV_PADLOCK 19 depends on CRYPTO_DEV_PADLOCK
@@ -55,7 +45,7 @@ source "arch/s390/crypto/Kconfig"
55 45
56config CRYPTO_DEV_GEODE 46config CRYPTO_DEV_GEODE
57 tristate "Support for the Geode LX AES engine" 47 tristate "Support for the Geode LX AES engine"
58 depends on CRYPTO && X86_32 && PCI 48 depends on X86_32 && PCI
59 select CRYPTO_ALGAPI 49 select CRYPTO_ALGAPI
60 select CRYPTO_BLKCIPHER 50 select CRYPTO_BLKCIPHER
61 default m 51 default m
diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
index 6059cf869414..d070030f7d7e 100644
--- a/drivers/crypto/Makefile
+++ b/drivers/crypto/Makefile
@@ -1,4 +1,3 @@
1obj-$(CONFIG_CRYPTO_DEV_PADLOCK) += padlock.o
2obj-$(CONFIG_CRYPTO_DEV_PADLOCK_AES) += padlock-aes.o 1obj-$(CONFIG_CRYPTO_DEV_PADLOCK_AES) += padlock-aes.o
3obj-$(CONFIG_CRYPTO_DEV_PADLOCK_SHA) += padlock-sha.o 2obj-$(CONFIG_CRYPTO_DEV_PADLOCK_SHA) += padlock-sha.o
4obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o 3obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o
diff --git a/drivers/crypto/padlock.c b/drivers/crypto/padlock.c
deleted file mode 100644
index d6d7dd5bb98c..000000000000
--- a/drivers/crypto/padlock.c
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * Cryptographic API.
3 *
4 * Support for VIA PadLock hardware crypto engine.
5 *
6 * Copyright (c) 2006 Michal Ludvig <michal@logix.cz>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 */
14
15#include <linux/module.h>
16#include <linux/init.h>
17#include <linux/errno.h>
18#include <linux/crypto.h>
19#include <linux/cryptohash.h>
20#include <linux/interrupt.h>
21#include <linux/kernel.h>
22#include <linux/scatterlist.h>
23#include "padlock.h"
24
25static int __init padlock_init(void)
26{
27 int success = 0;
28
29 if (crypto_has_cipher("aes-padlock", 0, 0))
30 success++;
31
32 if (crypto_has_hash("sha1-padlock", 0, 0))
33 success++;
34
35 if (crypto_has_hash("sha256-padlock", 0, 0))
36 success++;
37
38 if (!success) {
39 printk(KERN_WARNING PFX "No VIA PadLock drivers have been loaded.\n");
40 return -ENODEV;
41 }
42
43 printk(KERN_NOTICE PFX "%d drivers are available.\n", success);
44
45 return 0;
46}
47
48static void __exit padlock_fini(void)
49{
50}
51
52module_init(padlock_init);
53module_exit(padlock_fini);
54
55MODULE_DESCRIPTION("Load all configured PadLock algorithms.");
56MODULE_LICENSE("GPL");
57MODULE_AUTHOR("Michal Ludvig");
58