linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* percpu error in linux-next (CONFIG_SMP=n)
@ 2009-12-01 18:30 Randy Dunlap
  2009-12-01 23:42 ` [PATCH] percpu: add missing per_cpu_ptr_to_phys() definition for UP Tejun Heo
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2009-12-01 18:30 UTC (permalink / raw)
  To: Tejun Heo, LKML, linux-next

hi Tejun,

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?

thanks,
-- 
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] percpu: add missing per_cpu_ptr_to_phys() definition for UP
  2009-12-01 18:30 percpu error in linux-next (CONFIG_SMP=n) Randy Dunlap
@ 2009-12-01 23:42 ` Tejun Heo
  2009-12-02 16:38   ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2009-12-01 23:42 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: LKML, linux-next, Vivek Goyal

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] percpu: add missing per_cpu_ptr_to_phys() definition for UP
  2009-12-01 23:42 ` [PATCH] percpu: add missing per_cpu_ptr_to_phys() definition for UP Tejun Heo
@ 2009-12-02 16:38   ` Randy Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2009-12-02 16:38 UTC (permalink / raw)
  To: Tejun Heo; +Cc: LKML, linux-next, Vivek Goyal

Tejun Heo wrote:
> 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>

Yes, that builds now.  Thanks.

Acked-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)


-- 
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-02 16:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 18:30 percpu error in linux-next (CONFIG_SMP=n) Randy Dunlap
2009-12-01 23:42 ` [PATCH] percpu: add missing per_cpu_ptr_to_phys() definition for UP Tejun Heo
2009-12-02 16:38   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).