s390/crypto: add cpu feature modaliases for crypto modules
Use the module_cpu_feature_match() module init function to add an module alias based on required CPU features. The modules are automatically loaded on hardware that supports the required CPU features. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

orang tua
8f00b3e28f
melakukan
d05377c12a
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/cpufeature.h>
|
||||
|
||||
#include "crypt_s390.h"
|
||||
|
||||
@@ -158,7 +159,7 @@ static void __exit ghash_mod_exit(void)
|
||||
crypto_unregister_shash(&ghash_alg);
|
||||
}
|
||||
|
||||
module_init(ghash_mod_init);
|
||||
module_cpu_feature_match(MSA, ghash_mod_init);
|
||||
module_exit(ghash_mod_exit);
|
||||
|
||||
MODULE_ALIAS_CRYPTO("ghash");
|
||||
|
Reference in New Issue
Block a user