x86, platform: Export x86_platform to modules
[linux-2.6.git] / arch / x86 / kernel / x86_init.c
1 /*
2  * Copyright (C) 2009 Thomas Gleixner <tglx@linutronix.de>
3  *
4  *  For licencing details see kernel-base/COPYING
5  */
6 #include <linux/init.h>
7 #include <linux/ioport.h>
8 #include <linux/module.h>
9
10 #include <asm/bios_ebda.h>
11 #include <asm/paravirt.h>
12 #include <asm/pci_x86.h>
13 #include <asm/mpspec.h>
14 #include <asm/setup.h>
15 #include <asm/apic.h>
16 #include <asm/e820.h>
17 #include <asm/time.h>
18 #include <asm/irq.h>
19 #include <asm/pat.h>
20 #include <asm/tsc.h>
21 #include <asm/iommu.h>
22
23 void __cpuinit x86_init_noop(void) { }
24 void __init x86_init_uint_noop(unsigned int unused) { }
25 void __init x86_init_pgd_noop(pgd_t *unused) { }
26 int __init iommu_init_noop(void) { return 0; }
27 void iommu_shutdown_noop(void) { }
28
29 /*
30  * The platform setup functions are preset with the default functions
31  * for standard PC hardware.
32  */
33 struct x86_init_ops x86_init __initdata = {
34
35         .resources = {
36                 .probe_roms             = x86_init_noop,
37                 .reserve_resources      = reserve_standard_io_resources,
38                 .memory_setup           = default_machine_specific_memory_setup,
39         },
40
41         .mpparse = {
42                 .mpc_record             = x86_init_uint_noop,
43                 .setup_ioapic_ids       = x86_init_noop,
44                 .mpc_apic_id            = default_mpc_apic_id,
45                 .smp_read_mpc_oem       = default_smp_read_mpc_oem,
46                 .mpc_oem_bus_info       = default_mpc_oem_bus_info,
47                 .find_smp_config        = default_find_smp_config,
48                 .get_smp_config         = default_get_smp_config,
49         },
50
51         .irqs = {
52                 .pre_vector_init        = init_ISA_irqs,
53                 .intr_init              = native_init_IRQ,
54                 .trap_init              = x86_init_noop,
55         },
56
57         .oem = {
58                 .arch_setup             = x86_init_noop,
59                 .banner                 = default_banner,
60         },
61
62         .paging = {
63                 .pagetable_setup_start  = native_pagetable_setup_start,
64                 .pagetable_setup_done   = native_pagetable_setup_done,
65         },
66
67         .timers = {
68                 .setup_percpu_clockev   = setup_boot_APIC_clock,
69                 .tsc_pre_init           = x86_init_noop,
70                 .timer_init             = hpet_time_init,
71         },
72
73         .iommu = {
74                 .iommu_init             = iommu_init_noop,
75         },
76
77         .pci = {
78                 .init                   = x86_default_pci_init,
79                 .init_irq               = x86_default_pci_init_irq,
80                 .fixup_irqs             = x86_default_pci_fixup_irqs,
81         },
82 };
83
84 struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
85         .setup_percpu_clockev           = setup_secondary_APIC_clock,
86 };
87
88 static void default_nmi_init(void) { };
89
90 struct x86_platform_ops x86_platform = {
91         .calibrate_tsc                  = native_calibrate_tsc,
92         .get_wallclock                  = mach_get_cmos_time,
93         .set_wallclock                  = mach_set_rtc_mmss,
94         .iommu_shutdown                 = iommu_shutdown_noop,
95         .is_untracked_pat_range         = is_ISA_range,
96         .nmi_init                       = default_nmi_init
97 };
98
99 EXPORT_SYMBOL_GPL(x86_platform);