From: Tejun Heo <tj@kernel.org>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-next@vger.kernel.org, Vivek Goyal <vgoyal@redhat.com>
Subject: [PATCH] percpu: add missing per_cpu_ptr_to_phys() definition for UP
Date: Wed, 02 Dec 2009 08:42:34 +0900 [thread overview]
Message-ID: <4B15A9EA.3090108@kernel.org> (raw)
In-Reply-To: <4B1560C2.8040603@oracle.com>
Commit 3b034b0d084221596bf35c8d893e1d4d5477b9cc implemented
per_cpu_ptr_to_phys() but forgot to add UP definition. Add UP
definition which is simple wrapper around __pa().
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
---
Hello,
> drivers/base/cpu.c: line 100: fails to build when CONFIG_SMP=n:
>
> addr = per_cpu_ptr_to_phys(per_cpu_ptr(crash_notes, cpunum));
>
> Can you suggest a fix for that, please?
Oops, right, UP definition was missing. This patch should do it.
Thanks.
include/linux/percpu.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 6ac984f..8e4ead6 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -180,6 +180,11 @@ static inline void free_percpu(void *p)
kfree(p);
}
+static inline phys_addr_t per_cpu_ptr_to_phys(void *addr)
+{
+ return __pa(addr);
+}
+
static inline void __init setup_per_cpu_areas(void) { }
static inline void *pcpu_lpage_remapped(void *kaddr)
--
1.6.4.2
next prev parent reply other threads:[~2009-12-01 23:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-01 18:30 percpu error in linux-next (CONFIG_SMP=n) Randy Dunlap
2009-12-01 23:42 ` Tejun Heo [this message]
2009-12-02 16:38 ` [PATCH] percpu: add missing per_cpu_ptr_to_phys() definition for UP Randy Dunlap
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=4B15A9EA.3090108@kernel.org \
--to=tj@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=vgoyal@redhat.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.