Commit 9ca33eb6 authored by Andi Kleen's avatar Andi Kleen Committed by Andi Kleen

[PATCH] Use early CPU identify before early command line parsing

This makes it possible to modify CPU flags in command line
options without hacks.

And remove another copy in head64.c
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent d4d35854
...@@ -56,24 +56,6 @@ static void __init copy_bootdata(char *real_mode_data) ...@@ -56,24 +56,6 @@ static void __init copy_bootdata(char *real_mode_data)
printk("Bootdata ok (command line is %s)\n", saved_command_line); printk("Bootdata ok (command line is %s)\n", saved_command_line);
} }
static void __init setup_boot_cpu_data(void)
{
unsigned int dummy, eax;
/* get vendor info */
cpuid(0, (unsigned int *)&boot_cpu_data.cpuid_level,
(unsigned int *)&boot_cpu_data.x86_vendor_id[0],
(unsigned int *)&boot_cpu_data.x86_vendor_id[8],
(unsigned int *)&boot_cpu_data.x86_vendor_id[4]);
/* get cpu type */
cpuid(1, &eax, &dummy, &dummy,
(unsigned int *) &boot_cpu_data.x86_capability);
boot_cpu_data.x86 = (eax >> 8) & 0xf;
boot_cpu_data.x86_model = (eax >> 4) & 0xf;
boot_cpu_data.x86_mask = eax & 0xf;
}
void __init x86_64_start_kernel(char * real_mode_data) void __init x86_64_start_kernel(char * real_mode_data)
{ {
char *s; char *s;
...@@ -117,6 +99,5 @@ void __init x86_64_start_kernel(char * real_mode_data) ...@@ -117,6 +99,5 @@ void __init x86_64_start_kernel(char * real_mode_data)
if (__pa_symbol(&_end) >= KERNEL_TEXT_SIZE) if (__pa_symbol(&_end) >= KERNEL_TEXT_SIZE)
panic("Kernel too big for kernel mapping\n"); panic("Kernel too big for kernel mapping\n");
setup_boot_cpu_data();
start_kernel(); start_kernel();
} }
...@@ -545,10 +545,10 @@ void __init setup_arch(char **cmdline_p) ...@@ -545,10 +545,10 @@ void __init setup_arch(char **cmdline_p)
data_resource.start = virt_to_phys(&_etext); data_resource.start = virt_to_phys(&_etext);
data_resource.end = virt_to_phys(&_edata)-1; data_resource.end = virt_to_phys(&_edata)-1;
parse_cmdline_early(cmdline_p);
early_identify_cpu(&boot_cpu_data); early_identify_cpu(&boot_cpu_data);
parse_cmdline_early(cmdline_p);
/* /*
* partially used pages are not usable - thus * partially used pages are not usable - thus
* we are rounding upwards: * we are rounding upwards:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment