Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

percpu error in linux-next (CONFIG_SMP=n)

 
   Soft32 Home -> Linux -> Kernel RSS
Next:  [PATCH 4/4] copy_signal cleanup: clean tty_audit_..  
Author Message
Randy Dunlap

External


Since: Nov 08, 2006
Posts: 929



(Msg. 1) Posted: Tue Dec 01, 2009 5:20 pm
Post subject: percpu error in linux-next (CONFIG_SMP=n)
Archived from groups: linux>kernel (more info?)

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Tejun Heo

External


Since: Nov 05, 2008
Posts: 311



(Msg. 2) Posted: Tue Dec 01, 2009 7:20 pm
Post subject: [PATCH] percpu: add missing per_cpu_ptr_to_phys() definition for UP [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 DeleteThis @kernel.org>
Cc: Vivek Goyal <vgoyal DeleteThis @redhat.com>
Reported-by: Randy Dunlap <randy.dunlap DeleteThis @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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo DeleteThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Randy Dunlap

External


Since: Nov 08, 2006
Posts: 929



(Msg. 3) Posted: Wed Dec 02, 2009 11:20 am
Post subject: Re: [PATCH] percpu: add missing per_cpu_ptr_to_phys() definition for UP [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.RemoveThis@kernel.org>
> Cc: Vivek Goyal <vgoyal.RemoveThis@redhat.com>
> Reported-by: Randy Dunlap <randy.dunlap.RemoveThis@oracle.com>

Yes, that builds now. Thanks.

Acked-by: Randy Dunlap <randy.dunlap.RemoveThis@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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[PATCH 1/2] Account for module percpu space separately fro.. - Rather than using a single constant PERCPU_ENOUGH_ROOM, compute it as the sum of kernel_percpu + PERCPU_MODULE_RESERVE....

[PATCH] kexec: Fix CONFIG_SMP=n compilation (ia64) - kexec: Fix CONFIG_SMP=n compilation (ia64) This patch makes it possible to compile kexec for ia64 without SMP support....

[PATCH] kexec: Fix CONFIG_SMP=n compilation V2 (ia64) - kexec: Fix CONFIG_SMP=n compilation V2 (ia64) Kexec support for 2.6.20 on ia64 does not build properly using a config....

[PATCH] i386/x86_64: NMI watchdog: Protect smp_call_functi.. - a. arch/i386/kernel/nmi.c:check_nmi_watchdog() calls smp_call_function() unconditionally. Protect it inside a..

[patch 0/6] i386 gdt and percpu cleanups - Hi Andi, This is a series of patches based on your latest queue (as of the other day, at least). It includes: - the....

[PATCH 2/2] Allow percpu variables to be page-aligned - Let's allow page-alignment in general for per-cpu data (wanted by Xen, and Ingo suggested KVM as well). Because larger...
       Soft32 Home -> Linux -> Kernel All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]