aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup_32.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-06-25 20:50:06 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 07:10:46 -0400
commit7dea23ecd17db6e42e19499db70d2fcfa5ca1ee2 (patch)
treec9873e31ab9364bf48fefec33eac52fcd46adb14 /arch/x86/kernel/setup_32.c
parenteb1379cb296f5aee348c2e04317d911bb84d9184 (diff)
x86: put global variable for 32bit all together
those variables are not needed by 64 bit. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup_32.c')
-rw-r--r--arch/x86/kernel/setup_32.c57
1 files changed, 33 insertions, 24 deletions
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
index aa81779db218..98f9199026cd 100644
--- a/arch/x86/kernel/setup_32.c
+++ b/arch/x86/kernel/setup_32.c
@@ -100,6 +100,8 @@ static struct resource bss_resource = {
100 .flags = IORESOURCE_BUSY | IORESOURCE_MEM 100 .flags = IORESOURCE_BUSY | IORESOURCE_MEM
101}; 101};
102 102
103
104#ifdef CONFIG_X86_32
103static struct resource video_ram_resource = { 105static struct resource video_ram_resource = {
104 .name = "Video RAM area", 106 .name = "Video RAM area",
105 .start = 0xa0000, 107 .start = 0xa0000,
@@ -108,24 +110,47 @@ static struct resource video_ram_resource = {
108}; 110};
109 111
110/* cpu data as detected by the assembly code in head.S */ 112/* cpu data as detected by the assembly code in head.S */
111struct cpuinfo_x86 new_cpu_data __cpuinitdata = { 0, 0, 0, 0, -1, 1, 0, 0, -1 }; 113struct cpuinfo_x86 new_cpu_data __cpuinitdata = {0, 0, 0, 0, -1, 1, 0, 0, -1};
112/* common cpu data for all cpus */ 114/* common cpu data for all cpus */
113struct cpuinfo_x86 boot_cpu_data __read_mostly = { 0, 0, 0, 0, -1, 1, 0, 0, -1 }; 115struct cpuinfo_x86 boot_cpu_data __read_mostly = {0, 0, 0, 0, -1, 1, 0, 0, -1};
114EXPORT_SYMBOL(boot_cpu_data); 116EXPORT_SYMBOL(boot_cpu_data);
117static void set_mca_bus(int x)
118{
119#ifdef CONFIG_MCA
120 MCA_bus = x;
121#endif
122}
115 123
116unsigned int def_to_bigsmp; 124unsigned int def_to_bigsmp;
117 125
118#ifndef CONFIG_X86_PAE
119unsigned long mmu_cr4_features;
120#else
121unsigned long mmu_cr4_features = X86_CR4_PAE;
122#endif
123
124/* for MCA, but anyone else can use it if they want */ 126/* for MCA, but anyone else can use it if they want */
125unsigned int machine_id; 127unsigned int machine_id;
126unsigned int machine_submodel_id; 128unsigned int machine_submodel_id;
127unsigned int BIOS_revision; 129unsigned int BIOS_revision;
128 130
131struct apm_info apm_info;
132EXPORT_SYMBOL(apm_info);
133
134#if defined(CONFIG_X86_SPEEDSTEP_SMI) || \
135 defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
136struct ist_info ist_info;
137EXPORT_SYMBOL(ist_info);
138#else
139struct ist_info ist_info;
140#endif
141
142#else
143struct cpuinfo_x86 boot_cpu_data __read_mostly;
144EXPORT_SYMBOL(boot_cpu_data);
145#endif
146
147
148#if !defined(CONFIG_X86_PAE) || defined(CONFIG_X86_64)
149unsigned long mmu_cr4_features;
150#else
151unsigned long mmu_cr4_features = X86_CR4_PAE;
152#endif
153
129/* Boot loader ID as an integer, for the benefit of proc_dointvec */ 154/* Boot loader ID as an integer, for the benefit of proc_dointvec */
130int bootloader_type; 155int bootloader_type;
131 156
@@ -140,15 +165,8 @@ char dmi_alloc_data[DMI_MAX_DATA];
140 */ 165 */
141struct screen_info screen_info; 166struct screen_info screen_info;
142EXPORT_SYMBOL(screen_info); 167EXPORT_SYMBOL(screen_info);
143struct apm_info apm_info;
144EXPORT_SYMBOL(apm_info);
145struct edid_info edid_info; 168struct edid_info edid_info;
146EXPORT_SYMBOL_GPL(edid_info); 169EXPORT_SYMBOL_GPL(edid_info);
147struct ist_info ist_info;
148#if defined(CONFIG_X86_SPEEDSTEP_SMI) || \
149 defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
150EXPORT_SYMBOL(ist_info);
151#endif
152 170
153extern int root_mountflags; 171extern int root_mountflags;
154 172
@@ -303,15 +321,6 @@ static void __init reserve_initrd(void)
303} 321}
304#endif /* CONFIG_BLK_DEV_INITRD */ 322#endif /* CONFIG_BLK_DEV_INITRD */
305 323
306#ifdef CONFIG_MCA
307static void set_mca_bus(int x)
308{
309 MCA_bus = x;
310}
311#else
312static void set_mca_bus(int x) { }
313#endif
314
315/* 324/*
316 * Determine if we were loaded by an EFI loader. If so, then we have also been 325 * Determine if we were loaded by an EFI loader. If so, then we have also been
317 * passed the efi memmap, systab, etc., so we should use these data structures 326 * passed the efi memmap, systab, etc., so we should use these data structures