x86: unification of module.c
PATCH 1/1 x86: unification of module.c
This patch is based on -tip:x86/core:
From: Jaswinder Singh Rajput <[email protected]>
Date: Thu, 26 Mar 2009 18:33:45 +0530
Subject: [PATCH] x86: unification of module.c
Impact: Unification, cleanup
--- arch/x86/kernel/Makefile | 2 +- arch/x86/kernel/module.c | 261 +++++++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/module_32.c | 152 ------------------------- arch/x86/kernel/module_64.c | 194 -------------------------------- 4 files changed, 262 insertions(+), 347 deletions(-) create mode 100644 arch/x86/kernel/module.c delete mode 100644 arch/x86/kernel/module_32.c delete mode 100644 arch/x86/kernel/module_64.c
arch/x86/kernel/Makefile +1 -1
@@ -72,7 +72,7 @@ obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o obj-$(CONFIG_X86_VSMP) += vsmp_64.o obj-$(CONFIG_KPROBES) += kprobes.o -obj-$(CONFIG_MODULES) += module_$(BITS).o +obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_EFI) += efi.o efi_$(BITS).o efi_stub_$(BITS).o obj-$(CONFIG_DOUBLEFAULT) += doublefault_32.o obj-$(CONFIG_KGDB) += kgdb.o
arch/x86/kernel/module.c new file +261 -0
261 lines not on this page · raw message
arch/x86/kernel/module_32.c deleted +0 -152
152 lines not on this page · raw message
arch/x86/kernel/module_64.c deleted +0 -194
194 lines not on this page · raw message
Signature · 1 line
1.6.0.6
Quoted 9 lines · Jaswinder Singh Rajput
This patch is based on -tip:x86/core:
From: Jaswinder Singh Rajput <[email protected]>
Date: Thu, 26 Mar 2009 18:33:45 +0530
Subject: [PATCH] x86: unification ofmodule.cImpact: Unification, cleanup
Signed-off-by Jaswinder Singh Rajput <[email protected]>
Quoted 9 lines
--- arch/x86/kernel/Makefile | 2 +- arch/x86/kernel/module.c | 261 +++++++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/module_32.c | 152 ------------------------- arch/x86/kernel/module_64.c | 194 -------------------------------- 4 files changed, 262 insertions(+), 347 deletions(-) create mode 100644 arch/x86/kernel/module.c delete mode 100644 arch/x86/kernel/module_32.c delete mode 100644 arch/x86/kernel/module_64.c
Sigh. We went through this before.
First make module_32 and module_64 the same if necessary in several steps. The last step is to rename one of the files to module.c and remove the other one.
This cobble all together approach is hard to review and error prone.
Thanks,
tglx
Quoted 1 line · On Thursday 26 March 2009 23:38:33 Jaswinder Singh Rajput wrote:
Impact: Unification, cleanup
...
arch/x86/kernel/module.c line 37
Quoted 3 lines
arch/x86/kernel/module.c new file +3
-0+#if (defined(CONFIG_X86_32 ) || !defined(CONFIG_UML )) + +#ifdef CONFIG_X86_64
This looks wrong...
Rusty.
Quoted 20 lines · Thomas Gleixner
Quoted 9 lines · Jaswinder Singh Rajput
This patch is based on -tip:x86/core:
From: Jaswinder Singh Rajput <[email protected]>
Date: Thu, 26 Mar 2009 18:33:45 +0530
Subject: [PATCH] x86: unification ofmodule.cImpact: Unification, cleanup
Signed-off-by Jaswinder Singh Rajput <[email protected]>Quoted 9 lines
--- arch/x86/kernel/Makefile | 2 +- arch/x86/kernel/module.c | 261 +++++++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/module_32.c | 152 ------------------------- arch/x86/kernel/module_64.c | 194 -------------------------------- 4 files changed, 262 insertions(+), 347 deletions(-) create mode 100644 arch/x86/kernel/module.c delete mode 100644 arch/x86/kernel/module_32.c delete mode 100644 arch/x86/kernel/module_64.c
Quoted 8 lines
Sigh. We went through this before.
First make
module_32andmodule_64the same if necessary in several steps. The last step is to rename one of the files tomodule.cand remove the other one.This cobble all together approach is hard to review and error prone.
Correct. There are countless examples of properly structured and well executed unifications in the arch/x86 tree.
The most recent one has been done by Gustavo F. Padovan - and this was one of this first complex contributions to Linux:
c577b09: x86, fixmap: unify fixmap.h
c78f322: x86, fixmap: prepare fixmap_32.h for unification
e365bcd: x86, fixmap: prepare fixmap_64.h for unification 5f403fa: x86, fixmap: add CONFIG_EFI
2ae38da: x86, fixmap: add CONFIG_X86_{LOCAL,IO}_APIC
fd862dd: x86, fixmap: define reserve_top_address for x86_64
ab93e3c: x86, fixmap: define FIXADDR_BOOT_* and redefine FIX_ADDR_SIZE
d09375a: x86, fixmap: rename __FIXADDR_SIZE and __FIXADDR_BOOT_SIZE
Please use this as a template - all-in-one patches for unifications are not reviewable, not testable and not acceptable.
Ingo
Quoted 46 lines · Ingo Molnar
Quoted 20 lines · Thomas Gleixner
Quoted 9 lines · Jaswinder Singh Rajput
This patch is based on -tip:x86/core:
From: Jaswinder Singh Rajput <[email protected]>
Date: Thu, 26 Mar 2009 18:33:45 +0530
Subject: [PATCH] x86: unification ofmodule.cImpact: Unification, cleanup
Signed-off-by Jaswinder Singh Rajput <[email protected]>Quoted 9 lines
--- arch/x86/kernel/Makefile | 2 +- arch/x86/kernel/module.c | 261 +++++++++++++++++++++++++++++++++++++++++++ arch/x86/kernel/module_32.c | 152 ------------------------- arch/x86/kernel/module_64.c | 194 -------------------------------- 4 files changed, 262 insertions(+), 347 deletions(-) create mode 100644 arch/x86/kernel/module.c delete mode 100644 arch/x86/kernel/module_32.c delete mode 100644 arch/x86/kernel/module_64.cQuoted 8 lines
Sigh. We went through this before.
First make
module_32andmodule_64the same if necessary in several steps. The last step is to rename one of the files tomodule.cand remove the other one.This cobble all together approach is hard to review and error prone.
Correct. There are countless examples of properly structured and well executed unifications in the
arch/x86tree.The most recent one has been done by Gustavo F. Padovan - and this was one of this first complex contributions to Linux:
c577b09: x86, fixmap: unify
fixmap.h
c78f322: x86, fixmap: preparefixmap_32.hfor unification
e365bcd: x86, fixmap: preparefixmap_64.hfor unification 5f403fa: x86, fixmap: addCONFIG_EFI
2ae38da: x86, fixmap: add CONFIG_X86_{LOCAL,IO}_APIC
fd862dd: x86, fixmap: definereserve_top_addressforx86_64
ab93e3c: x86, fixmap: define FIXADDR_BOOT_* and redefineFIX_ADDR_SIZE
d09375a: x86, fixmap: rename__FIXADDR_SIZEand__FIXADDR_BOOT_SIZE
Quoted 3 lines
Please use this as a template - all-in-one patches for unifications are not reviewable, not testable and not acceptable.
OK, pull request withdrawn.
Thanks,
--
JSR