libata: don't use on-stack sense buffer
[linux-2.6/verdex.git] / arch / x86 / mach-default / setup.c
blob50b5918711289a175287e0c8fb3b39f4c85a541e
1 /*
2 * Machine specific setup for generic
3 */
5 #include <linux/smp.h>
6 #include <linux/init.h>
7 #include <linux/interrupt.h>
8 #include <asm/acpi.h>
9 #include <asm/arch_hooks.h>
10 #include <asm/e820.h>
11 #include <asm/setup.h>
13 #include <mach_ipi.h>
15 #ifdef CONFIG_HOTPLUG_CPU
16 #define DEFAULT_SEND_IPI (1)
17 #else
18 #define DEFAULT_SEND_IPI (0)
19 #endif
21 int no_broadcast = DEFAULT_SEND_IPI;
23 /**
24 * pre_intr_init_hook - initialisation prior to setting up interrupt vectors
26 * Description:
27 * Perform any necessary interrupt initialisation prior to setting up
28 * the "ordinary" interrupt call gates. For legacy reasons, the ISA
29 * interrupts should be initialised here if the machine emulates a PC
30 * in any way.
31 **/
32 void __init pre_intr_init_hook(void)
34 if (x86_quirks->arch_pre_intr_init) {
35 if (x86_quirks->arch_pre_intr_init())
36 return;
38 init_ISA_irqs();
42 * IRQ2 is cascade interrupt to second interrupt controller
44 static struct irqaction irq2 = {
45 .handler = no_action,
46 .mask = CPU_MASK_NONE,
47 .name = "cascade",
50 /**
51 * intr_init_hook - post gate setup interrupt initialisation
53 * Description:
54 * Fill in any interrupts that may have been left out by the general
55 * init_IRQ() routine. interrupts having to do with the machine rather
56 * than the devices on the I/O bus (like APIC interrupts in intel MP
57 * systems) are started here.
58 **/
59 void __init intr_init_hook(void)
61 if (x86_quirks->arch_intr_init) {
62 if (x86_quirks->arch_intr_init())
63 return;
65 if (!acpi_ioapic)
66 setup_irq(2, &irq2);
70 /**
71 * pre_setup_arch_hook - hook called prior to any setup_arch() execution
73 * Description:
74 * generally used to activate any machine specific identification
75 * routines that may be needed before setup_arch() runs. On Voyager
76 * this is used to get the board revision and type.
77 **/
78 void __init pre_setup_arch_hook(void)
82 /**
83 * trap_init_hook - initialise system specific traps
85 * Description:
86 * Called as the final act of trap_init(). Used in VISWS to initialise
87 * the various board specific APIC traps.
88 **/
89 void __init trap_init_hook(void)
91 if (x86_quirks->arch_trap_init) {
92 if (x86_quirks->arch_trap_init())
93 return;
97 static struct irqaction irq0 = {
98 .handler = timer_interrupt,
99 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER,
100 .mask = CPU_MASK_NONE,
101 .name = "timer"
105 * pre_time_init_hook - do any specific initialisations before.
108 void __init pre_time_init_hook(void)
110 if (x86_quirks->arch_pre_time_init)
111 x86_quirks->arch_pre_time_init();
115 * time_init_hook - do any specific initialisations for the system timer.
117 * Description:
118 * Must plug the system timer interrupt source at HZ into the IRQ listed
119 * in irq_vectors.h:TIMER_IRQ
121 void __init time_init_hook(void)
123 if (x86_quirks->arch_time_init) {
125 * A nonzero return code does not mean failure, it means
126 * that the architecture quirk does not want any
127 * generic (timer) setup to be performed after this:
129 if (x86_quirks->arch_time_init())
130 return;
133 irq0.mask = cpumask_of_cpu(0);
134 setup_irq(0, &irq0);
137 #ifdef CONFIG_MCA
139 * mca_nmi_hook - hook into MCA specific NMI chain
141 * Description:
142 * The MCA (Microchannel Architecture) has an NMI chain for NMI sources
143 * along the MCA bus. Use this to hook into that chain if you will need
144 * it.
146 void mca_nmi_hook(void)
149 * If I recall correctly, there's a whole bunch of other things that
150 * we can do to check for NMI problems, but that's all I know about
151 * at the moment.
153 pr_warning("NMI generated from unknown source!\n");
155 #endif
157 static __init int no_ipi_broadcast(char *str)
159 get_option(&str, &no_broadcast);
160 pr_info("Using %s mode\n",
161 no_broadcast ? "No IPI Broadcast" : "IPI Broadcast");
162 return 1;
164 __setup("no_ipi_broadcast=", no_ipi_broadcast);
166 static int __init print_ipi_mode(void)
168 pr_info("Using IPI %s mode\n",
169 no_broadcast ? "No-Shortcut" : "Shortcut");
170 return 0;
173 late_initcall(print_ipi_mode);