From 914c82694cadbab511f2aee8a59c89be2938bace Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 30 Jan 2008 23:27:57 +0100 Subject: x86: export copy_from_user_ll_nocache[_nozero] Cc: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar --- arch/x86/lib/usercopy_32.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch') diff --git a/arch/x86/lib/usercopy_32.c b/arch/x86/lib/usercopy_32.c index 8bab2b2efaff..9c4ffd5bedb2 100644 --- a/arch/x86/lib/usercopy_32.c +++ b/arch/x86/lib/usercopy_32.c @@ -817,6 +817,7 @@ unsigned long __copy_from_user_ll_nocache(void *to, const void __user *from, #endif return n; } +EXPORT_SYMBOL(__copy_from_user_ll_nocache); unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *from, unsigned long n) @@ -831,6 +832,7 @@ unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *fr #endif return n; } +EXPORT_SYMBOL(__copy_from_user_ll_nocache_nozero); /** * copy_to_user: - Copy a block of data into user space. -- cgit v1.2.3 From 6ddfee0e79e141550376177b355d6c90ba6da88c Mon Sep 17 00:00:00 2001 From: "travis@sgi.com" Date: Wed, 30 Jan 2008 23:27:58 +0100 Subject: modules: fold percpu_modcopy into module.c 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 --- arch/ia64/kernel/module.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'arch') diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c index e699eb6c44be..e58f4367cf11 100644 --- a/arch/ia64/kernel/module.c +++ b/arch/ia64/kernel/module.c @@ -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 */ -- cgit v1.2.3 From 988c388ad48f790253850e369dd3e6fdf44ef603 Mon Sep 17 00:00:00 2001 From: "travis@sgi.com" Date: Wed, 30 Jan 2008 23:27:58 +0100 Subject: percpu: change Kconfig to HAVE_SETUP_PER_CPU_AREA Change: config ARCH_SETS_UP_PER_CPU_AREA to: config HAVE_SETUP_PER_CPU_AREA Cc: Andi Kleen Cc: Tony Luck Cc: David Miller Cc: Sam Ravnborg Cc: Rusty Russell Cc: Geert Uytterhoeven Cc: linuxppc-dev@ozlabs.org Cc: linux-ia64@vger.kernel.org Signed-off-by: Mike Travis Signed-off-by: Ingo Molnar --- arch/ia64/Kconfig | 2 +- arch/powerpc/Kconfig | 2 +- arch/sparc64/Kconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 5a41e75ae1fe..c9307c99a1dc 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -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 diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index fb85f6b72fcf..bb16443b6817 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -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 diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 26f5791baa33..73fc05d0bfad 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig @@ -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 -- cgit v1.2.3 From 3afc620229ccc8214ef96fd0e7db26d79f788167 Mon Sep 17 00:00:00 2001 From: "travis@sgi.com" Date: Wed, 30 Jan 2008 23:27:58 +0100 Subject: SPARC64: use generic percpu Sparc64 has a way of providing the base address for the per cpu area of the currently executing processor in a global register. Sparc64 also provides a way to calculate the address of a per cpu area from a base address instead of performing an array lookup. Cc: David Miller Signed-off-by: Mike Travis Signed-off-by: Ingo Molnar --- arch/sparc64/mm/init.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch') diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index fbeb55d71e76..523e993ee90c 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -1328,6 +1328,11 @@ pgd_t swapper_pg_dir[2048]; static void sun4u_pgprot_init(void); static void sun4v_pgprot_init(void); +/* Dummy function */ +void __init setup_per_cpu_areas(void) +{ +} + void __init paging_init(void) { unsigned long end_pfn, pages_avail, shift, phys_base; -- cgit v1.2.3 From 18fbef9e5242e146fe0264cf719a498785102841 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 30 Jan 2008 23:27:58 +0100 Subject: x86: fix arch/x86/kernel/test_nx.c modular build bug fix this modular build bug: > CC [M] arch/x86/kernel/test_nx.o > {standard input}: Assembler messages: > {standard input}:58: Error: cannot represent relocation type BFD_RELOC_64 > {standard input}:59: Error: cannot represent relocation type BFD_RELOC_64 > make[2]: *** [arch/x86/kernel/test_nx.o] Error 1 > make[1]: *** [arch/x86/kernel] Error 2 Reported-by: Adrian Bunk Signed-off-by: Ingo Molnar --- arch/x86/kernel/test_nx.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch') diff --git a/arch/x86/kernel/test_nx.c b/arch/x86/kernel/test_nx.c index 6d7ef11e7975..ae0ef2e304c7 100644 --- a/arch/x86/kernel/test_nx.c +++ b/arch/x86/kernel/test_nx.c @@ -91,8 +91,13 @@ static noinline int test_address(void *address) ".previous\n" ".section __ex_table,\"a\"\n" " .align 8\n" +#ifdef CONFIG_X86_32 + " .long 0b\n" + " .long 2b\n" +#else " .quad 0b\n" " .quad 2b\n" +#endif ".previous\n" : [rslt] "=r" (result) : [fake_code] "r" (address), [zero] "r" (0UL), "0" (result) -- cgit v1.2.3