]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - arch/x86_64/kernel/setup.c
[PATCH] x86_64: Port over e820 gap detection from i386
[linux-2.6.git] / arch / x86_64 / kernel / setup.c
index e50fc41de6b958a12d1685cbefd3b4607a2a292a..57f619052badd62e28b29e0ed0bef1bfa49ba7ed 100644 (file)
@@ -76,9 +76,6 @@ int __initdata acpi_force = 0;
 
 int acpi_numa __initdata;
 
-/* For PCI or other memory-mapped resources */
-unsigned long pci_mem_start = 0x10000000;
-
 /* Boot loader ID as an integer, for the benefit of proc_dointvec */
 int bootloader_type;
 
@@ -495,7 +492,6 @@ static void __init reserve_ebda_region(void)
 
 void __init setup_arch(char **cmdline_p)
 {
-       unsigned long low_mem_size;
        unsigned long kernel_end;
 
        ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
@@ -654,13 +650,7 @@ void __init setup_arch(char **cmdline_p)
                request_resource(&ioport_resource, &standard_io_resources[i]);
        }
 
-       /* Will likely break when you have unassigned resources with more
-          than 4GB memory and bridges that don't support more than 4GB. 
-          Doing it properly would require to use pci_alloc_consistent
-          in this case. */
-       low_mem_size = ((end_pfn << PAGE_SHIFT) + 0xfffff) & ~0xfffff;
-       if (low_mem_size > pci_mem_start)
-               pci_mem_start = low_mem_size;
+       e820_setup_gap();
 
 #ifdef CONFIG_GART_IOMMU
        iommu_hole_init();
@@ -855,6 +845,8 @@ static void __init init_intel(struct cpuinfo_x86 *c)
 
        if (c->x86 == 15)
                c->x86_cache_alignment = c->x86_clflush_size * 2;
+       if (c->x86 >= 15)
+               set_bit(X86_FEATURE_CONSTANT_TSC, &c->x86_capability);
 }
 
 void __init get_cpu_vendor(struct cpuinfo_x86 *c)
@@ -1055,7 +1047,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
                /* Other (Linux-defined) */
-               "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", NULL, NULL, NULL, NULL,
+               "cxmmx", NULL, "cyrix_arr", "centaur_mcr", "k8c+",
+               "constant_tsc", NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -1113,8 +1106,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
        
 #ifdef CONFIG_SMP
-       seq_printf(m, "physical id\t: %d\n", phys_proc_id[c - cpu_data]);
-       seq_printf(m, "siblings\t: %d\n", c->x86_num_cores * smp_num_siblings);
+       if (smp_num_siblings * c->x86_num_cores > 1) {
+               int cpu = c - cpu_data;
+               seq_printf(m, "physical id\t: %d\n", phys_proc_id[cpu]);
+               seq_printf(m, "siblings\t: %d\n",
+                               c->x86_num_cores * smp_num_siblings);
+       }
 #endif 
 
        seq_printf(m,