]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/genx2apic_cluster.c
Merge branch 'next' into for-linus
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / genx2apic_cluster.c
index 40bc0140d89f6500677b763d88af910cb1ab9afc..e4bf2cc0d743998b069925574ff93c559f7c24f3 100644 (file)
@@ -4,12 +4,22 @@
 #include <linux/kernel.h>
 #include <linux/ctype.h>
 #include <linux/init.h>
+#include <linux/dmar.h>
+
 #include <asm/smp.h>
 #include <asm/ipi.h>
 #include <asm/genapic.h>
 
 DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid);
 
+static int __init x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+{
+       if (cpu_has_x2apic)
+               return 1;
+
+       return 0;
+}
+
 /* Start with all IRQs pointing to boot CPU.  IRQ balancing will shift them. */
 
 static cpumask_t x2apic_target_cpus(void)
@@ -110,14 +120,9 @@ static unsigned long set_apic_id(unsigned int id)
        return x;
 }
 
-static unsigned int x2apic_read_id(void)
-{
-       return apic_read(APIC_ID);
-}
-
 static unsigned int phys_pkg_id(int index_msb)
 {
-       return x2apic_read_id() >> index_msb;
+       return current_cpu_data.initial_apicid >> index_msb;
 }
 
 static void x2apic_send_IPI_self(int vector)
@@ -135,6 +140,7 @@ static void init_x2apic_ldr(void)
 
 struct genapic apic_x2apic_cluster = {
        .name = "cluster x2apic",
+       .acpi_madt_oem_check = x2apic_acpi_madt_oem_check,
        .int_delivery_mode = dest_LowestPrio,
        .int_dest_mode = (APIC_DEST_LOGICAL != 0),
        .target_cpus = x2apic_target_cpus,