All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shannon Nelson <shannon.nelson@intel.com>
To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Cc: chris.leech@gmail.com, ak@suse.de, tony.luck@intel.com,
	shannon.nelson@intel.com
Subject: [PATCH -mm] IOAT: fix for UP use of cpu_physical_id()
Date: Mon, 20 Aug 2007 13:29:08 -0700	[thread overview]
Message-ID: <20070820202908.14306.31248.stgit@localhost.localdomain> (raw)

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"
 

             reply	other threads:[~2007-08-20 20:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20 20:29 Shannon Nelson [this message]
2007-08-20 22:26 ` [PATCH -mm] IOAT: fix for UP use of cpu_physical_id() H. Peter Anvin
2007-08-20 23:21   ` Nelson, Shannon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070820202908.14306.31248.stgit@localhost.localdomain \
    --to=shannon.nelson@intel.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=chris.leech@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.