]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/setup_64.c
x86: account overlapped mappings in max_pfn_mapped
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / setup_64.c
index 13fe525bf0658145eb3930321bbb0b5f7dd768c9..3d76dbd9f2c09c2ecbf5f6307d28d083bad87165 100644 (file)
@@ -347,13 +347,11 @@ void __init setup_arch(char **cmdline_p)
 
        check_efer();
 
-       init_memory_mapping(0, (end_pfn_map << PAGE_SHIFT));
+       max_pfn_mapped = init_memory_mapping(0, (max_pfn_mapped << PAGE_SHIFT));
        if (efi_enabled)
                efi_init();
 
-#ifdef CONFIG_PARAVIRT
        vsmp_init();
-#endif
 
        dmi_scan_machine();
 
@@ -964,12 +962,19 @@ static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c)
        if (c->extended_cpuid_level >= 0x80000007)
                c->x86_power = cpuid_edx(0x80000007);
 
+
+       clear_cpu_cap(c, X86_FEATURE_PAT);
+
        switch (c->x86_vendor) {
        case X86_VENDOR_AMD:
                early_init_amd(c);
+               if (c->x86 >= 0xf && c->x86 <= 0x11)
+                       set_cpu_cap(c, X86_FEATURE_PAT);
                break;
        case X86_VENDOR_INTEL:
                early_init_intel(c);
+               if (c->x86 == 0xF || (c->x86 == 6 && c->x86_model >= 15))
+                       set_cpu_cap(c, X86_FEATURE_PAT);
                break;
        }
 
@@ -1036,14 +1041,24 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
 #endif
        select_idle_routine(c);
 
-       if (c != &boot_cpu_data)
-               mtrr_ap_init();
 #ifdef CONFIG_NUMA
        numa_add_cpu(smp_processor_id());
 #endif
 
 }
 
+void __cpuinit identify_boot_cpu(void)
+{
+       identify_cpu(&boot_cpu_data);
+}
+
+void __cpuinit identify_secondary_cpu(struct cpuinfo_x86 *c)
+{
+       BUG_ON(c == &boot_cpu_data);
+       identify_cpu(c);
+       mtrr_ap_init();
+}
+
 static __init int setup_noclflush(char *arg)
 {
        setup_clear_cpu_cap(X86_FEATURE_CLFLSH);