2 * Machine specific setup for generic
6 #include <linux/init.h>
7 #include <linux/interrupt.h>
9 #include <asm/arch_hooks.h>
11 #include <asm/setup.h>
14 * Any quirks to be performed to initialize timers/irqs/etc?
16 int (*arch_time_init_quirk)(void);
17 int (*arch_pre_intr_init_quirk)(void);
18 int (*arch_intr_init_quirk)(void);
19 int (*arch_trap_init_quirk)(void);
21 #ifdef CONFIG_HOTPLUG_CPU
22 #define DEFAULT_SEND_IPI (1)
24 #define DEFAULT_SEND_IPI (0)
27 int no_broadcast=DEFAULT_SEND_IPI;
30 * pre_intr_init_hook - initialisation prior to setting up interrupt vectors
33 * Perform any necessary interrupt initialisation prior to setting up
34 * the "ordinary" interrupt call gates. For legacy reasons, the ISA
35 * interrupts should be initialised here if the machine emulates a PC
38 void __init pre_intr_init_hook(void)
40 if (arch_pre_intr_init_quirk) {
41 if (arch_pre_intr_init_quirk())
48 * IRQ2 is cascade interrupt to second interrupt controller
50 static struct irqaction irq2 = {
52 .mask = CPU_MASK_NONE,
57 * intr_init_hook - post gate setup interrupt initialisation
60 * Fill in any interrupts that may have been left out by the general
61 * init_IRQ() routine. interrupts having to do with the machine rather
62 * than the devices on the I/O bus (like APIC interrupts in intel MP
63 * systems) are started here.
65 void __init intr_init_hook(void)
67 if (arch_intr_init_quirk) {
68 if (arch_intr_init_quirk())
71 #ifdef CONFIG_X86_LOCAL_APIC
80 * pre_setup_arch_hook - hook called prior to any setup_arch() execution
83 * generally used to activate any machine specific identification
84 * routines that may be needed before setup_arch() runs. On Voyager
85 * this is used to get the board revision and type.
87 void __init pre_setup_arch_hook(void)
92 * trap_init_hook - initialise system specific traps
95 * Called as the final act of trap_init(). Used in VISWS to initialise
96 * the various board specific APIC traps.
98 void __init trap_init_hook(void)
100 if (arch_trap_init_quirk) {
101 if (arch_trap_init_quirk())
106 static struct irqaction irq0 = {
107 .handler = timer_interrupt,
108 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL,
109 .mask = CPU_MASK_NONE,
114 * time_init_hook - do any specific initialisations for the system timer.
117 * Must plug the system timer interrupt source at HZ into the IRQ listed
118 * in irq_vectors.h:TIMER_IRQ
120 void __init time_init_hook(void)
122 if (arch_time_init_quirk) {
124 * A nonzero return code does not mean failure, it means
125 * that the architecture quirk does not want any
126 * generic (timer) setup to be performed after this:
128 if (arch_time_init_quirk())
132 irq0.mask = cpumask_of_cpu(0);
138 * mca_nmi_hook - hook into MCA specific NMI chain
141 * The MCA (Microchannel Architecture) has an NMI chain for NMI sources
142 * along the MCA bus. Use this to hook into that chain if you will need
145 void mca_nmi_hook(void)
147 /* If I recall correctly, there's a whole bunch of other things that
148 * we can do to check for NMI problems, but that's all I know about
152 printk("NMI generated from unknown source!\n");
156 static __init int no_ipi_broadcast(char *str)
158 get_option(&str, &no_broadcast);
159 printk ("Using %s mode\n", no_broadcast ? "No IPI Broadcast" :
164 __setup("no_ipi_broadcast=", no_ipi_broadcast);
166 static int __init print_ipi_mode(void)
168 printk ("Using IPI %s mode\n", no_broadcast ? "No-Shortcut" :
173 late_initcall(print_ipi_mode);