public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Miles Lane" <miles.lane@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"shannon.nelson@intel.com" <shannon.nelson@intel.com>,
	Andi Kleen <ak@suse.de>, "Luck, Tony" <tony.luck@intel.com>
Subject: Re: 2.6.23-rc2-mm1 -- drivers/dma/ioat_dca.c:177: error: implicit declaration of function ___cpu_physical_id___
Date: Thu, 9 Aug 2007 11:52:58 -0700	[thread overview]
Message-ID: <20070809115258.5372f76e.akpm@linux-foundation.org> (raw)
In-Reply-To: <a44ae5cd0708090718v5dc19572k69087f170f9ba857@mail.gmail.com>

On Thu, 9 Aug 2007 10:18:15 -0400
"Miles Lane" <miles.lane@gmail.com> wrote:

>   CC      drivers/dma/ioat_dca.o
> drivers/dma/ioat_dca.c: In function 'ioat_dca_get_tag':
> drivers/dma/ioat_dca.c:177: error: implicit declaration of function
> 'cpu_physical_id'

Looks like cpu_physical_id() doesn't get implemented if CONFIG_SMP=n.

Either ioat needs to stop using cpu_physical_id() if SMP=n, or the
supported architectures (i386, x86_64, ia64) should provide a non-SMP
version of cpu_physical_id().  Preferably the latter, I'd say.

Something like this, I suppose...


From: Andrew Morton <akpm@linux-foundation.org>

i386, x86_64 and ia64 implement cpu_physical_id() if CONFIG_SMP=y.

Provide a uniprocessor stub so that callers will dtrt.

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

 include/linux/smp.h |    5 +++++
 1 files changed, 5 insertions(+)

diff -puN include/linux/smp.h~implement-cpu_physical_id-on-smp=n include/linux/smp.h
--- a/include/linux/smp.h~implement-cpu_physical_id-on-smp=n
+++ a/include/linux/smp.h
@@ -108,6 +108,11 @@ static inline void smp_send_reschedule(i
 	0;			\
 })
 
+static inline unsigned cpu_physical_id(unsigned cpu)
+{
+	return 0;
+}
+
 #endif /* !SMP */
 
 /*
_


  parent reply	other threads:[~2007-08-09 18:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-09 14:18 2.6.23-rc2-mm1 -- drivers/dma/ioat_dca.c:177: error: implicit declaration of function ‘cpu_physical_id’ Miles Lane
2007-08-09 14:32 ` Adrian Bunk
2007-08-09 18:24   ` Miles Lane
2007-08-09 18:52 ` Andrew Morton [this message]
2007-08-10 13:13   ` 2.6.23-rc2-mm1 -- drivers/dma/ioat_dca.c:177: error: implicit declaration of function ___cpu_physical_id___ Miles Lane
2007-08-10 13:27   ` Andi Kleen
2007-08-10 16:46     ` Andrew Morton

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=20070809115258.5372f76e.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miles.lane@gmail.com \
    --cc=shannon.nelson@intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox