aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/visws_quirks.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-08-19 09:37:03 -0400
committerThomas Gleixner <tglx@linutronix.de>2009-08-31 03:35:46 -0400
commit845b3944bbdf9e9247849bf037f27ff3a3f26d87 (patch)
treeb14b40b5ba650996c646ed760cfa4b3283e04953 /arch/x86/kernel/visws_quirks.c
parent736decac643e8982655e22ac7f0e5e61c5b7f9bd (diff)
x86: Add timer_init to x86_init_ops
The timer init code is convoluted with several quirks and the paravirt timer chooser. Figuring out which code path is actually taken is not for the faint hearted. Move the numaq TSC quirk to tsc_pre_init x86_init_ops function and replace the paravirt time chooser and the remaining x86 quirk with a simple x86_init_ops function. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/visws_quirks.c')
-rw-r--r--arch/x86/kernel/visws_quirks.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/arch/x86/kernel/visws_quirks.c b/arch/x86/kernel/visws_quirks.c
index 2719091b3351..f068553a1b17 100644
--- a/arch/x86/kernel/visws_quirks.c
+++ b/arch/x86/kernel/visws_quirks.c
@@ -30,6 +30,7 @@
30#include <asm/setup.h> 30#include <asm/setup.h>
31#include <asm/apic.h> 31#include <asm/apic.h>
32#include <asm/e820.h> 32#include <asm/e820.h>
33#include <asm/time.h>
33#include <asm/io.h> 34#include <asm/io.h>
34 35
35#include <linux/kernel_stat.h> 36#include <linux/kernel_stat.h>
@@ -53,7 +54,7 @@ int is_visws_box(void)
53 return visws_board_type >= 0; 54 return visws_board_type >= 0;
54} 55}
55 56
56static int __init visws_time_init(void) 57static void __init visws_time_init(void)
57{ 58{
58 printk(KERN_INFO "Starting Cobalt Timer system clock\n"); 59 printk(KERN_INFO "Starting Cobalt Timer system clock\n");
59 60
@@ -66,11 +67,7 @@ static int __init visws_time_init(void)
66 /* Enable (unmask) the timer interrupt */ 67 /* Enable (unmask) the timer interrupt */
67 co_cpu_write(CO_CPU_CTRL, co_cpu_read(CO_CPU_CTRL) & ~CO_CTRL_TIMEMASK); 68 co_cpu_write(CO_CPU_CTRL, co_cpu_read(CO_CPU_CTRL) & ~CO_CTRL_TIMEMASK);
68 69
69 /* 70 setup_default_timer_irq();
70 * Zero return means the generic timer setup code will set up
71 * the standard vector:
72 */
73 return 0;
74} 71}
75 72
76/* Replaces the default init_ISA_irqs in the generic setup */ 73/* Replaces the default init_ISA_irqs in the generic setup */
@@ -226,10 +223,6 @@ static void __init visws_find_smp_config(unsigned int reserve)
226 223
227static void visws_trap_init(void); 224static void visws_trap_init(void);
228 225
229static struct x86_quirks visws_x86_quirks __initdata = {
230 .arch_time_init = visws_time_init,
231};
232
233void __init visws_early_detect(void) 226void __init visws_early_detect(void)
234{ 227{
235 int raw; 228 int raw;
@@ -241,17 +234,14 @@ void __init visws_early_detect(void)
241 return; 234 return;
242 235
243 /* 236 /*
244 * Install special quirks for timer, interrupt and memory setup: 237 * Override the default platform setup functions
245 * Fall back to generic behavior for traps:
246 * Override generic MP-table parsing:
247 */ 238 */
248 x86_quirks = &visws_x86_quirks;
249
250 x86_init.resources.memory_setup = visws_memory_setup; 239 x86_init.resources.memory_setup = visws_memory_setup;
251 x86_init.mpparse.get_smp_config = visws_get_smp_config; 240 x86_init.mpparse.get_smp_config = visws_get_smp_config;
252 x86_init.mpparse.find_smp_config = visws_find_smp_config; 241 x86_init.mpparse.find_smp_config = visws_find_smp_config;
253 x86_init.irqs.pre_vector_init = visws_pre_intr_init; 242 x86_init.irqs.pre_vector_init = visws_pre_intr_init;
254 x86_init.irqs.trap_init = visws_trap_init; 243 x86_init.irqs.trap_init = visws_trap_init;
244 x86_init.timers.timer_init = visws_time_init;
255 245
256 /* 246 /*
257 * Install reboot quirks: 247 * Install reboot quirks: