lkml.org 
[lkml]   [2007]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -mm] IOAT: fix for UP use of cpu_physical_id()
Date
Make sure we can use cpu_physical_id() even when compiled for
uni-processor.

Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Chris Leech <chris.leech@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
---

drivers/dma/ioat_dca.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/ioat_dca.c b/drivers/dma/ioat_dca.c
index c3a500b..b1af49c 100644
--- a/drivers/dma/ioat_dca.c
+++ b/drivers/dma/ioat_dca.c
@@ -25,6 +25,14 @@
#include <linux/smp.h>
#include <linux/interrupt.h>
#include <linux/dca.h>
+
+// either a kernel change is needed, or we need something like this in kernel
+#ifndef CONFIG_SMP
+#include <asm/smp.h>
+#undef cpu_physical_id
+#define cpu_physical_id(cpu) (cpuid_ebx(1) >> 24)
+#endif
+
#include "ioatdma.h"
#include "ioatdma_registers.h"

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-08-20 22:39    [W:0.226 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site