aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/apic')
-rw-r--r--arch/x86/kernel/apic/Makefile3
-rw-r--r--arch/x86/kernel/apic/probe_32.c160
2 files changed, 17 insertions, 146 deletions
diff --git a/arch/x86/kernel/apic/Makefile b/arch/x86/kernel/apic/Makefile
index 97f558db5c3..da7b7b9f8bd 100644
--- a/arch/x86/kernel/apic/Makefile
+++ b/arch/x86/kernel/apic/Makefile
@@ -2,10 +2,9 @@
2# Makefile for local APIC drivers and for the IO-APIC code 2# Makefile for local APIC drivers and for the IO-APIC code
3# 3#
4 4
5obj-y := apic.o probe_$(BITS).o ipi.o nmi.o 5obj-$(CONFIG_X86_LOCAL_APIC) += apic.o probe_$(BITS).o ipi.o nmi.o
6obj-$(CONFIG_X86_IO_APIC) += io_apic.o 6obj-$(CONFIG_X86_IO_APIC) += io_apic.o
7obj-$(CONFIG_SMP) += ipi.o 7obj-$(CONFIG_SMP) += ipi.o
8obj-$
9 8
10ifeq ($(CONFIG_X86_64),y) 9ifeq ($(CONFIG_X86_64),y)
11obj-y += apic_flat_64.o 10obj-y += apic_flat_64.o
diff --git a/arch/x86/kernel/apic/probe_32.c b/arch/x86/kernel/apic/probe_32.c
index 5fa48332c5c..c9ec90742e9 100644
--- a/arch/x86/kernel/apic/probe_32.c
+++ b/arch/x86/kernel/apic/probe_32.c
@@ -47,7 +47,22 @@
47 47
48int no_broadcast = DEFAULT_SEND_IPI; 48int no_broadcast = DEFAULT_SEND_IPI;
49 49
50#ifdef CONFIG_X86_LOCAL_APIC 50static __init int no_ipi_broadcast(char *str)
51{
52 get_option(&str, &no_broadcast);
53 pr_info("Using %s mode\n",
54 no_broadcast ? "No IPI Broadcast" : "IPI Broadcast");
55 return 1;
56}
57__setup("no_ipi_broadcast=", no_ipi_broadcast);
58
59static int __init print_ipi_mode(void)
60{
61 pr_info("Using IPI %s mode\n",
62 no_broadcast ? "No-Shortcut" : "Shortcut");
63 return 0;
64}
65late_initcall(print_ipi_mode);
51 66
52void default_setup_apic_routing(void) 67void default_setup_apic_routing(void)
53{ 68{
@@ -279,146 +294,3 @@ int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
279 } 294 }
280 return 0; 295 return 0;
281} 296}
282
283#endif /* CONFIG_X86_LOCAL_APIC */
284
285/**
286 * pre_intr_init_hook - initialisation prior to setting up interrupt vectors
287 *
288 * Description:
289 * Perform any necessary interrupt initialisation prior to setting up
290 * the "ordinary" interrupt call gates. For legacy reasons, the ISA
291 * interrupts should be initialised here if the machine emulates a PC
292 * in any way.
293 **/
294void __init pre_intr_init_hook(void)
295{
296 if (x86_quirks->arch_pre_intr_init) {
297 if (x86_quirks->arch_pre_intr_init())
298 return;
299 }
300 init_ISA_irqs();
301}
302
303/**
304 * intr_init_hook - post gate setup interrupt initialisation
305 *
306 * Description:
307 * Fill in any interrupts that may have been left out by the general
308 * init_IRQ() routine. interrupts having to do with the machine rather
309 * than the devices on the I/O bus (like APIC interrupts in intel MP
310 * systems) are started here.
311 **/
312void __init intr_init_hook(void)
313{
314 if (x86_quirks->arch_intr_init) {
315 if (x86_quirks->arch_intr_init())
316 return;
317 }
318}
319
320/**
321 * pre_setup_arch_hook - hook called prior to any setup_arch() execution
322 *
323 * Description:
324 * generally used to activate any machine specific identification
325 * routines that may be needed before setup_arch() runs. On Voyager
326 * this is used to get the board revision and type.
327 **/
328void __init pre_setup_arch_hook(void)
329{
330}
331
332/**
333 * trap_init_hook - initialise system specific traps
334 *
335 * Description:
336 * Called as the final act of trap_init(). Used in VISWS to initialise
337 * the various board specific APIC traps.
338 **/
339void __init trap_init_hook(void)
340{
341 if (x86_quirks->arch_trap_init) {
342 if (x86_quirks->arch_trap_init())
343 return;
344 }
345}
346
347static struct irqaction irq0 = {
348 .handler = timer_interrupt,
349 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL,
350 .mask = CPU_MASK_NONE,
351 .name = "timer"
352};
353
354/**
355 * pre_time_init_hook - do any specific initialisations before.
356 *
357 **/
358void __init pre_time_init_hook(void)
359{
360 if (x86_quirks->arch_pre_time_init)
361 x86_quirks->arch_pre_time_init();
362}
363
364/**
365 * time_init_hook - do any specific initialisations for the system timer.
366 *
367 * Description:
368 * Must plug the system timer interrupt source at HZ into the IRQ listed
369 * in irq_vectors.h:TIMER_IRQ
370 **/
371void __init time_init_hook(void)
372{
373 if (x86_quirks->arch_time_init) {
374 /*
375 * A nonzero return code does not mean failure, it means
376 * that the architecture quirk does not want any
377 * generic (timer) setup to be performed after this:
378 */
379 if (x86_quirks->arch_time_init())
380 return;
381 }
382
383 irq0.mask = cpumask_of_cpu(0);
384 setup_irq(0, &irq0);
385}
386
387#ifdef CONFIG_MCA
388/**
389 * mca_nmi_hook - hook into MCA specific NMI chain
390 *
391 * Description:
392 * The MCA (Microchannel Architecture) has an NMI chain for NMI sources
393 * along the MCA bus. Use this to hook into that chain if you will need
394 * it.
395 **/
396void mca_nmi_hook(void)
397{
398 /*
399 * If I recall correctly, there's a whole bunch of other things that
400 * we can do to check for NMI problems, but that's all I know about
401 * at the moment.
402 */
403 pr_warning("NMI generated from unknown source!\n");
404}
405#endif
406
407static __init int no_ipi_broadcast(char *str)
408{
409 get_option(&str, &no_broadcast);
410 pr_info("Using %s mode\n",
411 no_broadcast ? "No IPI Broadcast" : "IPI Broadcast");
412 return 1;
413}
414__setup("no_ipi_broadcast=", no_ipi_broadcast);
415
416static int __init print_ipi_mode(void)
417{
418 pr_info("Using IPI %s mode\n",
419 no_broadcast ? "No-Shortcut" : "Shortcut");
420 return 0;
421}
422
423late_initcall(print_ipi_mode);
424