diff options
author | Mika Kukkonen <mika@osdl.org> | 2004-06-20 04:54:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-20 04:54:18 -0700 |
commit | c87c2fe1694f4a6435eab283ac2c752a72e6dd2e (patch) | |
tree | 8f16344ad55e721e42fa8fa1fcecf621fe314616 | |
parent | 9b3b3c3b19e91595858726616e59982f07b5d677 (diff) | |
download | history-c87c2fe1694f4a6435eab283ac2c752a72e6dd2e.tar.gz |
[PATCH] Uninline machine_specific_memory_setup()
Cleanup arch/i386/kernel/setup.c a little bit by:
* un-inlining machine_specific_memory_setup() (it's implementations are
pretty big to be inlined anyway)
* remove setup_memory_region() by moving the code inside setup_arch()
I would also recommend BK-renaming all four files
(include/asm-i386/*/setup_arch_post.h) to ".c" and moving them into
arch/i386/*/, but that obviously is not needed in anyway. But IMHO they
are clearly ".c" files, not ".h" files.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/i386/kernel/setup.c | 18 | ||||
-rw-r--r-- | include/asm-i386/mach-default/setup_arch_post.h | 2 | ||||
-rw-r--r-- | include/asm-i386/mach-visws/setup_arch_post.h | 2 | ||||
-rw-r--r-- | include/asm-i386/mach-voyager/setup_arch_post.h | 2 |
4 files changed, 9 insertions, 15 deletions
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 95e9fa75efb67..fc466fb4488a4 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -57,8 +57,6 @@ unsigned long init_pg_tables_end __initdata = ~0UL; int disable_pse __initdata = 0; -static inline char * __init machine_specific_memory_setup(void); - /* * Machine setup.. */ @@ -660,14 +658,6 @@ static inline void copy_edd(void) */ #define LOWMEMSIZE() (0x9f000) -static void __init setup_memory_region(void) -{ - char *who = machine_specific_memory_setup(); - printk(KERN_INFO "BIOS-provided physical RAM map:\n"); - print_memory_map(who); -} /* setup_memory_region */ - - static void __init parse_cmdline_early (char ** cmdline_p) { char c = ' ', *to = command_line, *from = saved_command_line; @@ -1270,6 +1260,8 @@ static int __init noreplacement_setup(char *s) __setup("noreplacement", noreplacement_setup); +static char * __init machine_specific_memory_setup(void); + /* * Determine if we were loaded by an EFI loader. If so, then we have also been * passed the efi memmap, systab, etc., so we should use these data structures @@ -1320,8 +1312,10 @@ void __init setup_arch(char **cmdline_p) ARCH_SETUP if (efi_enabled) efi_init(); - else - setup_memory_region(); + else { + printk(KERN_INFO "BIOS-provided physical RAM map:\n"); + print_memory_map(machine_specific_memory_setup()); + } copy_edd(); diff --git a/include/asm-i386/mach-default/setup_arch_post.h b/include/asm-i386/mach-default/setup_arch_post.h index 43b3b2d1fa11e..2fc4888721f61 100644 --- a/include/asm-i386/mach-default/setup_arch_post.h +++ b/include/asm-i386/mach-default/setup_arch_post.h @@ -6,7 +6,7 @@ * use of all of the static functions. **/ -static inline char * __init machine_specific_memory_setup(void) +static char * __init machine_specific_memory_setup(void) { char *who; diff --git a/include/asm-i386/mach-visws/setup_arch_post.h b/include/asm-i386/mach-visws/setup_arch_post.h index 2857daf5af402..cdbd895a54b16 100644 --- a/include/asm-i386/mach-visws/setup_arch_post.h +++ b/include/asm-i386/mach-visws/setup_arch_post.h @@ -10,7 +10,7 @@ unsigned long sgivwfb_mem_size; long long mem_size __initdata = 0; -static inline char * __init machine_specific_memory_setup(void) +static char * __init machine_specific_memory_setup(void) { long long gfx_mem_size = 8 * MB; diff --git a/include/asm-i386/mach-voyager/setup_arch_post.h b/include/asm-i386/mach-voyager/setup_arch_post.h index 4c7cef49b8b24..f6f6c2cbc75c7 100644 --- a/include/asm-i386/mach-voyager/setup_arch_post.h +++ b/include/asm-i386/mach-voyager/setup_arch_post.h @@ -3,7 +3,7 @@ * This is included late in kernel/setup.c so that it can make use of all of * the static functions. */ -static inline char * __init machine_specific_memory_setup(void) +static char * __init machine_specific_memory_setup(void) { char *who; |