Skip to contentSkip to conversation

m68k: merge the non-mmu and mmu versions of module.c

PATCH New [email protected] 1 participant 1 message Apr 21, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k: merge the non-mmu and mmu versions of module.c

From: Greg Ungerer <[email protected]>

The non-mmu and mmu versions of the module loader module.c are nearly identical. Merge them back to a single module.c. There is a little bit of re-ordering of the struct and enum definitions in module.h to keep the ifdefery to a minimum.

---
 arch/m68k/include/asm/module.h |   31 ++++-----
 arch/m68k/kernel/module.c      |  157 +++++++++++++++++++++++++++++++++++++++-
 arch/m68k/kernel/module_mm.c   |  155 ---------------------------------------
 arch/m68k/kernel/module_no.c   |  126 --------------------------------
 4 files changed, 167 insertions(+), 302 deletions(-)
 delete mode 100644 arch/m68k/kernel/module_mm.c
 delete mode 100644 arch/m68k/kernel/module_no.c
arch/m68k/include/asm/module.h +13 -18
index 5f21e11..edffe66 100644
@@ -1,46 +1,41 @@
 #ifndef _ASM_M68K_MODULE_H
 #define _ASM_M68K_MODULE_H
 
-#ifdef CONFIG_MMU
+enum m68k_fixup_type {
+	m68k_fixup_memoffset,
+	m68k_fixup_vnode_shift,
+};
+
+struct m68k_fixup_info {
+	enum m68k_fixup_type type;
+	void *addr;
+};
 
 struct mod_arch_specific {
 	struct m68k_fixup_info *fixup_start, *fixup_end;
 };
 
+#ifdef CONFIG_MMU
+
 #define MODULE_ARCH_INIT {				\
 	.fixup_start		= __start_fixup,	\
 	.fixup_end		= __stop_fixup,		\
 }
 
 
-enum m68k_fixup_type {
-	m68k_fixup_memoffset,
-	m68k_fixup_vnode_shift,
-};
-
-struct m68k_fixup_info {
-	enum m68k_fixup_type type;
-	void *addr;
-};
-
 #define m68k_fixup(type, addr)			\
 	"	.section \".m68k_fixup\",\"aw\"\n"	\
 	"	.long " #type "," #addr "\n"	\
 	"	.previous\n"
 
+#endif /* CONFIG_MMU */
+
 extern struct m68k_fixup_info __start_fixup[], __stop_fixup[];
 
 struct module;
 extern void module_fixup(struct module *mod, struct m68k_fixup_info *start,
 			 struct m68k_fixup_info *end);
 
-#else
-
-struct mod_arch_specific {
-};
-
-#endif /* CONFIG_MMU */
-
 #define Elf_Shdr Elf32_Shdr
 #define Elf_Sym Elf32_Sym
 #define Elf_Ehdr Elf32_Ehdr
arch/m68k/kernel/module.c +154 -3

159 lines not on this page · raw message

arch/m68k/kernel/module_mm.c deleted +0 -155

155 lines not on this page · raw message

arch/m68k/kernel/module_no.c deleted +0 -126

126 lines not on this page · raw message

Signature · 1 line
1.7.0.4