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 /include/asm-i386/mach-default | |
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 'include/asm-i386/mach-default')
-rw-r--r-- | include/asm-i386/mach-default/setup_arch.h (renamed from include/asm-i386/mach-default/setup_arch_pre.h) | 0 | ||||
-rw-r--r-- | include/asm-i386/mach-default/setup_arch_post.h | 40 |
2 files changed, 0 insertions, 40 deletions
diff --git a/include/asm-i386/mach-default/setup_arch_pre.h b/include/asm-i386/mach-default/setup_arch.h index fb42099e7bd4..fb42099e7bd4 100644 --- a/include/asm-i386/mach-default/setup_arch_pre.h +++ b/include/asm-i386/mach-default/setup_arch.h | |||
diff --git a/include/asm-i386/mach-default/setup_arch_post.h b/include/asm-i386/mach-default/setup_arch_post.h deleted file mode 100644 index 2fc4888721f6..000000000000 --- a/include/asm-i386/mach-default/setup_arch_post.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /** | ||
2 | * machine_specific_memory_setup - Hook for machine specific memory setup. | ||
3 | * | ||
4 | * Description: | ||
5 | * This is included late in kernel/setup.c so that it can make | ||
6 | * use of all of the static functions. | ||
7 | **/ | ||
8 | |||
9 | static char * __init machine_specific_memory_setup(void) | ||
10 | { | ||
11 | char *who; | ||
12 | |||
13 | |||
14 | who = "BIOS-e820"; | ||
15 | |||
16 | /* | ||
17 | * Try to copy the BIOS-supplied E820-map. | ||
18 | * | ||
19 | * Otherwise fake a memory map; one section from 0k->640k, | ||
20 | * the next section from 1mb->appropriate_mem_k | ||
21 | */ | ||
22 | sanitize_e820_map(E820_MAP, &E820_MAP_NR); | ||
23 | if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) { | ||
24 | unsigned long mem_size; | ||
25 | |||
26 | /* compare results from other methods and take the greater */ | ||
27 | if (ALT_MEM_K < EXT_MEM_K) { | ||
28 | mem_size = EXT_MEM_K; | ||
29 | who = "BIOS-88"; | ||
30 | } else { | ||
31 | mem_size = ALT_MEM_K; | ||
32 | who = "BIOS-e801"; | ||
33 | } | ||
34 | |||
35 | e820.nr_map = 0; | ||
36 | add_memory_region(0, LOWMEMSIZE(), E820_RAM); | ||
37 | add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM); | ||
38 | } | ||
39 | return who; | ||
40 | } | ||