Commit c87c2fe1 authored by Mika Kukkonen's avatar Mika Kukkonen Committed by Linus Torvalds

[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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9b3b3c3b
...@@ -57,8 +57,6 @@ unsigned long init_pg_tables_end __initdata = ~0UL; ...@@ -57,8 +57,6 @@ unsigned long init_pg_tables_end __initdata = ~0UL;
int disable_pse __initdata = 0; int disable_pse __initdata = 0;
static inline char * __init machine_specific_memory_setup(void);
/* /*
* Machine setup.. * Machine setup..
*/ */
...@@ -660,14 +658,6 @@ static inline void copy_edd(void) ...@@ -660,14 +658,6 @@ static inline void copy_edd(void)
*/ */
#define LOWMEMSIZE() (0x9f000) #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) static void __init parse_cmdline_early (char ** cmdline_p)
{ {
char c = ' ', *to = command_line, *from = saved_command_line; char c = ' ', *to = command_line, *from = saved_command_line;
...@@ -1270,6 +1260,8 @@ static int __init noreplacement_setup(char *s) ...@@ -1270,6 +1260,8 @@ static int __init noreplacement_setup(char *s)
__setup("noreplacement", noreplacement_setup); __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 * 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 * passed the efi memmap, systab, etc., so we should use these data structures
...@@ -1320,8 +1312,10 @@ void __init setup_arch(char **cmdline_p) ...@@ -1320,8 +1312,10 @@ void __init setup_arch(char **cmdline_p)
ARCH_SETUP ARCH_SETUP
if (efi_enabled) if (efi_enabled)
efi_init(); efi_init();
else else {
setup_memory_region(); printk(KERN_INFO "BIOS-provided physical RAM map:\n");
print_memory_map(machine_specific_memory_setup());
}
copy_edd(); copy_edd();
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* use of all of the static functions. * 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; char *who;
......
...@@ -10,7 +10,7 @@ unsigned long sgivwfb_mem_size; ...@@ -10,7 +10,7 @@ unsigned long sgivwfb_mem_size;
long long mem_size __initdata = 0; 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; long long gfx_mem_size = 8 * MB;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* This is included late in kernel/setup.c so that it can make use of all of * This is included late in kernel/setup.c so that it can make use of all of
* the static functions. */ * the static functions. */
static inline char * __init machine_specific_memory_setup(void) static char * __init machine_specific_memory_setup(void)
{ {
char *who; char *who;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment