diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-08-19 08:55:50 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-08-27 11:12:52 -0400 |
commit | 8fee697d990c54976c8dc167270633299e2515d2 (patch) | |
tree | 2236f4907bf6586892df8412224c415581311948 /arch/x86/kernel/setup.c | |
parent | f7cf5a5b8c0e59eac8d30b62271cb0fa52e53ebc (diff) |
x86: Add request_standard_resources to x86_init
The 32bit and the 64bit code are slighty different in the reservation
of standard resources. Also the upcoming Moorestown support needs its
own version of that.
Add it to x86_init_ops and initialize it with the 64bit default. 32bit
overrides it in early boot. Now moorestown can add it's own override
w/o sprinkling the code with more #ifdefs
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r-- | arch/x86/kernel/setup.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 5796eb158d49..c2a8090e8312 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -171,13 +171,6 @@ static struct resource bss_resource = { | |||
171 | 171 | ||
172 | 172 | ||
173 | #ifdef CONFIG_X86_32 | 173 | #ifdef CONFIG_X86_32 |
174 | static struct resource video_ram_resource = { | ||
175 | .name = "Video RAM area", | ||
176 | .start = 0xa0000, | ||
177 | .end = 0xbffff, | ||
178 | .flags = IORESOURCE_BUSY | IORESOURCE_MEM | ||
179 | }; | ||
180 | |||
181 | /* cpu data as detected by the assembly code in head.S */ | 174 | /* cpu data as detected by the assembly code in head.S */ |
182 | struct cpuinfo_x86 new_cpu_data __cpuinitdata = {0, 0, 0, 0, -1, 1, 0, 0, -1}; | 175 | struct cpuinfo_x86 new_cpu_data __cpuinitdata = {0, 0, 0, 0, -1, 1, 0, 0, -1}; |
183 | /* common cpu data for all cpus */ | 176 | /* common cpu data for all cpus */ |
@@ -605,7 +598,7 @@ static struct resource standard_io_resources[] = { | |||
605 | .flags = IORESOURCE_BUSY | IORESOURCE_IO } | 598 | .flags = IORESOURCE_BUSY | IORESOURCE_IO } |
606 | }; | 599 | }; |
607 | 600 | ||
608 | static void __init reserve_standard_io_resources(void) | 601 | void __init reserve_standard_io_resources(void) |
609 | { | 602 | { |
610 | int i; | 603 | int i; |
611 | 604 | ||
@@ -1013,10 +1006,7 @@ void __init setup_arch(char **cmdline_p) | |||
1013 | e820_reserve_resources(); | 1006 | e820_reserve_resources(); |
1014 | e820_mark_nosave_regions(max_low_pfn); | 1007 | e820_mark_nosave_regions(max_low_pfn); |
1015 | 1008 | ||
1016 | #ifdef CONFIG_X86_32 | 1009 | x86_init.resources.reserve_resources(); |
1017 | request_resource(&iomem_resource, &video_ram_resource); | ||
1018 | #endif | ||
1019 | reserve_standard_io_resources(); | ||
1020 | 1010 | ||
1021 | e820_setup_gap(); | 1011 | e820_setup_gap(); |
1022 | 1012 | ||
@@ -1102,4 +1092,18 @@ void __init x86_quirk_time_init(void) | |||
1102 | irq0.mask = cpumask_of_cpu(0); | 1092 | irq0.mask = cpumask_of_cpu(0); |
1103 | setup_irq(0, &irq0); | 1093 | setup_irq(0, &irq0); |
1104 | } | 1094 | } |
1095 | |||
1096 | static struct resource video_ram_resource = { | ||
1097 | .name = "Video RAM area", | ||
1098 | .start = 0xa0000, | ||
1099 | .end = 0xbffff, | ||
1100 | .flags = IORESOURCE_BUSY | IORESOURCE_MEM | ||
1101 | }; | ||
1102 | |||
1103 | void __init i386_reserve_resources(void) | ||
1104 | { | ||
1105 | request_resource(&iomem_resource, &video_ram_resource); | ||
1106 | reserve_standard_io_resources(); | ||
1107 | } | ||
1108 | |||
1105 | #endif /* CONFIG_X86_32 */ | 1109 | #endif /* CONFIG_X86_32 */ |