aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/entry.S2
-rw-r--r--arch/sparc/kernel/module.c9
-rw-r--r--arch/sparc/kernel/sclow.S2
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c41
4 files changed, 20 insertions, 34 deletions
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
index b448166f5da9..03ecb4e4614e 100644
--- a/arch/sparc/kernel/entry.S
+++ b/arch/sparc/kernel/entry.S
@@ -17,7 +17,7 @@
17#include <asm/kgdb.h> 17#include <asm/kgdb.h>
18#include <asm/contregs.h> 18#include <asm/contregs.h>
19#include <asm/ptrace.h> 19#include <asm/ptrace.h>
20#include <asm/asm_offsets.h> 20#include <asm/asm-offsets.h>
21#include <asm/psr.h> 21#include <asm/psr.h>
22#include <asm/vaddrs.h> 22#include <asm/vaddrs.h>
23#include <asm/memreg.h> 23#include <asm/memreg.h>
diff --git a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c
index 7931d6f92819..787d5f1347ec 100644
--- a/arch/sparc/kernel/module.c
+++ b/arch/sparc/kernel/module.c
@@ -10,6 +10,7 @@
10#include <linux/vmalloc.h> 10#include <linux/vmalloc.h>
11#include <linux/fs.h> 11#include <linux/fs.h>
12#include <linux/string.h> 12#include <linux/string.h>
13#include <linux/ctype.h>
13 14
14void *module_alloc(unsigned long size) 15void *module_alloc(unsigned long size)
15{ 16{
@@ -37,7 +38,7 @@ void module_free(struct module *mod, void *module_region)
37} 38}
38 39
39/* Make generic code ignore STT_REGISTER dummy undefined symbols, 40/* Make generic code ignore STT_REGISTER dummy undefined symbols,
40 * and replace references to .func with func as in ppc64's dedotify. 41 * and replace references to .func with _Func
41 */ 42 */
42int module_frob_arch_sections(Elf_Ehdr *hdr, 43int module_frob_arch_sections(Elf_Ehdr *hdr,
43 Elf_Shdr *sechdrs, 44 Elf_Shdr *sechdrs,
@@ -64,8 +65,10 @@ int module_frob_arch_sections(Elf_Ehdr *hdr,
64 sym[i].st_shndx = SHN_ABS; 65 sym[i].st_shndx = SHN_ABS;
65 else { 66 else {
66 char *name = strtab + sym[i].st_name; 67 char *name = strtab + sym[i].st_name;
67 if (name[0] == '.') 68 if (name[0] == '.') {
68 memmove(name, name+1, strlen(name)); 69 name[0] = '_';
70 name[1] = toupper(name[1]);
71 }
69 } 72 }
70 } 73 }
71 } 74 }
diff --git a/arch/sparc/kernel/sclow.S b/arch/sparc/kernel/sclow.S
index 3a867fc19927..136e37c53d49 100644
--- a/arch/sparc/kernel/sclow.S
+++ b/arch/sparc/kernel/sclow.S
@@ -7,7 +7,7 @@
7 */ 7 */
8 8
9#include <asm/ptrace.h> 9#include <asm/ptrace.h>
10#include <asm/asm_offsets.h> 10#include <asm/asm-offsets.h>
11#include <asm/errno.h> 11#include <asm/errno.h>
12#include <asm/winmacro.h> 12#include <asm/winmacro.h>
13#include <asm/thread_info.h> 13#include <asm/thread_info.h>
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index 5d974a2b735a..1c8fd0fd9305 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -97,34 +97,17 @@ extern void ___rw_write_enter(void);
97/* Alias functions whose names begin with "." and export the aliases. 97/* Alias functions whose names begin with "." and export the aliases.
98 * The module references will be fixed up by module_frob_arch_sections. 98 * The module references will be fixed up by module_frob_arch_sections.
99 */ 99 */
100#define DOT_ALIAS2(__ret, __x, __arg1, __arg2) \ 100extern int _Div(int, int);
101 extern __ret __x(__arg1, __arg2); \ 101extern int _Mul(int, int);
102 asm(".weak " #__x);\ 102extern int _Rem(int, int);
103 asm(#__x "=." #__x); 103extern unsigned _Udiv(unsigned, unsigned);
104 104extern unsigned _Umul(unsigned, unsigned);
105DOT_ALIAS2(int, div, int, int) 105extern unsigned _Urem(unsigned, unsigned);
106DOT_ALIAS2(int, mul, int, int)
107DOT_ALIAS2(int, rem, int, int)
108DOT_ALIAS2(unsigned, udiv, unsigned, unsigned)
109DOT_ALIAS2(unsigned, umul, unsigned, unsigned)
110DOT_ALIAS2(unsigned, urem, unsigned, unsigned)
111
112#undef DOT_ALIAS2
113 106
114/* used by various drivers */ 107/* used by various drivers */
115EXPORT_SYMBOL(sparc_cpu_model); 108EXPORT_SYMBOL(sparc_cpu_model);
116EXPORT_SYMBOL(kernel_thread); 109EXPORT_SYMBOL(kernel_thread);
117#ifdef CONFIG_DEBUG_SPINLOCK
118#ifdef CONFIG_SMP 110#ifdef CONFIG_SMP
119EXPORT_SYMBOL(_do_spin_lock);
120EXPORT_SYMBOL(_do_spin_unlock);
121EXPORT_SYMBOL(_spin_trylock);
122EXPORT_SYMBOL(_do_read_lock);
123EXPORT_SYMBOL(_do_read_unlock);
124EXPORT_SYMBOL(_do_write_lock);
125EXPORT_SYMBOL(_do_write_unlock);
126#endif
127#else
128// XXX find what uses (or used) these. 111// XXX find what uses (or used) these.
129EXPORT_SYMBOL(___rw_read_enter); 112EXPORT_SYMBOL(___rw_read_enter);
130EXPORT_SYMBOL(___rw_read_exit); 113EXPORT_SYMBOL(___rw_read_exit);
@@ -330,12 +313,12 @@ EXPORT_SYMBOL(__lshrdi3);
330EXPORT_SYMBOL(__muldi3); 313EXPORT_SYMBOL(__muldi3);
331EXPORT_SYMBOL(__divdi3); 314EXPORT_SYMBOL(__divdi3);
332 315
333EXPORT_SYMBOL(rem); 316EXPORT_SYMBOL(_Rem);
334EXPORT_SYMBOL(urem); 317EXPORT_SYMBOL(_Urem);
335EXPORT_SYMBOL(mul); 318EXPORT_SYMBOL(_Mul);
336EXPORT_SYMBOL(umul); 319EXPORT_SYMBOL(_Umul);
337EXPORT_SYMBOL(div); 320EXPORT_SYMBOL(_Div);
338EXPORT_SYMBOL(udiv); 321EXPORT_SYMBOL(_Udiv);
339 322
340#ifdef CONFIG_DEBUG_BUGVERBOSE 323#ifdef CONFIG_DEBUG_BUGVERBOSE
341EXPORT_SYMBOL(do_BUG); 324EXPORT_SYMBOL(do_BUG);