]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
modules: fold percpu_modcopy into module.c
authortravis@sgi.com <travis@sgi.com>
Wed, 30 Jan 2008 22:27:58 +0000 (23:27 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 22:27:58 +0000 (23:27 +0100)
percpu_modcopy() is defined multiple times in arch files. However, the only
user is module.c. Put a static definition into module.c and remove
the definitions from the arch files.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/ia64/kernel/module.c
include/asm-ia64/percpu.h
include/asm-powerpc/percpu.h
include/asm-s390/percpu.h

index e699eb6c44be0f788397ba0300bac77800db1767..e58f4367cf11db4ad4cca80fed0785f7283d5b15 100644 (file)
@@ -940,14 +940,3 @@ module_arch_cleanup (struct module *mod)
        if (mod->arch.core_unw_table)
                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 */
index 0095bcf798484d0988ff086bc0c5d0a167cd08ab..7ef684220cf704d6910fd120056e85d76bdd5499 100644 (file)
 #define DECLARE_PER_CPU(type, name)                            \
        extern PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
 
-/*
- * Pretty much a literal copy of asm-generic/percpu.h, except that percpu_modcopy() is an
- * external routine, to avoid include-hell.
- */
 #ifdef CONFIG_SMP
 
 extern unsigned long __per_cpu_offset[NR_CPUS];
@@ -38,7 +34,6 @@ 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);
 extern void setup_per_cpu_areas (void);
 extern void *per_cpu_init(void);
 
index cc1cbf656b02f343e60199c79ec50fb26cb53665..1b7568838b43cf92a7ad8ef135c34ad6de5344be 100644 (file)
 #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)
-
 extern void setup_per_cpu_areas(void);
 
 #else /* ! SMP */
index 2d676a873858cf599fbc1b679e6ceccd6a112fc3..465d313ba2dcc3ed8f2a5aa021f7f3518d5e52cc 100644 (file)
@@ -39,15 +39,6 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
 #define per_cpu(var,cpu) __reloc_hide(var,__per_cpu_offset[cpu])
 #define per_cpu_offset(x) (__per_cpu_offset[x])
 
-/* 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)
-
 #else /* ! SMP */
 
 #define __get_cpu_var(var) __reloc_hide(var,0)