sparc: unify module.c
PATCH 5/5 sparc: unify module.c
o Copy module_64.c to module.c
o Add all sparc specific bits to module.c
o delete module_32.c
o update Makefile
Signed-off-by Sam Ravnborg <[email protected]>
---
arch/sparc/kernel/Makefile | 2 +-
arch/sparc/kernel/{module_64.c => module.c} | 24 ++++
arch/sparc/kernel/module_32.c | 163 ---------------------------
3 files changed, 25 insertions(+), 164 deletions(-)
rename arch/sparc/kernel/{module_64.c => module.c} (91%)
delete mode 100644 arch/sparc/kernel/module_32.carch/sparc/kernel/Makefile +1 -1
@@ -68,7 +68,7 @@ obj-$(CONFIG_SPARC64_SMP) += hvtramp.o obj-y += auxio_$(BITS).o obj-$(CONFIG_SUN_PM) += apc.o pmc.o -obj-$(CONFIG_MODULES) += module_$(BITS).o +obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_MODULES) += sparc_ksyms_$(BITS).o obj-$(CONFIG_SPARC_LED) += led.o obj-$(CONFIG_KGDB) += kgdb_$(BITS).o
arch/sparc/kernel/module.c renamed from arch/sparc/kernel/module_64.c +24 -0
@@ -10,6 +10,7 @@#include <linux/vmalloc.h> #include <linux/fs.h> #include <linux/string.h> +#include <linux/ctype.h> #include <linux/slab.h> #include <linux/mm.h>
@@ -36,6 +37,21 @@ static char *dot2underscore(char *name) {return name; } +#else +static void *module_map (unsigned long size) +{ +return vmalloc (size); +} + +/* Replace references to .func with _Func */ +static char *dot2underscore (char *name) +{ +if (name[0 ] ='.' ) { + name[0 ] ='_' ; + name[1 ] =toupper (name[1 ]); + } +return name; +}#endif /* CONFIG_SPARC64 */ void *module_alloc (unsigned long size)
@@ -170,6 +186,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs,#endif /* CONFIG_SPARC64 */ case R_SPARC_32 : +case R_SPARC_UA32 : location[0 ] = v >>24 ; location[1 ] = v >>16 ; location[2 ] = v >>8 ;
@@ -224,6 +241,13 @@ int module_finalize(const Elf_Ehdr *hdr, return 0; } +#else +int module_finalize (const Elf_Ehdr *hdr, +const Elf_Shdr *sechdrs, +struct module *me) +{ +return 0 ; +}#endif /* CONFIG_SPARC64 */ void module_arch_cleanup (struct module *mod)
arch/sparc/kernel/module_32.c deleted +0 -163
163 lines not on this page · raw message
Signature · 1 line
1.6.0.2.GIT
From: Sam Ravnborg <[email protected]>
Date: Mon, 22 Dec 2008 23:14:19 +0100
Quoted 6 lines
o Copy
module_64.ctomodule.c
o Add all sparc specific bits tomodule.c
o deletemodule_32.c
o updateMakefileSigned-off-by Sam Ravnborg <[email protected]>
Applied, thanks a lot Sam.