diff options
author | Jeremy Fitzhardinge <jeremy@xensource.com> | 2006-06-25 08:46:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:00:55 -0400 |
commit | e75eac33b5c7f797e4b2ddcb39183cf268e26822 (patch) | |
tree | 3c87328055c5975ca9d69df56dcc4a1d9066352c /arch/i386/kernel/setup.c | |
parent | e6a1530d692d6a60cdf15dfbcfea07f5324d7b9f (diff) |
[PATCH] Clean up and refactor i386 sub-architecture setup
Clean up and refactor i386 sub-architecture setup.
This change moves all the code from the
asm-i386/mach-*/setup_arch_pre/post.h headers, into
arch/i386/mach-*/setup.c. mach-*/setup_arch_pre.h is renamed to
setup_arch.h, and contains only things which should be in header files. It
is purely code-motion; there should be no functional changes at all.
Several functions in arch/i386/kernel/setup.c needed to be made non-static
so that they're visible to the code in mach-*/setup.c. asm-i386/setup.h is
used to hold the prototypes for these functions.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Zachary Amsden <zach@vmware.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Cc: Martin Bligh <mbligh@google.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Andrey Panin <pazke@donpac.ru>
Cc: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/setup.c')
-rw-r--r-- | arch/i386/kernel/setup.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index e6023970aa40..6c1639836e06 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -61,7 +61,7 @@ | |||
61 | #include <asm/io_apic.h> | 61 | #include <asm/io_apic.h> |
62 | #include <asm/ist.h> | 62 | #include <asm/ist.h> |
63 | #include <asm/io.h> | 63 | #include <asm/io.h> |
64 | #include "setup_arch_pre.h" | 64 | #include <setup_arch.h> |
65 | #include <bios_ebda.h> | 65 | #include <bios_ebda.h> |
66 | 66 | ||
67 | /* Forward Declaration. */ | 67 | /* Forward Declaration. */ |
@@ -411,8 +411,8 @@ static void __init limit_regions(unsigned long long size) | |||
411 | } | 411 | } |
412 | } | 412 | } |
413 | 413 | ||
414 | static void __init add_memory_region(unsigned long long start, | 414 | void __init add_memory_region(unsigned long long start, |
415 | unsigned long long size, int type) | 415 | unsigned long long size, int type) |
416 | { | 416 | { |
417 | int x; | 417 | int x; |
418 | 418 | ||
@@ -475,7 +475,7 @@ static struct change_member *change_point[2*E820MAX] __initdata; | |||
475 | static struct e820entry *overlap_list[E820MAX] __initdata; | 475 | static struct e820entry *overlap_list[E820MAX] __initdata; |
476 | static struct e820entry new_bios[E820MAX] __initdata; | 476 | static struct e820entry new_bios[E820MAX] __initdata; |
477 | 477 | ||
478 | static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map) | 478 | int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map) |
479 | { | 479 | { |
480 | struct change_member *change_tmp; | 480 | struct change_member *change_tmp; |
481 | unsigned long current_type, last_type; | 481 | unsigned long current_type, last_type; |
@@ -644,7 +644,7 @@ static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map) | |||
644 | * thinkpad 560x, for example, does not cooperate with the memory | 644 | * thinkpad 560x, for example, does not cooperate with the memory |
645 | * detection code.) | 645 | * detection code.) |
646 | */ | 646 | */ |
647 | static int __init copy_e820_map(struct e820entry * biosmap, int nr_map) | 647 | int __init copy_e820_map(struct e820entry * biosmap, int nr_map) |
648 | { | 648 | { |
649 | /* Only one memory region (or negative)? Ignore it */ | 649 | /* Only one memory region (or negative)? Ignore it */ |
650 | if (nr_map < 2) | 650 | if (nr_map < 2) |
@@ -702,12 +702,6 @@ static inline void copy_edd(void) | |||
702 | } | 702 | } |
703 | #endif | 703 | #endif |
704 | 704 | ||
705 | /* | ||
706 | * Do NOT EVER look at the BIOS memory size location. | ||
707 | * It does not work on many machines. | ||
708 | */ | ||
709 | #define LOWMEMSIZE() (0x9f000) | ||
710 | |||
711 | static void __init parse_cmdline_early (char ** cmdline_p) | 705 | static void __init parse_cmdline_early (char ** cmdline_p) |
712 | { | 706 | { |
713 | char c = ' ', *to = command_line, *from = saved_command_line; | 707 | char c = ' ', *to = command_line, *from = saved_command_line; |
@@ -1424,8 +1418,6 @@ static void __init register_memory(void) | |||
1424 | pci_mem_start, gapstart, gapsize); | 1418 | pci_mem_start, gapstart, gapsize); |
1425 | } | 1419 | } |
1426 | 1420 | ||
1427 | static char * __init machine_specific_memory_setup(void); | ||
1428 | |||
1429 | #ifdef CONFIG_MCA | 1421 | #ifdef CONFIG_MCA |
1430 | static void set_mca_bus(int x) | 1422 | static void set_mca_bus(int x) |
1431 | { | 1423 | { |
@@ -1708,7 +1700,6 @@ static __init int add_pcspkr(void) | |||
1708 | } | 1700 | } |
1709 | device_initcall(add_pcspkr); | 1701 | device_initcall(add_pcspkr); |
1710 | 1702 | ||
1711 | #include "setup_arch_post.h" | ||
1712 | /* | 1703 | /* |
1713 | * Local Variables: | 1704 | * Local Variables: |
1714 | * mode:c | 1705 | * mode:c |