[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4B1697ED.1050602@oracle.com>
Date: Wed, 02 Dec 2009 08:38:05 -0800
From: Randy Dunlap <randy.dunlap@...cle.com>
To: Tejun Heo <tj@...nel.org>
CC: LKML <linux-kernel@...r.kernel.org>, linux-next@...r.kernel.org,
Vivek Goyal <vgoyal@...hat.com>
Subject: Re: [PATCH] percpu: add missing per_cpu_ptr_to_phys() definition
for UP
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@...nel.org>
> Cc: Vivek Goyal <vgoyal@...hat.com>
> Reported-by: Randy Dunlap <randy.dunlap@...cle.com>
Yes, that builds now. Thanks.
Acked-by: Randy Dunlap <randy.dunlap@...cle.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists