]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/x86_64/kernel/setup.c
Unify the CPU features vectors between i386 and x86-64
[mv-sheeva.git] / arch / x86_64 / kernel / setup.c
index 13daaf359d217a9d2509f629211a4e92cbf6ccb9..dc7630d06460c425dd1a5c9edd7c103b88907fc5 100644 (file)
@@ -79,6 +79,8 @@ int bootloader_type;
 
 unsigned long saved_video_mode;
 
+int force_mwait __cpuinitdata;
+
 /* 
  * Early DMI memory
  */
@@ -205,10 +207,10 @@ static void discover_ebda(void)
         * there is a real-mode segmented pointer pointing to the 
         * 4K EBDA area at 0x40E
         */
-       ebda_addr = *(unsigned short *)EBDA_ADDR_POINTER;
+       ebda_addr = *(unsigned short *)__va(EBDA_ADDR_POINTER);
        ebda_addr <<= 4;
 
-       ebda_size = *(unsigned short *)(unsigned long)ebda_addr;
+       ebda_size = *(unsigned short *)__va(ebda_addr);
 
        /* Round EBDA up to pages */
        if (ebda_size == 0)
@@ -274,8 +276,6 @@ void __init setup_arch(char **cmdline_p)
 
        dmi_scan_machine();
 
-       zap_low_mappings(0);
-
 #ifdef CONFIG_ACPI
        /*
         * Initialize the ACPI boot-time table parser (gets the RSDP and SDT).
@@ -329,15 +329,8 @@ void __init setup_arch(char **cmdline_p)
 #endif
 
 #ifdef CONFIG_SMP
-       /*
-        * But first pinch a few for the stack/trampoline stuff
-        * FIXME: Don't need the extra page at 4K, but need to fix
-        * trampoline before removing it. (see the GDT stuff)
-        */
-       reserve_bootmem_generic(PAGE_SIZE, PAGE_SIZE);
-
        /* Reserve SMP trampoline */
-       reserve_bootmem_generic(SMP_TRAMPOLINE_BASE, PAGE_SIZE);
+       reserve_bootmem_generic(SMP_TRAMPOLINE_BASE, 2*PAGE_SIZE);
 #endif
 
 #ifdef CONFIG_ACPI_SLEEP
@@ -612,6 +605,10 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
 
        /* RDTSC can be speculated around */
        clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
+
+       /* Family 10 doesn't support C states in MWAIT so don't use it */
+       if (c->x86 == 0x10 && !force_mwait)
+               clear_bit(X86_FEATURE_MWAIT, &c->x86_capability);
 }
 
 static void __cpuinit detect_ht(struct cpuinfo_x86 *c)
@@ -894,9 +891,7 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
 #ifdef CONFIG_X86_MCE
        mcheck_init(c);
 #endif
-       if (c == &boot_cpu_data)
-               mtrr_bp_init();
-       else
+       if (c != &boot_cpu_data)
                mtrr_ap_init();
 #ifdef CONFIG_NUMA
        numa_add_cpu(smp_processor_id());
@@ -936,7 +931,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
                "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov",
                "pat", "pse36", "pn", "clflush", NULL, "dts", "acpi", "mmx",
-               "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", NULL,
+               "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", "pbe",
 
                /* AMD-defined */
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -952,10 +947,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
                /* Other (Linux-defined) */
-               "cxmmx", NULL, "cyrix_arr", "centaur_mcr", NULL,
-               "constant_tsc", NULL, NULL,
-               "up", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+               "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr",
+               NULL, NULL, NULL, NULL,
+               "constant_tsc", "up", NULL, "arch_perfmon",
+               "pebs", "bts", NULL, "sync_rdtsc",
+               "rep_good", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
                /* Intel-defined (#2) */
@@ -966,7 +962,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 
                /* VIA/Cyrix/Centaur-defined */
                NULL, NULL, "rng", "rng_en", NULL, NULL, "ace", "ace_en",
-               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+               "ace2", "ace2_en", "phe", "phe_en", "pmm", "pmm_en", NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
@@ -987,9 +983,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                "stc",
                "100mhzsteps",
                "hwpstate",
-               NULL,   /* tsc invariant mapped to constant_tsc */
-               NULL,
-               /* nothing */   /* constant_tsc - moved to flags */
+               "",     /* tsc invariant mapped to constant_tsc */
+               /* nothing */
        };
 
 
@@ -1104,23 +1099,3 @@ struct seq_operations cpuinfo_op = {
        .stop = c_stop,
        .show = show_cpuinfo,
 };
-
-#if defined(CONFIG_INPUT_PCSPKR) || defined(CONFIG_INPUT_PCSPKR_MODULE)
-#include <linux/platform_device.h>
-static __init int add_pcspkr(void)
-{
-       struct platform_device *pd;
-       int ret;
-
-       pd = platform_device_alloc("pcspkr", -1);
-       if (!pd)
-               return -ENOMEM;
-
-       ret = platform_device_add(pd);
-       if (ret)
-               platform_device_put(pd);
-
-       return ret;
-}
-device_initcall(add_pcspkr);
-#endif