diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-08-19 06:35:53 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-08-31 03:35:46 -0400 |
commit | 736decac643e8982655e22ac7f0e5e61c5b7f9bd (patch) | |
tree | 779e2a12713a27de723b0f600a13c746aa4615ad /arch/x86/include/asm | |
parent | f1d7062a235d057e5d85ed2860bef609e0160cde (diff) |
x86: Move percpu clockevents setup to x86_init_ops
paravirt overrides the setup of the default apic timers as per cpu
timers. Moorestown needs to override that as well.
Move it to x86_init_ops setup and create a separate x86_cpuinit struct
which holds the function for the secondary evtl. hotplugabble CPUs.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/apic.h | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/paravirt.h | 12 | ||||
-rw-r--r-- | arch/x86/include/asm/paravirt_types.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/x86_init.h | 19 |
4 files changed, 21 insertions, 18 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index bb7d47925847..6f15b29005a1 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 |
@@ -245,6 +242,8 @@ static inline void lapic_shutdown(void) { } | |||
245 | static inline void init_apic_mappings(void) { } | 242 | static inline void init_apic_mappings(void) { } |
246 | static inline void disable_local_APIC(void) { } | 243 | static inline void disable_local_APIC(void) { } |
247 | static inline void apic_disable(void) { } | 244 | static inline void apic_disable(void) { } |
245 | # define setup_boot_APIC_clock x86_init_noop | ||
246 | # define setup_secondary_APIC_clock x86_init_noop | ||
248 | #endif /* !CONFIG_X86_LOCAL_APIC */ | 247 | #endif /* !CONFIG_X86_LOCAL_APIC */ |
249 | 248 | ||
250 | #ifdef CONFIG_X86_64 | 249 | #ifdef CONFIG_X86_64 |
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 7ce415e844b6..825674a968d1 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h | |||
@@ -333,18 +333,6 @@ static inline void slow_down_io(void) | |||
333 | #endif | 333 | #endif |
334 | } | 334 | } |
335 | 335 | ||
336 | #ifdef CONFIG_X86_LOCAL_APIC | ||
337 | static inline void setup_boot_clock(void) | ||
338 | { | ||
339 | PVOP_VCALL0(pv_apic_ops.setup_boot_clock); | ||
340 | } | ||
341 | |||
342 | static inline void setup_secondary_clock(void) | ||
343 | { | ||
344 | PVOP_VCALL0(pv_apic_ops.setup_secondary_clock); | ||
345 | } | ||
346 | #endif | ||
347 | |||
348 | #ifdef CONFIG_SMP | 336 | #ifdef CONFIG_SMP |
349 | static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, | 337 | static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, |
350 | unsigned long start_esp) | 338 | unsigned long start_esp) |
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index ecc74e5ad407..1da89276d142 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h | |||
@@ -218,9 +218,6 @@ struct pv_irq_ops { | |||
218 | 218 | ||
219 | struct pv_apic_ops { | 219 | struct pv_apic_ops { |
220 | #ifdef CONFIG_X86_LOCAL_APIC | 220 | #ifdef CONFIG_X86_LOCAL_APIC |
221 | void (*setup_boot_clock)(void); | ||
222 | void (*setup_secondary_clock)(void); | ||
223 | |||
224 | void (*startup_ipi_hook)(int phys_apicid, | 221 | void (*startup_ipi_hook)(int phys_apicid, |
225 | unsigned long start_eip, | 222 | unsigned long start_eip, |
226 | unsigned long start_esp); | 223 | unsigned long start_esp); |
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index b9bb4faefc48..b7d258f4c401 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h | |||
@@ -79,6 +79,15 @@ struct x86_init_paging { | |||
79 | }; | 79 | }; |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * struct x86_init_timers - platform specific timer setup | ||
83 | * @setup_perpcu_clockev: set up the per cpu clock event device for the | ||
84 | * boot cpu | ||
85 | */ | ||
86 | struct x86_init_timers { | ||
87 | void (*setup_percpu_clockev)(void); | ||
88 | }; | ||
89 | |||
90 | /** | ||
82 | * struct x86_init_ops - functions for platform specific setup | 91 | * struct x86_init_ops - functions for platform specific setup |
83 | * | 92 | * |
84 | */ | 93 | */ |
@@ -88,9 +97,19 @@ struct x86_init_ops { | |||
88 | struct x86_init_irqs irqs; | 97 | struct x86_init_irqs irqs; |
89 | struct x86_init_oem oem; | 98 | struct x86_init_oem oem; |
90 | struct x86_init_paging paging; | 99 | struct x86_init_paging paging; |
100 | struct x86_init_timers timers; | ||
101 | }; | ||
102 | |||
103 | /** | ||
104 | * struct x86_cpuinit_ops - platform specific cpu hotplug setups | ||
105 | * @setup_percpu_clockev: set up the per cpu clock event device | ||
106 | */ | ||
107 | struct x86_cpuinit_ops { | ||
108 | void (*setup_percpu_clockev)(void); | ||
91 | }; | 109 | }; |
92 | 110 | ||
93 | extern struct x86_init_ops x86_init; | 111 | extern struct x86_init_ops x86_init; |
112 | extern struct x86_cpuinit_ops x86_cpuinit; | ||
94 | 113 | ||
95 | extern void x86_init_noop(void); | 114 | extern void x86_init_noop(void); |
96 | extern void x86_init_uint_noop(unsigned int unused); | 115 | extern void x86_init_uint_noop(unsigned int unused); |