diff options
Diffstat (limited to 'drivers/crypto/padlock-aes.c')
-rw-r--r-- | drivers/crypto/padlock-aes.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c index 29b9469f8378..37b2e9406af6 100644 --- a/drivers/crypto/padlock-aes.c +++ b/drivers/crypto/padlock-aes.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/percpu.h> | 19 | #include <linux/percpu.h> |
20 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <asm/cpu_device_id.h> | ||
22 | #include <asm/byteorder.h> | 23 | #include <asm/byteorder.h> |
23 | #include <asm/processor.h> | 24 | #include <asm/processor.h> |
24 | #include <asm/i387.h> | 25 | #include <asm/i387.h> |
@@ -503,12 +504,18 @@ static struct crypto_alg cbc_aes_alg = { | |||
503 | } | 504 | } |
504 | }; | 505 | }; |
505 | 506 | ||
507 | static struct x86_cpu_id padlock_cpu_id[] = { | ||
508 | X86_FEATURE_MATCH(X86_FEATURE_XCRYPT), | ||
509 | {} | ||
510 | }; | ||
511 | MODULE_DEVICE_TABLE(x86cpu, padlock_cpu_id); | ||
512 | |||
506 | static int __init padlock_init(void) | 513 | static int __init padlock_init(void) |
507 | { | 514 | { |
508 | int ret; | 515 | int ret; |
509 | struct cpuinfo_x86 *c = &cpu_data(0); | 516 | struct cpuinfo_x86 *c = &cpu_data(0); |
510 | 517 | ||
511 | if (!cpu_has_xcrypt) | 518 | if (!x86_match_cpu(padlock_cpu_id)) |
512 | return -ENODEV; | 519 | return -ENODEV; |
513 | 520 | ||
514 | if (!cpu_has_xcrypt_enabled) { | 521 | if (!cpu_has_xcrypt_enabled) { |