diff options
author | David S. Miller <davem@davemloft.net> | 2012-09-15 09:46:25 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-15 09:46:25 -0700 |
commit | 979e93ca24e8336acb660529676dcda6817d8a1f (patch) | |
tree | 40f854f3b7b0e3e333738cf699d0acfcbfef85bf /arch/sparc/crypto/crop_devid.c | |
parent | 71741680a9858a7fcba54acf5b321d185abef1e8 (diff) | |
download | linux-979e93ca24e8336acb660529676dcda6817d8a1f.tar.bz2 |
sparc64: Add auto-loading mechanism to crypto-opcode drivers.
Just simply provide a device table containing an entry for sun4v cpus,
the capability mask checks in the drivers themselves will take care of
the rest.
This makes the bootup logs on pre-T4 cpus slightly more verbose, with
each driver indicating lack of support for the associated opcode(s).
But this isn't too much of a real problem.
I toyed with the idea of using explicit entries with compatability
fields of "SPARC-T4", "SPARC-T5", etc. but all future cpus will have
some subset of these opcodes available and this would just be one more
pointless thing to do as each new cpu is released with a new string.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/crypto/crop_devid.c')
-rw-r--r-- | arch/sparc/crypto/crop_devid.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/sparc/crypto/crop_devid.c b/arch/sparc/crypto/crop_devid.c new file mode 100644 index 000000000000..5f5724a0ae22 --- /dev/null +++ b/arch/sparc/crypto/crop_devid.c @@ -0,0 +1,14 @@ +#include <linux/module.h> +#include <linux/of_device.h> + +/* This is a dummy device table linked into all of the crypto + * opcode drivers. It serves to trigger the module autoloading + * mechanisms in userspace which scan the OF device tree and + * load any modules which have device table entries that + * match OF device nodes. + */ +static const struct of_device_id crypto_opcode_match[] = { + { .name = "cpu", .compatible = "sun4v", }, + {}, +}; +MODULE_DEVICE_TABLE(of, crypto_opcode_match); |