aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/xen')
-rw-r--r--arch/x86/xen/Makefile2
-rw-r--r--arch/x86/xen/apic.c17
-rw-r--r--arch/x86/xen/enlighten.c2
-rw-r--r--arch/x86/xen/xen-ops.h4
4 files changed, 24 insertions, 1 deletions
diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile
index add2c2d729ce..96ab2c09cb68 100644
--- a/arch/x86/xen/Makefile
+++ b/arch/x86/xen/Makefile
@@ -20,5 +20,5 @@ obj-$(CONFIG_EVENT_TRACING) += trace.o
20obj-$(CONFIG_SMP) += smp.o 20obj-$(CONFIG_SMP) += smp.o
21obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o 21obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o
22obj-$(CONFIG_XEN_DEBUG_FS) += debugfs.o 22obj-$(CONFIG_XEN_DEBUG_FS) += debugfs.o
23obj-$(CONFIG_XEN_DOM0) += vga.o 23obj-$(CONFIG_XEN_DOM0) += apic.o vga.o
24obj-$(CONFIG_SWIOTLB_XEN) += pci-swiotlb-xen.o 24obj-$(CONFIG_SWIOTLB_XEN) += pci-swiotlb-xen.o
diff --git a/arch/x86/xen/apic.c b/arch/x86/xen/apic.c
new file mode 100644
index 000000000000..73ade38caa32
--- /dev/null
+++ b/arch/x86/xen/apic.c
@@ -0,0 +1,17 @@
1#include <linux/init.h>
2#include <asm/x86_init.h>
3
4unsigned int xen_io_apic_read(unsigned apic, unsigned reg)
5{
6 if (reg == 0x1)
7 return 0x00170020;
8 else if (reg == 0x0)
9 return apic << 24;
10
11 return 0xfd;
12}
13
14void __init xen_init_apic(void)
15{
16 x86_io_apic_ops.read = xen_io_apic_read;
17}
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index a8f8844b8d32..c2ea9e9f420d 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1362,6 +1362,8 @@ asmlinkage void __init xen_start_kernel(void)
1362 xen_start_info->console.domU.mfn = 0; 1362 xen_start_info->console.domU.mfn = 0;
1363 xen_start_info->console.domU.evtchn = 0; 1363 xen_start_info->console.domU.evtchn = 0;
1364 1364
1365 xen_init_apic();
1366
1365 /* Make sure ACS will be enabled */ 1367 /* Make sure ACS will be enabled */
1366 pci_request_acs(); 1368 pci_request_acs();
1367 } 1369 }
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index b095739ccd4c..45c0c0667bd9 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -92,11 +92,15 @@ struct dom0_vga_console_info;
92 92
93#ifdef CONFIG_XEN_DOM0 93#ifdef CONFIG_XEN_DOM0
94void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size); 94void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size);
95void __init xen_init_apic(void);
95#else 96#else
96static inline void __init xen_init_vga(const struct dom0_vga_console_info *info, 97static inline void __init xen_init_vga(const struct dom0_vga_console_info *info,
97 size_t size) 98 size_t size)
98{ 99{
99} 100}
101static inline void __init xen_init_apic(void)
102{
103}
100#endif 104#endif
101 105
102/* Declare an asm function, along with symbols needed to make it 106/* Declare an asm function, along with symbols needed to make it