x86: remove unused tsk_thread from asm-offsets_64.c
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / x86 / kernel / setup_64.c
index e7a9e36bd52d5159ab214e457d12f3a898691be7..1acb435a0585be0b2da1ffbaae7cd517eb628530 100644 (file)
@@ -59,6 +59,7 @@
 #include <asm/sections.h>
 #include <asm/dmi.h>
 #include <asm/cacheflush.h>
+#include <asm/mce.h>
 
 /*
  * Machine setup..
@@ -122,25 +123,27 @@ struct resource standard_io_resources[] = {
 
 #define IORESOURCE_RAM (IORESOURCE_BUSY | IORESOURCE_MEM)
 
-struct resource data_resource = {
+static struct resource data_resource = {
        .name = "Kernel data",
        .start = 0,
        .end = 0,
        .flags = IORESOURCE_RAM,
 };
-struct resource code_resource = {
+static struct resource code_resource = {
        .name = "Kernel code",
        .start = 0,
        .end = 0,
        .flags = IORESOURCE_RAM,
 };
-struct resource bss_resource = {
+static struct resource bss_resource = {
        .name = "Kernel bss",
        .start = 0,
        .end = 0,
        .flags = IORESOURCE_RAM,
 };
 
+static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c);
+
 #ifdef CONFIG_PROC_VMCORE
 /* elfcorehdr= specifies the location of elf core header
  * stored by the crashed kernel. This option will be passed
@@ -311,6 +314,8 @@ void __init setup_arch(char **cmdline_p)
 
        dmi_scan_machine();
 
+       io_delay_init();
+
 #ifdef CONFIG_SMP
        /* setup to use the static apicid table during kernel startup */
        x86_cpu_to_apicid_ptr = (void *)&x86_cpu_to_apicid_init;
@@ -405,9 +410,7 @@ void __init setup_arch(char **cmdline_p)
        reserve_crashkernel();
        paging_init();
 
-#ifdef CONFIG_PCI
        early_quirks();
-#endif
 
        /*
         * set this early, so we dont allocate cpu0
@@ -430,11 +433,12 @@ void __init setup_arch(char **cmdline_p)
        if (smp_found_config)
                get_smp_config();
        init_apic_mappings();
+       ioapic_init_mappings();
 
        /*
         * We trust e820 completely. No explicit ROM probing in memory.
         */
-       e820_reserve_resources(); 
+       e820_reserve_resources(&code_resource, &data_resource, &bss_resource);
        e820_mark_nosave_regions();
 
        {
@@ -844,7 +848,7 @@ struct cpu_model_info {
 /* Do some early cpuid on the boot CPU to get some parameter that are
    needed before check_bugs. Everything advanced is in identify_cpu
    below. */
-void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c)
+static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c)
 {
        u32 tfms;
 
@@ -892,7 +896,6 @@ void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c)
 
 #ifdef CONFIG_SMP
        c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff;
-       c->cpu_index = 0;
 #endif
 }
 
@@ -1040,7 +1043,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                /* Intel-defined (#2) */
                "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est",
                "tm2", "ssse3", "cid", NULL, NULL, "cx16", "xtpr", NULL,
-               NULL, NULL, "dca", NULL, NULL, NULL, NULL, "popcnt",
+               NULL, NULL, "dca", "sse4_1", "sse4_2", NULL, NULL, "popcnt",
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
                /* VIA/Cyrix/Centaur-defined */
@@ -1050,10 +1053,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
                /* AMD-defined (#2) */
-               "lahf_lm", "cmp_legacy", "svm", "extapic", "cr8_legacy",
-               "altmovcr8", "abm", "sse4a",
-               "misalignsse", "3dnowprefetch",
-               "osvw", "ibs", NULL, NULL, NULL, NULL,
+               "lahf_lm", "cmp_legacy", "svm", "extapic",
+               "cr8_legacy", "abm", "sse4a", "misalignsse",
+               "3dnowprefetch", "osvw", "ibs", "sse5",
+               "skinit", "wdt", NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
@@ -1078,8 +1081,6 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 
 
 #ifdef CONFIG_SMP
-       if (!cpu_online(c->cpu_index))
-               return 0;
        cpu = c->cpu_index;
 #endif
 
@@ -1171,15 +1172,15 @@ static int show_cpuinfo(struct seq_file *m, void *v)
 static void *c_start(struct seq_file *m, loff_t *pos)
 {
        if (*pos == 0)  /* just in case, cpu 0 is not the first */
-               *pos = first_cpu(cpu_possible_map);
-       if ((*pos) < NR_CPUS && cpu_possible(*pos))
+               *pos = first_cpu(cpu_online_map);
+       if ((*pos) < NR_CPUS && cpu_online(*pos))
                return &cpu_data(*pos);
        return NULL;
 }
 
 static void *c_next(struct seq_file *m, void *v, loff_t *pos)
 {
-       *pos = next_cpu(*pos, cpu_possible_map);
+       *pos = next_cpu(*pos, cpu_online_map);
        return c_start(m, pos);
 }