diff options
Diffstat (limited to 'arch/x86/include')
| -rw-r--r-- | arch/x86/include/asm/apic.h | 19 | ||||
| -rw-r--r-- | arch/x86/include/asm/bootparam.h | 10 | ||||
| -rw-r--r-- | arch/x86/include/asm/do_timer.h | 16 | ||||
| -rw-r--r-- | arch/x86/include/asm/e820.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/hypervisor.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/io_apic.h | 7 | ||||
| -rw-r--r-- | arch/x86/include/asm/irq.h | 3 | ||||
| -rw-r--r-- | arch/x86/include/asm/mpspec.h | 47 | ||||
| -rw-r--r-- | arch/x86/include/asm/paravirt.h | 51 | ||||
| -rw-r--r-- | arch/x86/include/asm/paravirt_types.h | 28 | ||||
| -rw-r--r-- | arch/x86/include/asm/pgtable.h | 10 | ||||
| -rw-r--r-- | arch/x86/include/asm/pgtable_types.h | 4 | ||||
| -rw-r--r-- | arch/x86/include/asm/setup.h | 49 | ||||
| -rw-r--r-- | arch/x86/include/asm/time.h | 53 | ||||
| -rw-r--r-- | arch/x86/include/asm/timer.h | 14 | ||||
| -rw-r--r-- | arch/x86/include/asm/tsc.h | 3 | ||||
| -rw-r--r-- | arch/x86/include/asm/vmware.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/x86_init.h | 133 |
18 files changed, 225 insertions, 228 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 586b7adb8e5..c6d21b18806 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
| @@ -70,9 +70,6 @@ static inline void default_inquire_remote_apic(int apicid) | |||
| 70 | */ | 70 | */ |
| 71 | #ifdef CONFIG_PARAVIRT | 71 | #ifdef CONFIG_PARAVIRT |
| 72 | #include <asm/paravirt.h> | 72 | #include <asm/paravirt.h> |
| 73 | #else | ||
| 74 | #define setup_boot_clock setup_boot_APIC_clock | ||
| 75 | #define setup_secondary_clock setup_secondary_APIC_clock | ||
| 76 | #endif | 73 | #endif |
| 77 | 74 | ||
| 78 | #ifdef CONFIG_X86_64 | 75 | #ifdef CONFIG_X86_64 |
| @@ -252,6 +249,8 @@ static inline void lapic_shutdown(void) { } | |||
| 252 | static inline void init_apic_mappings(void) { } | 249 | static inline void init_apic_mappings(void) { } |
| 253 | static inline void disable_local_APIC(void) { } | 250 | static inline void disable_local_APIC(void) { } |
| 254 | static inline void apic_disable(void) { } | 251 | static inline void apic_disable(void) { } |
| 252 | # define setup_boot_APIC_clock x86_init_noop | ||
| 253 | # define setup_secondary_APIC_clock x86_init_noop | ||
| 255 | #endif /* !CONFIG_X86_LOCAL_APIC */ | 254 | #endif /* !CONFIG_X86_LOCAL_APIC */ |
| 256 | 255 | ||
| 257 | #ifdef CONFIG_X86_64 | 256 | #ifdef CONFIG_X86_64 |
| @@ -300,7 +299,7 @@ struct apic { | |||
| 300 | int (*cpu_present_to_apicid)(int mps_cpu); | 299 | int (*cpu_present_to_apicid)(int mps_cpu); |
| 301 | physid_mask_t (*apicid_to_cpu_present)(int phys_apicid); | 300 | physid_mask_t (*apicid_to_cpu_present)(int phys_apicid); |
| 302 | void (*setup_portio_remap)(void); | 301 | void (*setup_portio_remap)(void); |
| 303 | int (*check_phys_apicid_present)(int boot_cpu_physical_apicid); | 302 | int (*check_phys_apicid_present)(int phys_apicid); |
| 304 | void (*enable_apic_mode)(void); | 303 | void (*enable_apic_mode)(void); |
| 305 | int (*phys_pkg_id)(int cpuid_apic, int index_msb); | 304 | int (*phys_pkg_id)(int cpuid_apic, int index_msb); |
| 306 | 305 | ||
| @@ -434,7 +433,7 @@ extern struct apic apic_x2apic_uv_x; | |||
| 434 | DECLARE_PER_CPU(int, x2apic_extra_bits); | 433 | DECLARE_PER_CPU(int, x2apic_extra_bits); |
| 435 | 434 | ||
| 436 | extern int default_cpu_present_to_apicid(int mps_cpu); | 435 | extern int default_cpu_present_to_apicid(int mps_cpu); |
| 437 | extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid); | 436 | extern int default_check_phys_apicid_present(int phys_apicid); |
| 438 | #endif | 437 | #endif |
| 439 | 438 | ||
| 440 | static inline void default_wait_for_init_deassert(atomic_t *deassert) | 439 | static inline void default_wait_for_init_deassert(atomic_t *deassert) |
| @@ -550,9 +549,9 @@ static inline int __default_cpu_present_to_apicid(int mps_cpu) | |||
| 550 | } | 549 | } |
| 551 | 550 | ||
| 552 | static inline int | 551 | static inline int |
| 553 | __default_check_phys_apicid_present(int boot_cpu_physical_apicid) | 552 | __default_check_phys_apicid_present(int phys_apicid) |
| 554 | { | 553 | { |
| 555 | return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map); | 554 | return physid_isset(phys_apicid, phys_cpu_present_map); |
| 556 | } | 555 | } |
| 557 | 556 | ||
| 558 | #ifdef CONFIG_X86_32 | 557 | #ifdef CONFIG_X86_32 |
| @@ -562,13 +561,13 @@ static inline int default_cpu_present_to_apicid(int mps_cpu) | |||
| 562 | } | 561 | } |
| 563 | 562 | ||
| 564 | static inline int | 563 | static inline int |
| 565 | default_check_phys_apicid_present(int boot_cpu_physical_apicid) | 564 | default_check_phys_apicid_present(int phys_apicid) |
| 566 | { | 565 | { |
| 567 | return __default_check_phys_apicid_present(boot_cpu_physical_apicid); | 566 | return __default_check_phys_apicid_present(phys_apicid); |
| 568 | } | 567 | } |
| 569 | #else | 568 | #else |
| 570 | extern int default_cpu_present_to_apicid(int mps_cpu); | 569 | extern int default_cpu_present_to_apicid(int mps_cpu); |
| 571 | extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid); | 570 | extern int default_check_phys_apicid_present(int phys_apicid); |
| 572 | #endif | 571 | #endif |
| 573 | 572 | ||
| 574 | static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) | 573 | static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) |
diff --git a/arch/x86/include/asm/bootparam.h b/arch/x86/include/asm/bootparam.h index 6ca20218dd7..6be33d83c71 100644 --- a/arch/x86/include/asm/bootparam.h +++ b/arch/x86/include/asm/bootparam.h | |||
| @@ -110,4 +110,14 @@ struct boot_params { | |||
| 110 | __u8 _pad9[276]; /* 0xeec */ | 110 | __u8 _pad9[276]; /* 0xeec */ |
| 111 | } __attribute__((packed)); | 111 | } __attribute__((packed)); |
| 112 | 112 | ||
| 113 | enum { | ||
| 114 | X86_SUBARCH_PC = 0, | ||
| 115 | X86_SUBARCH_LGUEST, | ||
| 116 | X86_SUBARCH_XEN, | ||
| 117 | X86_SUBARCH_MRST, | ||
| 118 | X86_NR_SUBARCHS, | ||
| 119 | }; | ||
| 120 | |||
| 121 | |||
| 122 | |||
| 113 | #endif /* _ASM_X86_BOOTPARAM_H */ | 123 | #endif /* _ASM_X86_BOOTPARAM_H */ |
diff --git a/arch/x86/include/asm/do_timer.h b/arch/x86/include/asm/do_timer.h deleted file mode 100644 index 23ecda0b28a..00000000000 --- a/arch/x86/include/asm/do_timer.h +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | /* defines for inline arch setup functions */ | ||
| 2 | #include <linux/clockchips.h> | ||
| 3 | |||
| 4 | #include <asm/i8259.h> | ||
| 5 | #include <asm/i8253.h> | ||
| 6 | |||
| 7 | /** | ||
| 8 | * do_timer_interrupt_hook - hook into timer tick | ||
| 9 | * | ||
| 10 | * Call the pit clock event handler. see asm/i8253.h | ||
| 11 | **/ | ||
| 12 | |||
| 13 | static inline void do_timer_interrupt_hook(void) | ||
| 14 | { | ||
| 15 | global_clock_event->event_handler(global_clock_event); | ||
| 16 | } | ||
diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h index 7ecba4d8508..40b4e614fe7 100644 --- a/arch/x86/include/asm/e820.h +++ b/arch/x86/include/asm/e820.h | |||
| @@ -126,8 +126,6 @@ extern void e820_reserve_resources(void); | |||
| 126 | extern void e820_reserve_resources_late(void); | 126 | extern void e820_reserve_resources_late(void); |
| 127 | extern void setup_memory_map(void); | 127 | extern void setup_memory_map(void); |
| 128 | extern char *default_machine_specific_memory_setup(void); | 128 | extern char *default_machine_specific_memory_setup(void); |
| 129 | extern char *machine_specific_memory_setup(void); | ||
| 130 | extern char *memory_setup(void); | ||
| 131 | #endif /* __KERNEL__ */ | 129 | #endif /* __KERNEL__ */ |
| 132 | #endif /* __ASSEMBLY__ */ | 130 | #endif /* __ASSEMBLY__ */ |
| 133 | 131 | ||
diff --git a/arch/x86/include/asm/hypervisor.h b/arch/x86/include/asm/hypervisor.h index 369f5c5d09a..b78c0941e42 100644 --- a/arch/x86/include/asm/hypervisor.h +++ b/arch/x86/include/asm/hypervisor.h | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #ifndef ASM_X86__HYPERVISOR_H | 20 | #ifndef ASM_X86__HYPERVISOR_H |
| 21 | #define ASM_X86__HYPERVISOR_H | 21 | #define ASM_X86__HYPERVISOR_H |
| 22 | 22 | ||
| 23 | extern unsigned long get_hypervisor_tsc_freq(void); | ||
| 24 | extern void init_hypervisor(struct cpuinfo_x86 *c); | 23 | extern void init_hypervisor(struct cpuinfo_x86 *c); |
| 24 | extern void init_hypervisor_platform(void); | ||
| 25 | 25 | ||
| 26 | #endif | 26 | #endif |
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index 85232d32fcb..7c7c16cde1f 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
| @@ -143,6 +143,8 @@ extern int noioapicreroute; | |||
| 143 | /* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */ | 143 | /* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */ |
| 144 | extern int timer_through_8259; | 144 | extern int timer_through_8259; |
| 145 | 145 | ||
| 146 | extern void io_apic_disable_legacy(void); | ||
| 147 | |||
| 146 | /* | 148 | /* |
| 147 | * If we use the IO-APIC for IRQ routing, disable automatic | 149 | * If we use the IO-APIC for IRQ routing, disable automatic |
| 148 | * assignment of PCI IRQ's. | 150 | * assignment of PCI IRQ's. |
| @@ -176,6 +178,7 @@ extern int setup_ioapic_entry(int apic, int irq, | |||
| 176 | int polarity, int vector, int pin); | 178 | int polarity, int vector, int pin); |
| 177 | extern void ioapic_write_entry(int apic, int pin, | 179 | extern void ioapic_write_entry(int apic, int pin, |
| 178 | struct IO_APIC_route_entry e); | 180 | struct IO_APIC_route_entry e); |
| 181 | extern void setup_ioapic_ids_from_mpc(void); | ||
| 179 | 182 | ||
| 180 | struct mp_ioapic_gsi{ | 183 | struct mp_ioapic_gsi{ |
| 181 | int gsi_base; | 184 | int gsi_base; |
| @@ -187,12 +190,14 @@ int mp_find_ioapic_pin(int ioapic, int gsi); | |||
| 187 | void __init mp_register_ioapic(int id, u32 address, u32 gsi_base); | 190 | void __init mp_register_ioapic(int id, u32 address, u32 gsi_base); |
| 188 | 191 | ||
| 189 | #else /* !CONFIG_X86_IO_APIC */ | 192 | #else /* !CONFIG_X86_IO_APIC */ |
| 193 | |||
| 190 | #define io_apic_assign_pci_irqs 0 | 194 | #define io_apic_assign_pci_irqs 0 |
| 195 | #define setup_ioapic_ids_from_mpc x86_init_noop | ||
| 191 | static const int timer_through_8259 = 0; | 196 | static const int timer_through_8259 = 0; |
| 192 | static inline void ioapic_init_mappings(void) { } | 197 | static inline void ioapic_init_mappings(void) { } |
| 193 | static inline void ioapic_insert_resources(void) { } | 198 | static inline void ioapic_insert_resources(void) { } |
| 194 | |||
| 195 | static inline void probe_nr_irqs_gsi(void) { } | 199 | static inline void probe_nr_irqs_gsi(void) { } |
| 200 | |||
| 196 | #endif | 201 | #endif |
| 197 | 202 | ||
| 198 | #endif /* _ASM_X86_IO_APIC_H */ | 203 | #endif /* _ASM_X86_IO_APIC_H */ |
diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h index f38481bcd45..ddda6cbed6f 100644 --- a/arch/x86/include/asm/irq.h +++ b/arch/x86/include/asm/irq.h | |||
| @@ -37,7 +37,6 @@ extern void fixup_irqs(void); | |||
| 37 | #endif | 37 | #endif |
| 38 | 38 | ||
| 39 | extern void (*generic_interrupt_extension)(void); | 39 | extern void (*generic_interrupt_extension)(void); |
| 40 | extern void init_IRQ(void); | ||
| 41 | extern void native_init_IRQ(void); | 40 | extern void native_init_IRQ(void); |
| 42 | extern bool handle_irq(unsigned irq, struct pt_regs *regs); | 41 | extern bool handle_irq(unsigned irq, struct pt_regs *regs); |
| 43 | 42 | ||
| @@ -47,4 +46,6 @@ extern unsigned int do_IRQ(struct pt_regs *regs); | |||
| 47 | extern DECLARE_BITMAP(used_vectors, NR_VECTORS); | 46 | extern DECLARE_BITMAP(used_vectors, NR_VECTORS); |
| 48 | extern int vector_used_by_percpu_irq(unsigned int vector); | 47 | extern int vector_used_by_percpu_irq(unsigned int vector); |
| 49 | 48 | ||
| 49 | extern void init_ISA_irqs(void); | ||
| 50 | |||
| 50 | #endif /* _ASM_X86_IRQ_H */ | 51 | #endif /* _ASM_X86_IRQ_H */ |
diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h index e2a1bb6d71e..79c94500c0b 100644 --- a/arch/x86/include/asm/mpspec.h +++ b/arch/x86/include/asm/mpspec.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #include <linux/init.h> | 4 | #include <linux/init.h> |
| 5 | 5 | ||
| 6 | #include <asm/mpspec_def.h> | 6 | #include <asm/mpspec_def.h> |
| 7 | #include <asm/x86_init.h> | ||
| 7 | 8 | ||
| 8 | extern int apic_version[MAX_APICS]; | 9 | extern int apic_version[MAX_APICS]; |
| 9 | extern int pic_mode; | 10 | extern int pic_mode; |
| @@ -41,9 +42,6 @@ extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; | |||
| 41 | 42 | ||
| 42 | #endif /* CONFIG_X86_64 */ | 43 | #endif /* CONFIG_X86_64 */ |
| 43 | 44 | ||
| 44 | extern void early_find_smp_config(void); | ||
| 45 | extern void early_get_smp_config(void); | ||
| 46 | |||
| 47 | #if defined(CONFIG_MCA) || defined(CONFIG_EISA) | 45 | #if defined(CONFIG_MCA) || defined(CONFIG_EISA) |
| 48 | extern int mp_bus_id_to_type[MAX_MP_BUSSES]; | 46 | extern int mp_bus_id_to_type[MAX_MP_BUSSES]; |
| 49 | #endif | 47 | #endif |
| @@ -52,20 +50,55 @@ extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES); | |||
| 52 | 50 | ||
| 53 | extern unsigned int boot_cpu_physical_apicid; | 51 | extern unsigned int boot_cpu_physical_apicid; |
| 54 | extern unsigned int max_physical_apicid; | 52 | extern unsigned int max_physical_apicid; |
| 55 | extern int smp_found_config; | ||
| 56 | extern int mpc_default_type; | 53 | extern int mpc_default_type; |
| 57 | extern unsigned long mp_lapic_addr; | 54 | extern unsigned long mp_lapic_addr; |
| 58 | 55 | ||
| 59 | extern void get_smp_config(void); | 56 | #ifdef CONFIG_X86_LOCAL_APIC |
| 57 | extern int smp_found_config; | ||
| 58 | #else | ||
| 59 | # define smp_found_config 0 | ||
| 60 | #endif | ||
| 61 | |||
| 62 | static inline void get_smp_config(void) | ||
| 63 | { | ||
| 64 | x86_init.mpparse.get_smp_config(0); | ||
| 65 | } | ||
| 66 | |||
| 67 | static inline void early_get_smp_config(void) | ||
| 68 | { | ||
| 69 | x86_init.mpparse.get_smp_config(1); | ||
| 70 | } | ||
| 71 | |||
| 72 | static inline void find_smp_config(void) | ||
| 73 | { | ||
| 74 | x86_init.mpparse.find_smp_config(1); | ||
| 75 | } | ||
| 76 | |||
| 77 | static inline void early_find_smp_config(void) | ||
| 78 | { | ||
| 79 | x86_init.mpparse.find_smp_config(0); | ||
| 80 | } | ||
| 60 | 81 | ||
| 61 | #ifdef CONFIG_X86_MPPARSE | 82 | #ifdef CONFIG_X86_MPPARSE |
| 62 | extern void find_smp_config(void); | ||
| 63 | extern void early_reserve_e820_mpc_new(void); | 83 | extern void early_reserve_e820_mpc_new(void); |
| 64 | extern int enable_update_mptable; | 84 | extern int enable_update_mptable; |
| 85 | extern int default_mpc_apic_id(struct mpc_cpu *m); | ||
| 86 | extern void default_smp_read_mpc_oem(struct mpc_table *mpc); | ||
| 87 | # ifdef CONFIG_X86_IO_APIC | ||
| 88 | extern void default_mpc_oem_bus_info(struct mpc_bus *m, char *str); | ||
| 89 | # else | ||
| 90 | # define default_mpc_oem_bus_info NULL | ||
| 91 | # endif | ||
| 92 | extern void default_find_smp_config(unsigned int reserve); | ||
| 93 | extern void default_get_smp_config(unsigned int early); | ||
| 65 | #else | 94 | #else |
| 66 | static inline void find_smp_config(void) { } | ||
| 67 | static inline void early_reserve_e820_mpc_new(void) { } | 95 | static inline void early_reserve_e820_mpc_new(void) { } |
| 68 | #define enable_update_mptable 0 | 96 | #define enable_update_mptable 0 |
| 97 | #define default_mpc_apic_id NULL | ||
| 98 | #define default_smp_read_mpc_oem NULL | ||
| 99 | #define default_mpc_oem_bus_info NULL | ||
| 100 | #define default_find_smp_config x86_init_uint_noop | ||
| 101 | #define default_get_smp_config x86_init_uint_noop | ||
| 69 | #endif | 102 | #endif |
| 70 | 103 | ||
| 71 | void __cpuinit generic_processor_info(int apicid, int version); | 104 | void __cpuinit generic_processor_info(int apicid, int version); |
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 40d6586af25..8aebcc41041 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h | |||
| @@ -24,22 +24,6 @@ static inline void load_sp0(struct tss_struct *tss, | |||
| 24 | PVOP_VCALL2(pv_cpu_ops.load_sp0, tss, thread); | 24 | PVOP_VCALL2(pv_cpu_ops.load_sp0, tss, thread); |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | #define ARCH_SETUP pv_init_ops.arch_setup(); | ||
| 28 | static inline unsigned long get_wallclock(void) | ||
| 29 | { | ||
| 30 | return PVOP_CALL0(unsigned long, pv_time_ops.get_wallclock); | ||
| 31 | } | ||
| 32 | |||
| 33 | static inline int set_wallclock(unsigned long nowtime) | ||
| 34 | { | ||
| 35 | return PVOP_CALL1(int, pv_time_ops.set_wallclock, nowtime); | ||
| 36 | } | ||
| 37 | |||
| 38 | static inline void (*choose_time_init(void))(void) | ||
| 39 | { | ||
| 40 | return pv_time_ops.time_init; | ||
| 41 | } | ||
| 42 | |||
| 43 | /* The paravirtualized CPUID instruction. */ | 27 | /* The paravirtualized CPUID instruction. */ |
| 44 | static inline void __cpuid(unsigned int *eax, unsigned int *ebx, | 28 | static inline void __cpuid(unsigned int *eax, unsigned int *ebx, |
| 45 | unsigned int *ecx, unsigned int *edx) | 29 | unsigned int *ecx, unsigned int *edx) |
| @@ -245,7 +229,6 @@ static inline unsigned long long paravirt_sched_clock(void) | |||
| 245 | { | 229 | { |
| 246 | return PVOP_CALL0(unsigned long long, pv_time_ops.sched_clock); | 230 | return PVOP_CALL0(unsigned long long, pv_time_ops.sched_clock); |
| 247 | } | 231 | } |
| 248 | #define calibrate_tsc() (pv_time_ops.get_tsc_khz()) | ||
| 249 | 232 | ||
| 250 | static inline unsigned long long paravirt_read_pmc(int counter) | 233 | static inline unsigned long long paravirt_read_pmc(int counter) |
| 251 | { | 234 | { |
| @@ -363,34 +346,6 @@ static inline void slow_down_io(void) | |||
| 363 | #endif | 346 | #endif |
| 364 | } | 347 | } |
| 365 | 348 | ||
| 366 | #ifdef CONFIG_X86_LOCAL_APIC | ||
| 367 | static inline void setup_boot_clock(void) | ||
| 368 | { | ||
| 369 | PVOP_VCALL0(pv_apic_ops.setup_boot_clock); | ||
| 370 | } | ||
| 371 | |||
| 372 | static inline void setup_secondary_clock(void) | ||
| 373 | { | ||
| 374 | PVOP_VCALL0(pv_apic_ops.setup_secondary_clock); | ||
| 375 | } | ||
| 376 | #endif | ||
| 377 | |||
| 378 | static inline void paravirt_post_allocator_init(void) | ||
| 379 | { | ||
| 380 | if (pv_init_ops.post_allocator_init) | ||
| 381 | (*pv_init_ops.post_allocator_init)(); | ||
| 382 | } | ||
| 383 | |||
| 384 | static inline void paravirt_pagetable_setup_start(pgd_t *base) | ||
| 385 | { | ||
| 386 | (*pv_mmu_ops.pagetable_setup_start)(base); | ||
| 387 | } | ||
| 388 | |||
| 389 | static inline void paravirt_pagetable_setup_done(pgd_t *base) | ||
| 390 | { | ||
| 391 | (*pv_mmu_ops.pagetable_setup_done)(base); | ||
| 392 | } | ||
| 393 | |||
| 394 | #ifdef CONFIG_SMP | 349 | #ifdef CONFIG_SMP |
| 395 | static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, | 350 | static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, |
| 396 | unsigned long start_esp) | 351 | unsigned long start_esp) |
| @@ -948,6 +903,8 @@ static inline unsigned long __raw_local_irq_save(void) | |||
| 948 | #undef PVOP_VCALL4 | 903 | #undef PVOP_VCALL4 |
| 949 | #undef PVOP_CALL4 | 904 | #undef PVOP_CALL4 |
| 950 | 905 | ||
| 906 | extern void default_banner(void); | ||
| 907 | |||
| 951 | #else /* __ASSEMBLY__ */ | 908 | #else /* __ASSEMBLY__ */ |
| 952 | 909 | ||
| 953 | #define _PVSITE(ptype, clobbers, ops, word, algn) \ | 910 | #define _PVSITE(ptype, clobbers, ops, word, algn) \ |
| @@ -1088,5 +1045,7 @@ static inline unsigned long __raw_local_irq_save(void) | |||
| 1088 | #endif /* CONFIG_X86_32 */ | 1045 | #endif /* CONFIG_X86_32 */ |
| 1089 | 1046 | ||
| 1090 | #endif /* __ASSEMBLY__ */ | 1047 | #endif /* __ASSEMBLY__ */ |
| 1091 | #endif /* CONFIG_PARAVIRT */ | 1048 | #else /* CONFIG_PARAVIRT */ |
| 1049 | # define default_banner x86_init_noop | ||
| 1050 | #endif /* !CONFIG_PARAVIRT */ | ||
| 1092 | #endif /* _ASM_X86_PARAVIRT_H */ | 1051 | #endif /* _ASM_X86_PARAVIRT_H */ |
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index 25402d0006e..dd0f5b32489 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h | |||
| @@ -78,14 +78,6 @@ struct pv_init_ops { | |||
| 78 | */ | 78 | */ |
| 79 | unsigned (*patch)(u8 type, u16 clobber, void *insnbuf, | 79 | unsigned (*patch)(u8 type, u16 clobber, void *insnbuf, |
| 80 | unsigned long addr, unsigned len); | 80 | unsigned long addr, unsigned len); |
| 81 | |||
| 82 | /* Basic arch-specific setup */ | ||
| 83 | void (*arch_setup)(void); | ||
| 84 | char *(*memory_setup)(void); | ||
| 85 | void (*post_allocator_init)(void); | ||
| 86 | |||
| 87 | /* Print a banner to identify the environment */ | ||
| 88 | void (*banner)(void); | ||
| 89 | }; | 81 | }; |
| 90 | 82 | ||
| 91 | 83 | ||
| @@ -96,12 +88,6 @@ struct pv_lazy_ops { | |||
| 96 | }; | 88 | }; |
| 97 | 89 | ||
| 98 | struct pv_time_ops { | 90 | struct pv_time_ops { |
| 99 | void (*time_init)(void); | ||
| 100 | |||
| 101 | /* Set and set time of day */ | ||
| 102 | unsigned long (*get_wallclock)(void); | ||
| 103 | int (*set_wallclock)(unsigned long); | ||
| 104 | |||
| 105 | unsigned long long (*sched_clock)(void); | 91 | unsigned long long (*sched_clock)(void); |
| 106 | unsigned long (*get_tsc_khz)(void); | 92 | unsigned long (*get_tsc_khz)(void); |
| 107 | }; | 93 | }; |
| @@ -203,8 +189,6 @@ struct pv_cpu_ops { | |||
| 203 | }; | 189 | }; |
| 204 | 190 | ||
| 205 | struct pv_irq_ops { | 191 | struct pv_irq_ops { |
| 206 | void (*init_IRQ)(void); | ||
| 207 | |||
| 208 | /* | 192 | /* |
| 209 | * Get/set interrupt state. save_fl and restore_fl are only | 193 | * Get/set interrupt state. save_fl and restore_fl are only |
| 210 | * expected to use X86_EFLAGS_IF; all other bits | 194 | * expected to use X86_EFLAGS_IF; all other bits |
| @@ -229,9 +213,6 @@ struct pv_irq_ops { | |||
| 229 | 213 | ||
| 230 | struct pv_apic_ops { | 214 | struct pv_apic_ops { |
| 231 | #ifdef CONFIG_X86_LOCAL_APIC | 215 | #ifdef CONFIG_X86_LOCAL_APIC |
| 232 | void (*setup_boot_clock)(void); | ||
| 233 | void (*setup_secondary_clock)(void); | ||
| 234 | |||
| 235 | void (*startup_ipi_hook)(int phys_apicid, | 216 | void (*startup_ipi_hook)(int phys_apicid, |
| 236 | unsigned long start_eip, | 217 | unsigned long start_eip, |
| 237 | unsigned long start_esp); | 218 | unsigned long start_esp); |
| @@ -239,15 +220,6 @@ struct pv_apic_ops { | |||
| 239 | }; | 220 | }; |
| 240 | 221 | ||
| 241 | struct pv_mmu_ops { | 222 | struct pv_mmu_ops { |
| 242 | /* | ||
| 243 | * Called before/after init_mm pagetable setup. setup_start | ||
| 244 | * may reset %cr3, and may pre-install parts of the pagetable; | ||
| 245 | * pagetable setup is expected to preserve any existing | ||
| 246 | * mapping. | ||
| 247 | */ | ||
| 248 | void (*pagetable_setup_start)(pgd_t *pgd_base); | ||
| 249 | void (*pagetable_setup_done)(pgd_t *pgd_base); | ||
| 250 | |||
| 251 | unsigned long (*read_cr2)(void); | 223 | unsigned long (*read_cr2)(void); |
| 252 | void (*write_cr2)(unsigned long); | 224 | void (*write_cr2)(unsigned long); |
| 253 | 225 | ||
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 4c5b51fdc78..af6fd360ab3 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
| @@ -56,16 +56,6 @@ extern struct list_head pgd_list; | |||
| 56 | #define pte_update(mm, addr, ptep) do { } while (0) | 56 | #define pte_update(mm, addr, ptep) do { } while (0) |
| 57 | #define pte_update_defer(mm, addr, ptep) do { } while (0) | 57 | #define pte_update_defer(mm, addr, ptep) do { } while (0) |
| 58 | 58 | ||
| 59 | static inline void __init paravirt_pagetable_setup_start(pgd_t *base) | ||
| 60 | { | ||
| 61 | native_pagetable_setup_start(base); | ||
| 62 | } | ||
| 63 | |||
| 64 | static inline void __init paravirt_pagetable_setup_done(pgd_t *base) | ||
| 65 | { | ||
| 66 | native_pagetable_setup_done(base); | ||
| 67 | } | ||
| 68 | |||
| 69 | #define pgd_val(x) native_pgd_val(x) | 59 | #define pgd_val(x) native_pgd_val(x) |
| 70 | #define __pgd(x) native_make_pgd(x) | 60 | #define __pgd(x) native_make_pgd(x) |
| 71 | 61 | ||
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h index 54cb697f490..7b467bf3c68 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h | |||
| @@ -299,8 +299,8 @@ void set_pte_vaddr(unsigned long vaddr, pte_t pte); | |||
| 299 | extern void native_pagetable_setup_start(pgd_t *base); | 299 | extern void native_pagetable_setup_start(pgd_t *base); |
| 300 | extern void native_pagetable_setup_done(pgd_t *base); | 300 | extern void native_pagetable_setup_done(pgd_t *base); |
| 301 | #else | 301 | #else |
| 302 | static inline void native_pagetable_setup_start(pgd_t *base) {} | 302 | #define native_pagetable_setup_start x86_init_pgd_noop |
| 303 | static inline void native_pagetable_setup_done(pgd_t *base) {} | 303 | #define native_pagetable_setup_done x86_init_pgd_noop |
| 304 | #endif | 304 | #endif |
| 305 | 305 | ||
| 306 | struct seq_file; | 306 | struct seq_file; |
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h index 4093d1ed6db..18e496c98ff 100644 --- a/arch/x86/include/asm/setup.h +++ b/arch/x86/include/asm/setup.h | |||
| @@ -5,43 +5,6 @@ | |||
| 5 | 5 | ||
| 6 | #define COMMAND_LINE_SIZE 2048 | 6 | #define COMMAND_LINE_SIZE 2048 |
| 7 | 7 | ||
| 8 | #ifndef __ASSEMBLY__ | ||
| 9 | |||
| 10 | /* | ||
| 11 | * Any setup quirks to be performed? | ||
| 12 | */ | ||
| 13 | struct mpc_cpu; | ||
| 14 | struct mpc_bus; | ||
| 15 | struct mpc_oemtable; | ||
| 16 | |||
| 17 | struct x86_quirks { | ||
| 18 | int (*arch_pre_time_init)(void); | ||
| 19 | int (*arch_time_init)(void); | ||
| 20 | int (*arch_pre_intr_init)(void); | ||
| 21 | int (*arch_intr_init)(void); | ||
| 22 | int (*arch_trap_init)(void); | ||
| 23 | char * (*arch_memory_setup)(void); | ||
| 24 | int (*mach_get_smp_config)(unsigned int early); | ||
| 25 | int (*mach_find_smp_config)(unsigned int reserve); | ||
| 26 | |||
| 27 | int *mpc_record; | ||
| 28 | int (*mpc_apic_id)(struct mpc_cpu *m); | ||
| 29 | void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name); | ||
| 30 | void (*mpc_oem_pci_bus)(struct mpc_bus *m); | ||
| 31 | void (*smp_read_mpc_oem)(struct mpc_oemtable *oemtable, | ||
| 32 | unsigned short oemsize); | ||
| 33 | int (*setup_ioapic_ids)(void); | ||
| 34 | }; | ||
| 35 | |||
| 36 | extern void x86_quirk_intr_init(void); | ||
| 37 | |||
| 38 | extern void x86_quirk_trap_init(void); | ||
| 39 | |||
| 40 | extern void x86_quirk_pre_time_init(void); | ||
| 41 | extern void x86_quirk_time_init(void); | ||
| 42 | |||
| 43 | #endif /* __ASSEMBLY__ */ | ||
| 44 | |||
| 45 | #ifdef __i386__ | 8 | #ifdef __i386__ |
| 46 | 9 | ||
| 47 | #include <linux/pfn.h> | 10 | #include <linux/pfn.h> |
| @@ -61,6 +24,7 @@ extern void x86_quirk_time_init(void); | |||
| 61 | 24 | ||
| 62 | #ifndef __ASSEMBLY__ | 25 | #ifndef __ASSEMBLY__ |
| 63 | #include <asm/bootparam.h> | 26 | #include <asm/bootparam.h> |
| 27 | #include <asm/x86_init.h> | ||
| 64 | 28 | ||
| 65 | /* Interrupt control for vSMPowered x86_64 systems */ | 29 | /* Interrupt control for vSMPowered x86_64 systems */ |
| 66 | #ifdef CONFIG_X86_64 | 30 | #ifdef CONFIG_X86_64 |
| @@ -79,11 +43,16 @@ static inline void visws_early_detect(void) { } | |||
| 79 | static inline int is_visws_box(void) { return 0; } | 43 | static inline int is_visws_box(void) { return 0; } |
| 80 | #endif | 44 | #endif |
| 81 | 45 | ||
| 82 | extern struct x86_quirks *x86_quirks; | ||
| 83 | extern unsigned long saved_video_mode; | 46 | extern unsigned long saved_video_mode; |
| 84 | 47 | ||
| 85 | #ifndef CONFIG_PARAVIRT | 48 | extern void reserve_standard_io_resources(void); |
| 86 | #define paravirt_post_allocator_init() do {} while (0) | 49 | extern void i386_reserve_resources(void); |
| 50 | extern void setup_default_timer_irq(void); | ||
| 51 | |||
| 52 | #ifdef CONFIG_X86_MRST | ||
| 53 | extern void x86_mrst_early_setup(void); | ||
| 54 | #else | ||
| 55 | static inline void x86_mrst_early_setup(void) { } | ||
| 87 | #endif | 56 | #endif |
| 88 | 57 | ||
| 89 | #ifndef _SETUP | 58 | #ifndef _SETUP |
diff --git a/arch/x86/include/asm/time.h b/arch/x86/include/asm/time.h index 50c733aac42..7bdec4e9b73 100644 --- a/arch/x86/include/asm/time.h +++ b/arch/x86/include/asm/time.h | |||
| @@ -4,60 +4,7 @@ | |||
| 4 | extern void hpet_time_init(void); | 4 | extern void hpet_time_init(void); |
| 5 | 5 | ||
| 6 | #include <asm/mc146818rtc.h> | 6 | #include <asm/mc146818rtc.h> |
| 7 | #ifdef CONFIG_X86_32 | ||
| 8 | #include <linux/efi.h> | ||
| 9 | |||
| 10 | static inline unsigned long native_get_wallclock(void) | ||
| 11 | { | ||
| 12 | unsigned long retval; | ||
| 13 | |||
| 14 | if (efi_enabled) | ||
| 15 | retval = efi_get_time(); | ||
| 16 | else | ||
| 17 | retval = mach_get_cmos_time(); | ||
| 18 | |||
| 19 | return retval; | ||
| 20 | } | ||
| 21 | |||
| 22 | static inline int native_set_wallclock(unsigned long nowtime) | ||
| 23 | { | ||
| 24 | int retval; | ||
| 25 | |||
| 26 | if (efi_enabled) | ||
| 27 | retval = efi_set_rtc_mmss(nowtime); | ||
| 28 | else | ||
| 29 | retval = mach_set_rtc_mmss(nowtime); | ||
| 30 | |||
| 31 | return retval; | ||
| 32 | } | ||
| 33 | |||
| 34 | #else | ||
| 35 | extern void native_time_init_hook(void); | ||
| 36 | |||
| 37 | static inline unsigned long native_get_wallclock(void) | ||
| 38 | { | ||
| 39 | return mach_get_cmos_time(); | ||
| 40 | } | ||
| 41 | |||
| 42 | static inline int native_set_wallclock(unsigned long nowtime) | ||
| 43 | { | ||
| 44 | return mach_set_rtc_mmss(nowtime); | ||
| 45 | } | ||
| 46 | |||
| 47 | #endif | ||
| 48 | 7 | ||
| 49 | extern void time_init(void); | 8 | extern void time_init(void); |
| 50 | 9 | ||
| 51 | #ifdef CONFIG_PARAVIRT | ||
| 52 | #include <asm/paravirt.h> | ||
| 53 | #else /* !CONFIG_PARAVIRT */ | ||
| 54 | |||
| 55 | #define get_wallclock() native_get_wallclock() | ||
| 56 | #define set_wallclock(x) native_set_wallclock(x) | ||
| 57 | #define choose_time_init() hpet_time_init | ||
| 58 | |||
| 59 | #endif /* CONFIG_PARAVIRT */ | ||
| 60 | |||
| 61 | extern unsigned long __init calibrate_cpu(void); | ||
| 62 | |||
| 63 | #endif /* _ASM_X86_TIME_H */ | 10 | #endif /* _ASM_X86_TIME_H */ |
diff --git a/arch/x86/include/asm/timer.h b/arch/x86/include/asm/timer.h index 20ca9c4d468..5469630b27f 100644 --- a/arch/x86/include/asm/timer.h +++ b/arch/x86/include/asm/timer.h | |||
| @@ -8,20 +8,16 @@ | |||
| 8 | #define TICK_SIZE (tick_nsec / 1000) | 8 | #define TICK_SIZE (tick_nsec / 1000) |
| 9 | 9 | ||
| 10 | unsigned long long native_sched_clock(void); | 10 | unsigned long long native_sched_clock(void); |
| 11 | unsigned long native_calibrate_tsc(void); | 11 | extern int recalibrate_cpu_khz(void); |
| 12 | 12 | ||
| 13 | #ifdef CONFIG_X86_32 | 13 | #if defined(CONFIG_X86_32) && defined(CONFIG_X86_IO_APIC) |
| 14 | extern int timer_ack; | 14 | extern int timer_ack; |
| 15 | extern irqreturn_t timer_interrupt(int irq, void *dev_id); | 15 | #else |
| 16 | #endif /* CONFIG_X86_32 */ | 16 | # define timer_ack (0) |
| 17 | extern int recalibrate_cpu_khz(void); | 17 | #endif |
| 18 | 18 | ||
| 19 | extern int no_timer_check; | 19 | extern int no_timer_check; |
| 20 | 20 | ||
| 21 | #ifndef CONFIG_PARAVIRT | ||
| 22 | #define calibrate_tsc() native_calibrate_tsc() | ||
| 23 | #endif | ||
| 24 | |||
| 25 | /* Accelerators for sched_clock() | 21 | /* Accelerators for sched_clock() |
| 26 | * convert from cycles(64bits) => nanoseconds (64bits) | 22 | * convert from cycles(64bits) => nanoseconds (64bits) |
| 27 | * basic equation: | 23 | * basic equation: |
diff --git a/arch/x86/include/asm/tsc.h b/arch/x86/include/asm/tsc.h index 38ae163cc91..c0427295e8f 100644 --- a/arch/x86/include/asm/tsc.h +++ b/arch/x86/include/asm/tsc.h | |||
| @@ -48,7 +48,8 @@ static __always_inline cycles_t vget_cycles(void) | |||
| 48 | extern void tsc_init(void); | 48 | extern void tsc_init(void); |
| 49 | extern void mark_tsc_unstable(char *reason); | 49 | extern void mark_tsc_unstable(char *reason); |
| 50 | extern int unsynchronized_tsc(void); | 50 | extern int unsynchronized_tsc(void); |
| 51 | int check_tsc_unstable(void); | 51 | extern int check_tsc_unstable(void); |
| 52 | extern unsigned long native_calibrate_tsc(void); | ||
| 52 | 53 | ||
| 53 | /* | 54 | /* |
| 54 | * Boot-time check whether the TSCs are synchronized across | 55 | * Boot-time check whether the TSCs are synchronized across |
diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h index c11b7e100d8..e49ed6d2fd4 100644 --- a/arch/x86/include/asm/vmware.h +++ b/arch/x86/include/asm/vmware.h | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #ifndef ASM_X86__VMWARE_H | 20 | #ifndef ASM_X86__VMWARE_H |
| 21 | #define ASM_X86__VMWARE_H | 21 | #define ASM_X86__VMWARE_H |
| 22 | 22 | ||
| 23 | extern unsigned long vmware_get_tsc_khz(void); | 23 | extern void vmware_platform_setup(void); |
| 24 | extern int vmware_platform(void); | 24 | extern int vmware_platform(void); |
| 25 | extern void vmware_set_feature_bits(struct cpuinfo_x86 *c); | 25 | extern void vmware_set_feature_bits(struct cpuinfo_x86 *c); |
| 26 | 26 | ||
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h new file mode 100644 index 00000000000..2c756fd4ab0 --- /dev/null +++ b/arch/x86/include/asm/x86_init.h | |||
| @@ -0,0 +1,133 @@ | |||
| 1 | #ifndef _ASM_X86_PLATFORM_H | ||
| 2 | #define _ASM_X86_PLATFORM_H | ||
| 3 | |||
| 4 | #include <asm/pgtable_types.h> | ||
| 5 | #include <asm/bootparam.h> | ||
| 6 | |||
| 7 | struct mpc_bus; | ||
| 8 | struct mpc_cpu; | ||
| 9 | struct mpc_table; | ||
| 10 | |||
| 11 | /** | ||
| 12 | * struct x86_init_mpparse - platform specific mpparse ops | ||
| 13 | * @mpc_record: platform specific mpc record accounting | ||
| 14 | * @setup_ioapic_ids: platform specific ioapic id override | ||
| 15 | * @mpc_apic_id: platform specific mpc apic id assignment | ||
| 16 | * @smp_read_mpc_oem: platform specific oem mpc table setup | ||
| 17 | * @mpc_oem_pci_bus: platform specific pci bus setup (default NULL) | ||
| 18 | * @mpc_oem_bus_info: platform specific mpc bus info | ||
| 19 | * @find_smp_config: find the smp configuration | ||
| 20 | * @get_smp_config: get the smp configuration | ||
| 21 | */ | ||
| 22 | struct x86_init_mpparse { | ||
| 23 | void (*mpc_record)(unsigned int mode); | ||
| 24 | void (*setup_ioapic_ids)(void); | ||
| 25 | int (*mpc_apic_id)(struct mpc_cpu *m); | ||
| 26 | void (*smp_read_mpc_oem)(struct mpc_table *mpc); | ||
| 27 | void (*mpc_oem_pci_bus)(struct mpc_bus *m); | ||
| 28 | void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name); | ||
| 29 | void (*find_smp_config)(unsigned int reserve); | ||
| 30 | void (*get_smp_config)(unsigned int early); | ||
| 31 | }; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * struct x86_init_resources - platform specific resource related ops | ||
| 35 | * @probe_roms: probe BIOS roms | ||
| 36 | * @reserve_resources: reserve the standard resources for the | ||
| 37 | * platform | ||
| 38 | * @memory_setup: platform specific memory setup | ||
| 39 | * | ||
| 40 | */ | ||
| 41 | struct x86_init_resources { | ||
| 42 | void (*probe_roms)(void); | ||
| 43 | void (*reserve_resources)(void); | ||
| 44 | char *(*memory_setup)(void); | ||
| 45 | }; | ||
| 46 | |||
| 47 | /** | ||
| 48 | * struct x86_init_irqs - platform specific interrupt setup | ||
| 49 | * @pre_vector_init: init code to run before interrupt vectors | ||
| 50 | * are set up. | ||
| 51 | * @intr_init: interrupt init code | ||
| 52 | * @trap_init: platform specific trap setup | ||
| 53 | */ | ||
| 54 | struct x86_init_irqs { | ||
| 55 | void (*pre_vector_init)(void); | ||
| 56 | void (*intr_init)(void); | ||
| 57 | void (*trap_init)(void); | ||
| 58 | }; | ||
| 59 | |||
| 60 | /** | ||
| 61 | * struct x86_init_oem - oem platform specific customizing functions | ||
| 62 | * @arch_setup: platform specific architecure setup | ||
| 63 | * @banner: print a platform specific banner | ||
| 64 | */ | ||
| 65 | struct x86_init_oem { | ||
| 66 | void (*arch_setup)(void); | ||
| 67 | void (*banner)(void); | ||
| 68 | }; | ||
| 69 | |||
| 70 | /** | ||
| 71 | * struct x86_init_paging - platform specific paging functions | ||
| 72 | * @pagetable_setup_start: platform specific pre paging_init() call | ||
| 73 | * @pagetable_setup_done: platform specific post paging_init() call | ||
| 74 | */ | ||
| 75 | struct x86_init_paging { | ||
| 76 | void (*pagetable_setup_start)(pgd_t *base); | ||
| 77 | void (*pagetable_setup_done)(pgd_t *base); | ||
| 78 | }; | ||
| 79 | |||
| 80 | /** | ||
| 81 | * struct x86_init_timers - platform specific timer setup | ||
| 82 | * @setup_perpcu_clockev: set up the per cpu clock event device for the | ||
| 83 | * boot cpu | ||
| 84 | * @tsc_pre_init: platform function called before TSC init | ||
| 85 | * @timer_init: initialize the platform timer (default PIT/HPET) | ||
| 86 | */ | ||
| 87 | struct x86_init_timers { | ||
| 88 | void (*setup_percpu_clockev)(void); | ||
| 89 | void (*tsc_pre_init)(void); | ||
| 90 | void (*timer_init)(void); | ||
| 91 | }; | ||
| 92 | |||
| 93 | /** | ||
| 94 | * struct x86_init_ops - functions for platform specific setup | ||
| 95 | * | ||
| 96 | */ | ||
| 97 | struct x86_init_ops { | ||
| 98 | struct x86_init_resources resources; | ||
| 99 | struct x86_init_mpparse mpparse; | ||
| 100 | struct x86_init_irqs irqs; | ||
| 101 | struct x86_init_oem oem; | ||
| 102 | struct x86_init_paging paging; | ||
| 103 | struct x86_init_timers timers; | ||
| 104 | }; | ||
| 105 | |||
| 106 | /** | ||
| 107 | * struct x86_cpuinit_ops - platform specific cpu hotplug setups | ||
| 108 | * @setup_percpu_clockev: set up the per cpu clock event device | ||
| 109 | */ | ||
| 110 | struct x86_cpuinit_ops { | ||
| 111 | void (*setup_percpu_clockev)(void); | ||
| 112 | }; | ||
| 113 | |||
| 114 | /** | ||
| 115 | * struct x86_platform_ops - platform specific runtime functions | ||
| 116 | * @calibrate_tsc: calibrate TSC | ||
| 117 | * @get_wallclock: get time from HW clock like RTC etc. | ||
| 118 | * @set_wallclock: set time back to HW clock | ||
| 119 | */ | ||
| 120 | struct x86_platform_ops { | ||
| 121 | unsigned long (*calibrate_tsc)(void); | ||
| 122 | unsigned long (*get_wallclock)(void); | ||
| 123 | int (*set_wallclock)(unsigned long nowtime); | ||
| 124 | }; | ||
| 125 | |||
| 126 | extern struct x86_init_ops x86_init; | ||
| 127 | extern struct x86_cpuinit_ops x86_cpuinit; | ||
| 128 | extern struct x86_platform_ops x86_platform; | ||
| 129 | |||
| 130 | extern void x86_init_noop(void); | ||
| 131 | extern void x86_init_uint_noop(unsigned int unused); | ||
| 132 | |||
| 133 | #endif | ||
