summaryrefslogtreecommitdiffstats
path: root/drivers/edac/i7core_edac.c
diff options
context:
space:
mode:
authorRandy Dunlap2009-11-08 04:36:40 +0100
committerMauro Carvalho Chehab2010-05-10 16:49:32 +0200
commit3b918c12df4f624140456d6c6f982bada8e1f095 (patch)
treea5a7442d08e5071c286fec36cabf733bb1883ee3 /drivers/edac/i7core_edac.c
parentedac: i7core_edac produces undefined behaviour on 32bit (diff)
downloadkernel-qcow2-linux-3b918c12df4f624140456d6c6f982bada8e1f095.tar.gz
kernel-qcow2-linux-3b918c12df4f624140456d6c6f982bada8e1f095.tar.xz
kernel-qcow2-linux-3b918c12df4f624140456d6c6f982bada8e1f095.zip
edac: fix i7core build
Fix build warning (missing header file) and build error when CONFIG_SMP=n. drivers/edac/i7core_edac.c:860: error: implicit declaration of function 'msleep' drivers/edac/i7core_edac.c:1700: error: 'struct cpuinfo_x86' has no member named 'phys_proc_id' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i7core_edac.c')
-rw-r--r--drivers/edac/i7core_edac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index bd7c727030a3..e944b63d9f06 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -25,6 +25,7 @@
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/slab.h>
+#include <linux/delay.h>
#include <linux/edac.h>
#include <linux/mmzone.h>
#include <linux/edac_mce.h>
@@ -1696,9 +1697,11 @@ static int i7core_mce_check_error(void *priv, struct mce *mce)
if (mce->bank != 8)
return 0;
+#ifdef CONFIG_SMP
/* Only handle if it is the right mc controller */
if (cpu_data(mce->cpu).phys_proc_id != pvt->i7core_dev->socket)
return 0;
+#endif
smp_rmb();
if ((pvt->mce_out + 1) % MCE_LOG_LEN == pvt->mce_in) {