- Update Xen patches to 3.3-rc5 and c/s 1157.
[linux-flexiantxendom0-3.2.10.git] / arch / x86 / kernel / apic / probe_32-xen.c
1 /*
2  * Default generic APIC driver. This handles up to 8 CPUs.
3  *
4  * Copyright 2003 Andi Kleen, SuSE Labs.
5  * Subject to the GNU Public License, v.2
6  *
7  * Generic x86 APIC driver probe layer.
8  */
9 #include <linux/threads.h>
10 #include <linux/cpumask.h>
11 #include <linux/module.h>
12 #include <linux/string.h>
13 #include <linux/kernel.h>
14 #include <linux/ctype.h>
15 #include <linux/init.h>
16 #include <linux/errno.h>
17 #include <asm/fixmap.h>
18 #include <asm/mpspec.h>
19 #include <asm/apicdef.h>
20 #include <asm/apic.h>
21 #include <asm/setup.h>
22
23 #include <linux/smp.h>
24 #include <asm/ipi.h>
25
26 #include <linux/interrupt.h>
27 #include <asm/acpi.h>
28 #include <asm/e820.h>
29
30 static int xen_phys_pkg_id(int cpuid_apic, int index_msb)
31 {
32         return cpuid_apic;
33 }
34
35 static struct apic apic_xen = {
36
37         .name                           = "default",
38
39         .irq_delivery_mode              = dest_LowestPrio,
40         /* logical delivery broadcast to all CPUs: */
41         .irq_dest_mode                  = 1,
42
43         .target_cpus                    = default_target_cpus,
44
45         .phys_pkg_id                    = xen_phys_pkg_id,
46
47 #ifdef CONFIG_SMP
48         .send_IPI_mask                  = xen_send_IPI_mask,
49         .send_IPI_mask_allbutself       = xen_send_IPI_mask_allbutself,
50         .send_IPI_allbutself            = xen_send_IPI_allbutself,
51         .send_IPI_all                   = xen_send_IPI_all,
52         .send_IPI_self                  = xen_send_IPI_self,
53 #endif
54 };
55
56 struct apic *apic = &apic_xen;
57 EXPORT_SYMBOL_GPL(apic);