aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mach-default
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-07-19 05:07:25 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-20 03:18:17 -0400
commit3c9cb6de1e5ad37d1558fdb0d9d2bed5a7bac0d9 (patch)
treef579e0c0a09c6df7fc0fbf6e8008920eec325e2b /arch/x86/mach-default
parent5f1f2b3d9dbaee82cd532f28da459adcbf611499 (diff)
x86: introduce x86_quirks
introduce x86_quirks array of boot-time quirk methods. No change in functionality intended. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mach-default')
-rw-r--r--arch/x86/mach-default/setup.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/arch/x86/mach-default/setup.c b/arch/x86/mach-default/setup.c
index 48278fa7d3de..631dbed9fb9d 100644
--- a/arch/x86/mach-default/setup.c
+++ b/arch/x86/mach-default/setup.c
@@ -10,14 +10,6 @@
10#include <asm/e820.h> 10#include <asm/e820.h>
11#include <asm/setup.h> 11#include <asm/setup.h>
12 12
13/*
14 * Any quirks to be performed to initialize timers/irqs/etc?
15 */
16int (*arch_time_init_quirk)(void);
17int (*arch_pre_intr_init_quirk)(void);
18int (*arch_intr_init_quirk)(void);
19int (*arch_trap_init_quirk)(void);
20
21#ifdef CONFIG_HOTPLUG_CPU 13#ifdef CONFIG_HOTPLUG_CPU
22#define DEFAULT_SEND_IPI (1) 14#define DEFAULT_SEND_IPI (1)
23#else 15#else
@@ -37,8 +29,8 @@ int no_broadcast=DEFAULT_SEND_IPI;
37 **/ 29 **/
38void __init pre_intr_init_hook(void) 30void __init pre_intr_init_hook(void)
39{ 31{
40 if (arch_pre_intr_init_quirk) { 32 if (x86_quirks->arch_pre_intr_init) {
41 if (arch_pre_intr_init_quirk()) 33 if (x86_quirks->arch_pre_intr_init())
42 return; 34 return;
43 } 35 }
44 init_ISA_irqs(); 36 init_ISA_irqs();
@@ -64,8 +56,8 @@ static struct irqaction irq2 = {
64 **/ 56 **/
65void __init intr_init_hook(void) 57void __init intr_init_hook(void)
66{ 58{
67 if (arch_intr_init_quirk) { 59 if (x86_quirks->arch_intr_init) {
68 if (arch_intr_init_quirk()) 60 if (x86_quirks->arch_intr_init())
69 return; 61 return;
70 } 62 }
71#ifdef CONFIG_X86_LOCAL_APIC 63#ifdef CONFIG_X86_LOCAL_APIC
@@ -97,8 +89,8 @@ void __init pre_setup_arch_hook(void)
97 **/ 89 **/
98void __init trap_init_hook(void) 90void __init trap_init_hook(void)
99{ 91{
100 if (arch_trap_init_quirk) { 92 if (x86_quirks->arch_trap_init) {
101 if (arch_trap_init_quirk()) 93 if (x86_quirks->arch_trap_init())
102 return; 94 return;
103 } 95 }
104} 96}
@@ -119,13 +111,13 @@ static struct irqaction irq0 = {
119 **/ 111 **/
120void __init time_init_hook(void) 112void __init time_init_hook(void)
121{ 113{
122 if (arch_time_init_quirk) { 114 if (x86_quirks->arch_time_init) {
123 /* 115 /*
124 * A nonzero return code does not mean failure, it means 116 * A nonzero return code does not mean failure, it means
125 * that the architecture quirk does not want any 117 * that the architecture quirk does not want any
126 * generic (timer) setup to be performed after this: 118 * generic (timer) setup to be performed after this:
127 */ 119 */
128 if (arch_time_init_quirk()) 120 if (x86_quirks->arch_time_init())
129 return; 121 return;
130 } 122 }
131 123