diff options
Diffstat (limited to 'arch/x86_64/kernel/setup.c')
-rw-r--r-- | arch/x86_64/kernel/setup.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 3d98b696881d..db30b5bcef61 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -79,6 +79,8 @@ int bootloader_type; | |||
79 | 79 | ||
80 | unsigned long saved_video_mode; | 80 | unsigned long saved_video_mode; |
81 | 81 | ||
82 | int force_mwait __cpuinitdata; | ||
83 | |||
82 | /* | 84 | /* |
83 | * Early DMI memory | 85 | * Early DMI memory |
84 | */ | 86 | */ |
@@ -205,10 +207,10 @@ static void discover_ebda(void) | |||
205 | * there is a real-mode segmented pointer pointing to the | 207 | * there is a real-mode segmented pointer pointing to the |
206 | * 4K EBDA area at 0x40E | 208 | * 4K EBDA area at 0x40E |
207 | */ | 209 | */ |
208 | ebda_addr = *(unsigned short *)EBDA_ADDR_POINTER; | 210 | ebda_addr = *(unsigned short *)__va(EBDA_ADDR_POINTER); |
209 | ebda_addr <<= 4; | 211 | ebda_addr <<= 4; |
210 | 212 | ||
211 | ebda_size = *(unsigned short *)(unsigned long)ebda_addr; | 213 | ebda_size = *(unsigned short *)__va(ebda_addr); |
212 | 214 | ||
213 | /* Round EBDA up to pages */ | 215 | /* Round EBDA up to pages */ |
214 | if (ebda_size == 0) | 216 | if (ebda_size == 0) |
@@ -243,11 +245,12 @@ void __init setup_arch(char **cmdline_p) | |||
243 | init_mm.end_code = (unsigned long) &_etext; | 245 | init_mm.end_code = (unsigned long) &_etext; |
244 | init_mm.end_data = (unsigned long) &_edata; | 246 | init_mm.end_data = (unsigned long) &_edata; |
245 | init_mm.brk = (unsigned long) &_end; | 247 | init_mm.brk = (unsigned long) &_end; |
248 | init_mm.pgd = __va(__pa_symbol(&init_level4_pgt)); | ||
246 | 249 | ||
247 | code_resource.start = virt_to_phys(&_text); | 250 | code_resource.start = __pa_symbol(&_text); |
248 | code_resource.end = virt_to_phys(&_etext)-1; | 251 | code_resource.end = __pa_symbol(&_etext)-1; |
249 | data_resource.start = virt_to_phys(&_etext); | 252 | data_resource.start = __pa_symbol(&_etext); |
250 | data_resource.end = virt_to_phys(&_edata)-1; | 253 | data_resource.end = __pa_symbol(&_edata)-1; |
251 | 254 | ||
252 | early_identify_cpu(&boot_cpu_data); | 255 | early_identify_cpu(&boot_cpu_data); |
253 | 256 | ||
@@ -274,8 +277,6 @@ void __init setup_arch(char **cmdline_p) | |||
274 | 277 | ||
275 | dmi_scan_machine(); | 278 | dmi_scan_machine(); |
276 | 279 | ||
277 | zap_low_mappings(0); | ||
278 | |||
279 | #ifdef CONFIG_ACPI | 280 | #ifdef CONFIG_ACPI |
280 | /* | 281 | /* |
281 | * Initialize the ACPI boot-time table parser (gets the RSDP and SDT). | 282 | * Initialize the ACPI boot-time table parser (gets the RSDP and SDT). |
@@ -329,15 +330,8 @@ void __init setup_arch(char **cmdline_p) | |||
329 | #endif | 330 | #endif |
330 | 331 | ||
331 | #ifdef CONFIG_SMP | 332 | #ifdef CONFIG_SMP |
332 | /* | ||
333 | * But first pinch a few for the stack/trampoline stuff | ||
334 | * FIXME: Don't need the extra page at 4K, but need to fix | ||
335 | * trampoline before removing it. (see the GDT stuff) | ||
336 | */ | ||
337 | reserve_bootmem_generic(PAGE_SIZE, PAGE_SIZE); | ||
338 | |||
339 | /* Reserve SMP trampoline */ | 333 | /* Reserve SMP trampoline */ |
340 | reserve_bootmem_generic(SMP_TRAMPOLINE_BASE, PAGE_SIZE); | 334 | reserve_bootmem_generic(SMP_TRAMPOLINE_BASE, 2*PAGE_SIZE); |
341 | #endif | 335 | #endif |
342 | 336 | ||
343 | #ifdef CONFIG_ACPI_SLEEP | 337 | #ifdef CONFIG_ACPI_SLEEP |
@@ -612,6 +606,10 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
612 | 606 | ||
613 | /* RDTSC can be speculated around */ | 607 | /* RDTSC can be speculated around */ |
614 | clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); | 608 | clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); |
609 | |||
610 | /* Family 10 doesn't support C states in MWAIT so don't use it */ | ||
611 | if (c->x86 == 0x10 && !force_mwait) | ||
612 | clear_bit(X86_FEATURE_MWAIT, &c->x86_capability); | ||
615 | } | 613 | } |
616 | 614 | ||
617 | static void __cpuinit detect_ht(struct cpuinfo_x86 *c) | 615 | static void __cpuinit detect_ht(struct cpuinfo_x86 *c) |
@@ -987,9 +985,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
987 | "stc", | 985 | "stc", |
988 | "100mhzsteps", | 986 | "100mhzsteps", |
989 | "hwpstate", | 987 | "hwpstate", |
990 | NULL, /* tsc invariant mapped to constant_tsc */ | 988 | "", /* tsc invariant mapped to constant_tsc */ |
991 | NULL, | 989 | /* nothing */ |
992 | /* nothing */ /* constant_tsc - moved to flags */ | ||
993 | }; | 990 | }; |
994 | 991 | ||
995 | 992 | ||