percpu error in linux-next (CONFIG_SMP=n)
Subsystems (2)
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,
Signature · 1 line
~Randy
Tejun Heo
maintainerPATCH 1/1 percpu: add missing per_cpu_ptr_to_phys() definition for UP
Commit 3b034b0d084221596bf35c8d893e1d4d5477b9cc implemented per_cpu_ptr_to_phys() but forgot to add UP definition. Add UP definition which is simple wrapper around __pa().
---
Hello,
Quoted 5 lines
drivers/base/cpu.c: line 100: fails to build whenCONFIG_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(-)
include/linux/percpu.h +5 -0
@@ -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)
Signature · 1 line
1.6.4.2
Re: [PATCH] percpu: add missing per_cpu_ptr_to_phys() definition for UP
Quoted 7 lines · Tejun Heo
Commit
3b034b0d084221596bf35c8d893e1d4d5477b9ccimplementedper_cpu_ptr_to_phys()but forgot to add UP definition. Add UP definition which is simple wrapper around__pa().Signed-off-by Tejun Heo <[email protected]>Cc Vivek Goyal <[email protected]>Reported-by Randy Dunlap <[email protected]>
Yes, that builds now. Thanks.
Quoted 32 lines
---
Hello,Quoted 5 lines
drivers/base/cpu.c: line 100: fails to build whenCONFIG_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(-)include/linux/percpu.h +5
-0@@ -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)
Signature · 1 line
~Randy