Remove old definition of setup_per_cpu_areas
PATCH 1/1 Remove old definition of setup_per_cpu_areas
Remove old definition of setup_per_cpu_areas.
The definition is done depending on the new config variable HAVE_SETUP_PER_CPU_AREA.
Signed-off-by Bastian Blank <[email protected]>
include/asm-powerpc/percpu.h +0 -2
@@ -30,8 +30,6 @@ do { \ (src), (size)); \ } while (0) -extern void setup_per_cpu_areas(void); -#else /* ! SMP */ #define per_cpu (var, cpu) (*((void)(cpu), &per_cpu__##var))
Quoted 1 line · Bastian Blank
Remove old definition of
setup_per_cpu_areas.
This was completely wrong. Lets try it again.
Adopt x86 percpu changes for powerpc and ia64.
dd5af90a7f3d79e04b7eace9a98644dbf2038f4d replaced the config variable ARCH_SETS_UP_PER_CPU_AREA with HAVE_SETUP_PER_CPU_AREA and moved percpu_modcopy into kernel/module.c.
Do the same for ia64 and powerpc.
| init/main.c:376: error: static declaration of ‘setup_per_cpu_areas’ follows non-static declaration | include/asm/percpu.h:33: error: previous declaration of ‘setup_per_cpu_areas’ was here
Signed-off-by Bastian Blank <[email protected]>
arch/ia64/Kconfig +1 -1
@@ -80,7 +80,7 @@ config GENERIC_TIME_VSYSCALL bool default y -config ARCH_SETS_UP_PER_CPU_AREA +config HAVE_SETUP_PER_CPU_AREA def_bool y config DMI
arch/ia64/kernel/module.c +0 -10
@@ -941,13 +941,3 @@ module_arch_cleanup (struct module *mod)unw_remove_unwind_table (mod->arch.core_unw_table); } -#ifdef CONFIG_SMP -void -percpu_modcopy (void *pcpudst,const void *src,unsigned long size) -{ -unsigned int i; -for_each_possible_cpu (i) { -memcpy (pcpudst +per_cpu_offset (i), src, size); - } -} -#endif /* CONFIG_SMP */
arch/powerpc/Kconfig +1 -1
@@ -42,7 +42,7 @@ config GENERIC_HARDIRQS bool default y -config ARCH_SETS_UP_PER_CPU_AREA +config HAVE_SETUP_PER_CPU_AREA def_bool PPC64 config IRQ_PER_CPU
arch/sparc64/Kconfig +1 -1
@@ -66,7 +66,7 @@ config AUDIT_ARCH bool default y -config ARCH_SETS_UP_PER_CPU_AREA +config HAVE_SETUP_PER_CPU_AREA def_bool y config ARCH_NO_VIRT_TO_BUS
include/asm-ia64/percpu.h +2 -1
@@ -38,8 +38,9 @@ DECLARE_PER_CPU(unsigned long, local_per_cpu_offset);#define __get_cpu_var (var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset)))#define __raw_get_cpu_var (var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset))) -extern void percpu_modcopy (void *pcpudst,const void *src,unsigned long size); +#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA extern void setup_per_cpu_areas (void ); +#endif extern void *per_cpu_init (void );#else /* ! SMP */
include/asm-powerpc/percpu.h +2 -9
@@ -21,16 +21,9 @@#define __get_cpu_var (var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset()))#define __raw_get_cpu_var (var) (*RELOC_HIDE(&per_cpu__##var, local_paca->data_offset)) -/* A macro to avoid #include hell... */ -#define percpu_modcopy (pcpudst, src, size) \ -do { \ - unsigned int __i; \ - for_each_possible_cpu(__i) \ - memcpy((pcpudst)+__per_cpu_offset(__i), \ - (src), (size)); \ -} while (0) - +#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA extern void setup_per_cpu_areas (void ); +#endif #else /* ! SMP */