]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/setup.c
Merge branch 'linus' into x86/urgent
[linux-2.6] / arch / x86 / kernel / setup.c
index a7c3471ea17c1e43899bd380c3380daa5e4b2d3d..531b55b8e81a1de1827eac5691d5f8aef1d8d10c 100644 (file)
@@ -596,6 +596,7 @@ void __init setup_arch(char **cmdline_p)
 {
 #ifdef CONFIG_X86_32
        memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
+       visws_early_detect();
        pre_setup_arch_hook();
        early_cpu_init();
 #else
@@ -683,6 +684,11 @@ void __init setup_arch(char **cmdline_p)
                clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
        }
 
+#ifdef CONFIG_PCI
+       if (pci_early_dump_regs)
+               early_dump_pci_devices();
+#endif
+
        finish_e820_parsing();
 
 #ifdef CONFIG_X86_32
@@ -713,14 +719,14 @@ void __init setup_arch(char **cmdline_p)
         * partially used pages are not usable - thus
         * we are rounding upwards:
         */
-       max_pfn = e820_end();
+       max_pfn = e820_end_of_ram_pfn();
 
        /* preallocate 4k for mptable mpc */
        early_reserve_e820_mpc_new();
        /* update e820 for memory not covered by WB MTRRs */
        mtrr_bp_init();
        if (mtrr_trim_uncached_memory(max_pfn))
-               max_pfn = e820_end();
+               max_pfn = e820_end_of_ram_pfn();
 
 #ifdef CONFIG_X86_32
        /* max_low_pfn get updated here */
@@ -732,12 +738,26 @@ void __init setup_arch(char **cmdline_p)
 
        /* How many end-of-memory variables you have, grandma! */
        /* need this before calling reserve_initrd */
-       max_low_pfn = max_pfn;
+       if (max_pfn > (1UL<<(32 - PAGE_SHIFT)))
+               max_low_pfn = e820_end_of_low_ram_pfn();
+       else
+               max_low_pfn = max_pfn;
+
        high_memory = (void *)__va(max_pfn * PAGE_SIZE - 1) + 1;
 #endif
 
        /* max_pfn_mapped is updated here */
-       max_pfn_mapped = init_memory_mapping(0, (max_low_pfn << PAGE_SHIFT));
+       max_low_pfn_mapped = init_memory_mapping(0, max_low_pfn<<PAGE_SHIFT);
+       max_pfn_mapped = max_low_pfn_mapped;
+
+#ifdef CONFIG_X86_64
+       if (max_pfn > max_low_pfn) {
+               max_pfn_mapped = init_memory_mapping(1UL<<32,
+                                                    max_pfn<<PAGE_SHIFT);
+               /* can we preseve max_low_pfn ?*/
+               max_low_pfn = max_pfn;
+       }
+#endif
 
        /*
         * NOTE: On x86-32, only from this point on, fixmaps are ready for use.
@@ -834,6 +854,14 @@ void __init setup_arch(char **cmdline_p)
        init_cpu_to_node();
 #endif
 
+#ifdef CONFIG_X86_NUMAQ
+       /*
+        * need to check online nodes num, call it
+        * here before time_init/tsc_init
+        */
+       numaq_tsc_disable();
+#endif
+
        init_apic_mappings();
        ioapic_init_mappings();