Update to 3.4-final.
[linux-flexiantxendom0-3.2.10.git] / arch / x86 / kernel / x86_init-xen.c
1 /*
2  * Copyright (C) 2009 Thomas Gleixner <tglx@linutronix.de>
3  *
4  *  For licencing details see kernel-base/COPYING
5  */
6 #include <linux/bitmap.h>
7 #include <linux/init.h>
8 #include <linux/ioport.h>
9 #include <linux/list.h>
10 #include <linux/module.h>
11 #include <linux/pci.h>
12 #include <linux/spinlock_types.h>
13 #include <linux/threads.h>
14
15 #include <asm/pci_x86.h>
16 #include <asm/mpspec.h>
17 #include <asm/setup.h>
18 #include <asm/apic.h>
19 #include <asm/e820.h>
20 #include <asm/time.h>
21 #include <asm/irq.h>
22 #include <asm/pat.h>
23 #include <asm/iommu.h>
24 #include <asm/mach_traps.h>
25
26 void __cpuinit x86_init_noop(void) { }
27 void __init x86_init_uint_noop(unsigned int unused) { }
28 void __init x86_init_pgd_noop(pgd_t *unused) { }
29 int __init iommu_init_noop(void) { return 0; }
30 void wallclock_init_noop(void) { }
31
32 /*
33  * The platform setup functions are preset with the default functions
34  * for standard PC hardware.
35  */
36 struct x86_init_ops x86_init __initdata = {
37
38         .resources = {
39 #ifdef CONFIG_XEN_PRIVILEGED_GUEST
40                 .probe_roms             = probe_roms,
41 #else
42                 .probe_roms             = x86_init_noop,
43 #endif
44                 .reserve_resources      = reserve_standard_io_resources,
45                 .memory_setup           = default_machine_specific_memory_setup,
46         },
47
48         .mpparse = {
49                 .mpc_record             = x86_init_uint_noop,
50                 .setup_ioapic_ids       = x86_init_noop,
51                 .mpc_apic_id            = NULL,
52                 .smp_read_mpc_oem       = default_smp_read_mpc_oem,
53                 .mpc_oem_bus_info       = default_mpc_oem_bus_info,
54                 .find_smp_config        = default_find_smp_config,
55                 .get_smp_config         = default_get_smp_config,
56         },
57
58         .irqs = {
59                 .pre_vector_init        = NULL,
60                 .intr_init              = NULL,
61                 .trap_init              = x86_init_noop,
62         },
63
64         .oem = {
65                 .arch_setup             = xen_arch_setup,
66                 .banner                 = x86_init_noop,
67         },
68
69         .mapping = {
70                 .pagetable_reserve              = xen_pagetable_reserve,
71         },
72
73         .paging = {
74                 .pagetable_setup_start  = x86_init_pgd_noop,
75                 .pagetable_setup_done   = x86_init_pgd_noop,
76         },
77
78         .timers = {
79                 .setup_percpu_clockev   = NULL,
80                 .tsc_pre_init           = x86_init_noop,
81                 .timer_init             = x86_init_noop,
82                 .wallclock_init         = x86_init_noop,
83         },
84
85         .iommu = {
86                 .iommu_init             = iommu_init_noop,
87         },
88
89         .pci = {
90                 .init                   = x86_default_pci_init,
91                 .init_irq               = x86_default_pci_init_irq,
92                 .fixup_irqs             = x86_default_pci_fixup_irqs,
93         },
94 };
95
96 static int default_i8042_detect(void) { return 1; };
97
98 struct x86_platform_ops x86_platform = {
99         .calibrate_tsc                  = NULL,
100         .wallclock_init                 = wallclock_init_noop,
101         .get_wallclock                  = xen_read_wallclock,
102         .set_wallclock                  = xen_write_wallclock,
103         .is_untracked_pat_range         = is_ISA_range,
104         .get_nmi_reason                 = xen_get_nmi_reason,
105         .i8042_detect                   = default_i8042_detect
106 };
107
108 EXPORT_SYMBOL_GPL(x86_platform);