lkml.org 
[lkml]   [2008]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] padlock: don't whinge when loaded on a non-VIA cpu
I've become seriously tired of seeing these messages on every machine
running an i386 Fedora kernel...

padlock: VIA PadLock not detected.
padlock: VIA PadLock Hash Engine not detected.

So let's eliminate them!

Signed-off-by: Kyle McMartin <kmcmartin@redhat.com>

---
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
index bb30eb9..c11f456 100644
--- a/drivers/crypto/padlock-aes.c
+++ b/drivers/crypto/padlock-aes.c
@@ -384,6 +384,9 @@ static int __init padlock_init(void)
{
int ret;

+ if (!(boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR))
+ return -ENODEV;
+
if (!cpu_has_xcrypt) {
printk(KERN_ERR PFX "VIA PadLock not detected.\n");
return -ENODEV;
diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c
index c666b4e..9b360fb 100644
--- a/drivers/crypto/padlock-sha.c
+++ b/drivers/crypto/padlock-sha.c
@@ -253,6 +253,9 @@ static int __init padlock_init(void)
{
int rc = -ENODEV;

+ if (!(boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR))
+ return -ENODEV;
+
if (!cpu_has_phe) {
printk(KERN_ERR PFX "VIA PadLock Hash Engine not detected.\n");
return -ENODEV;

\
 
 \ /
  Last update: 2008-07-08 21:07    [W:0.053 / U:0.104 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site