diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-17 16:53:12 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-17 16:53:12 -0500 |
commit | cebb469ba242f7ce476e378c8cd3b0c6c63a4c54 (patch) | |
tree | 36fb8d82c7b934d42cc0dad4296beba65dc0e18c | |
parent | 0b6de0092244c98b5ba1abda34c92470a20e0d0c (diff) | |
parent | 9be1b56a3e718aa998772019c57c398dbb19e258 (diff) |
Merge branch 'x86/apic' into perfcounters/core
-rw-r--r-- | arch/x86/kernel/Makefile | 8 | ||||
-rw-r--r-- | arch/x86/kernel/apic/Makefile | 8 | ||||
-rw-r--r-- | arch/x86/kernel/apic/bigsmp_32.c (renamed from arch/x86/kernel/bigsmp_32.c) | 0 | ||||
-rw-r--r-- | arch/x86/kernel/apic/es7000_32.c (renamed from arch/x86/kernel/es7000_32.c) | 0 | ||||
-rw-r--r-- | arch/x86/kernel/apic/numaq_32.c (renamed from arch/x86/kernel/numaq_32.c) | 0 | ||||
-rw-r--r-- | arch/x86/kernel/apic/probe_32.c (renamed from arch/x86/kernel/probe_32.c) | 160 | ||||
-rw-r--r-- | arch/x86/kernel/apic/probe_64.c (renamed from arch/x86/kernel/apic/apic_64.c) | 0 | ||||
-rw-r--r-- | arch/x86/kernel/apic/summit_32.c (renamed from arch/x86/kernel/summit_32.c) | 0 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 124 |
9 files changed, 148 insertions, 152 deletions
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 9139ff69471c..de5657c039e9 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile | |||
@@ -30,7 +30,7 @@ obj-y += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o | |||
30 | obj-y += time_$(BITS).o ioport.o ldt.o dumpstack.o | 30 | obj-y += time_$(BITS).o ioport.o ldt.o dumpstack.o |
31 | obj-y += setup.o i8259.o irqinit_$(BITS).o | 31 | obj-y += setup.o i8259.o irqinit_$(BITS).o |
32 | obj-$(CONFIG_X86_VISWS) += visws_quirks.o | 32 | obj-$(CONFIG_X86_VISWS) += visws_quirks.o |
33 | obj-$(CONFIG_X86_32) += probe_32.o probe_roms_32.o | 33 | obj-$(CONFIG_X86_32) += probe_roms_32.o |
34 | obj-$(CONFIG_X86_32) += sys_i386_32.o i386_ksyms_32.o | 34 | obj-$(CONFIG_X86_32) += sys_i386_32.o i386_ksyms_32.o |
35 | obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o | 35 | obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o |
36 | obj-$(CONFIG_X86_64) += syscall_64.o vsyscall_64.o | 36 | obj-$(CONFIG_X86_64) += syscall_64.o vsyscall_64.o |
@@ -63,17 +63,13 @@ obj-$(CONFIG_SMP) += setup_percpu.o | |||
63 | obj-$(CONFIG_X86_64_SMP) += tsc_sync.o | 63 | obj-$(CONFIG_X86_64_SMP) += tsc_sync.o |
64 | obj-$(CONFIG_X86_TRAMPOLINE) += trampoline_$(BITS).o | 64 | obj-$(CONFIG_X86_TRAMPOLINE) += trampoline_$(BITS).o |
65 | obj-$(CONFIG_X86_MPPARSE) += mpparse.o | 65 | obj-$(CONFIG_X86_MPPARSE) += mpparse.o |
66 | obj-$(CONFIG_X86_LOCAL_APIC) += apic/ | 66 | obj-y += apic/ |
67 | obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o | 67 | obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o |
68 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o | 68 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o |
69 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o | 69 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o |
70 | obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o | 70 | obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o |
71 | obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o | 71 | obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o |
72 | obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o | 72 | obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o |
73 | obj-$(CONFIG_X86_BIGSMP) += bigsmp_32.o | ||
74 | obj-$(CONFIG_X86_NUMAQ) += numaq_32.o | ||
75 | obj-$(CONFIG_X86_ES7000) += es7000_32.o | ||
76 | obj-$(CONFIG_X86_SUMMIT) += summit_32.o | ||
77 | obj-y += vsmp_64.o | 73 | obj-y += vsmp_64.o |
78 | obj-$(CONFIG_KPROBES) += kprobes.o | 74 | obj-$(CONFIG_KPROBES) += kprobes.o |
79 | obj-$(CONFIG_MODULES) += module_$(BITS).o | 75 | obj-$(CONFIG_MODULES) += module_$(BITS).o |
diff --git a/arch/x86/kernel/apic/Makefile b/arch/x86/kernel/apic/Makefile index da20b70c4000..da7b7b9f8bd8 100644 --- a/arch/x86/kernel/apic/Makefile +++ b/arch/x86/kernel/apic/Makefile | |||
@@ -2,14 +2,18 @@ | |||
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 | ||
5 | obj-y := apic.o ipi.o nmi.o | 5 | obj-$(CONFIG_X86_LOCAL_APIC) += apic.o probe_$(BITS).o ipi.o nmi.o |
6 | obj-$(CONFIG_X86_IO_APIC) += io_apic.o | 6 | obj-$(CONFIG_X86_IO_APIC) += io_apic.o |
7 | obj-$(CONFIG_SMP) += ipi.o | 7 | obj-$(CONFIG_SMP) += ipi.o |
8 | 8 | ||
9 | ifeq ($(CONFIG_X86_64),y) | 9 | ifeq ($(CONFIG_X86_64),y) |
10 | obj-y += apic_64.o apic_flat_64.o | 10 | obj-y += apic_flat_64.o |
11 | obj-$(CONFIG_X86_X2APIC) += x2apic_cluster.o | 11 | obj-$(CONFIG_X86_X2APIC) += x2apic_cluster.o |
12 | obj-$(CONFIG_X86_X2APIC) += x2apic_phys.o | 12 | obj-$(CONFIG_X86_X2APIC) += x2apic_phys.o |
13 | obj-$(CONFIG_X86_UV) += x2apic_uv_x.o | 13 | obj-$(CONFIG_X86_UV) += x2apic_uv_x.o |
14 | endif | 14 | endif |
15 | 15 | ||
16 | obj-$(CONFIG_X86_BIGSMP) += bigsmp_32.o | ||
17 | obj-$(CONFIG_X86_NUMAQ) += numaq_32.o | ||
18 | obj-$(CONFIG_X86_ES7000) += es7000_32.o | ||
19 | obj-$(CONFIG_X86_SUMMIT) += summit_32.o | ||
diff --git a/arch/x86/kernel/bigsmp_32.c b/arch/x86/kernel/apic/bigsmp_32.c index 0b1093394fdf..0b1093394fdf 100644 --- a/arch/x86/kernel/bigsmp_32.c +++ b/arch/x86/kernel/apic/bigsmp_32.c | |||
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/apic/es7000_32.c index 320f2d2e4e54..320f2d2e4e54 100644 --- a/arch/x86/kernel/es7000_32.c +++ b/arch/x86/kernel/apic/es7000_32.c | |||
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/apic/numaq_32.c index d9d6d61eed82..d9d6d61eed82 100644 --- a/arch/x86/kernel/numaq_32.c +++ b/arch/x86/kernel/apic/numaq_32.c | |||
diff --git a/arch/x86/kernel/probe_32.c b/arch/x86/kernel/apic/probe_32.c index 5fa48332c5c8..c9ec90742e9f 100644 --- a/arch/x86/kernel/probe_32.c +++ b/arch/x86/kernel/apic/probe_32.c | |||
@@ -47,7 +47,22 @@ | |||
47 | 47 | ||
48 | int no_broadcast = DEFAULT_SEND_IPI; | 48 | int no_broadcast = DEFAULT_SEND_IPI; |
49 | 49 | ||
50 | #ifdef CONFIG_X86_LOCAL_APIC | 50 | static __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 | |||
59 | static 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 | } | ||
65 | late_initcall(print_ipi_mode); | ||
51 | 66 | ||
52 | void default_setup_apic_routing(void) | 67 | void 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 | **/ | ||
294 | void __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 | **/ | ||
312 | void __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 | **/ | ||
328 | void __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 | **/ | ||
339 | void __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 | |||
347 | static 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 | **/ | ||
358 | void __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 | **/ | ||
371 | void __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 | **/ | ||
396 | void 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 | |||
407 | static __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 | |||
416 | static 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 | |||
423 | late_initcall(print_ipi_mode); | ||
424 | |||
diff --git a/arch/x86/kernel/apic/apic_64.c b/arch/x86/kernel/apic/probe_64.c index 70935dd904db..70935dd904db 100644 --- a/arch/x86/kernel/apic/apic_64.c +++ b/arch/x86/kernel/apic/probe_64.c | |||
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/apic/summit_32.c index cfe7b09015d8..cfe7b09015d8 100644 --- a/arch/x86/kernel/summit_32.c +++ b/arch/x86/kernel/apic/summit_32.c | |||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 6b588d6b3889..ebef80055795 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -985,4 +985,128 @@ void __init setup_arch(char **cmdline_p) | |||
985 | #endif | 985 | #endif |
986 | } | 986 | } |
987 | 987 | ||
988 | #ifdef CONFIG_X86_32 | ||
989 | |||
990 | /** | ||
991 | * pre_intr_init_hook - initialisation prior to setting up interrupt vectors | ||
992 | * | ||
993 | * Description: | ||
994 | * Perform any necessary interrupt initialisation prior to setting up | ||
995 | * the "ordinary" interrupt call gates. For legacy reasons, the ISA | ||
996 | * interrupts should be initialised here if the machine emulates a PC | ||
997 | * in any way. | ||
998 | **/ | ||
999 | void __init pre_intr_init_hook(void) | ||
1000 | { | ||
1001 | if (x86_quirks->arch_pre_intr_init) { | ||
1002 | if (x86_quirks->arch_pre_intr_init()) | ||
1003 | return; | ||
1004 | } | ||
1005 | init_ISA_irqs(); | ||
1006 | } | ||
1007 | |||
1008 | /** | ||
1009 | * intr_init_hook - post gate setup interrupt initialisation | ||
1010 | * | ||
1011 | * Description: | ||
1012 | * Fill in any interrupts that may have been left out by the general | ||
1013 | * init_IRQ() routine. interrupts having to do with the machine rather | ||
1014 | * than the devices on the I/O bus (like APIC interrupts in intel MP | ||
1015 | * systems) are started here. | ||
1016 | **/ | ||
1017 | void __init intr_init_hook(void) | ||
1018 | { | ||
1019 | if (x86_quirks->arch_intr_init) { | ||
1020 | if (x86_quirks->arch_intr_init()) | ||
1021 | return; | ||
1022 | } | ||
1023 | } | ||
1024 | |||
1025 | /** | ||
1026 | * pre_setup_arch_hook - hook called prior to any setup_arch() execution | ||
1027 | * | ||
1028 | * Description: | ||
1029 | * generally used to activate any machine specific identification | ||
1030 | * routines that may be needed before setup_arch() runs. On Voyager | ||
1031 | * this is used to get the board revision and type. | ||
1032 | **/ | ||
1033 | void __init pre_setup_arch_hook(void) | ||
1034 | { | ||
1035 | } | ||
1036 | |||
1037 | /** | ||
1038 | * trap_init_hook - initialise system specific traps | ||
1039 | * | ||
1040 | * Description: | ||
1041 | * Called as the final act of trap_init(). Used in VISWS to initialise | ||
1042 | * the various board specific APIC traps. | ||
1043 | **/ | ||
1044 | void __init trap_init_hook(void) | ||
1045 | { | ||
1046 | if (x86_quirks->arch_trap_init) { | ||
1047 | if (x86_quirks->arch_trap_init()) | ||
1048 | return; | ||
1049 | } | ||
1050 | } | ||
1051 | |||
1052 | static struct irqaction irq0 = { | ||
1053 | .handler = timer_interrupt, | ||
1054 | .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL, | ||
1055 | .mask = CPU_MASK_NONE, | ||
1056 | .name = "timer" | ||
1057 | }; | ||
1058 | |||
1059 | /** | ||
1060 | * pre_time_init_hook - do any specific initialisations before. | ||
1061 | * | ||
1062 | **/ | ||
1063 | void __init pre_time_init_hook(void) | ||
1064 | { | ||
1065 | if (x86_quirks->arch_pre_time_init) | ||
1066 | x86_quirks->arch_pre_time_init(); | ||
1067 | } | ||
1068 | |||
1069 | /** | ||
1070 | * time_init_hook - do any specific initialisations for the system timer. | ||
1071 | * | ||
1072 | * Description: | ||
1073 | * Must plug the system timer interrupt source at HZ into the IRQ listed | ||
1074 | * in irq_vectors.h:TIMER_IRQ | ||
1075 | **/ | ||
1076 | void __init time_init_hook(void) | ||
1077 | { | ||
1078 | if (x86_quirks->arch_time_init) { | ||
1079 | /* | ||
1080 | * A nonzero return code does not mean failure, it means | ||
1081 | * that the architecture quirk does not want any | ||
1082 | * generic (timer) setup to be performed after this: | ||
1083 | */ | ||
1084 | if (x86_quirks->arch_time_init()) | ||
1085 | return; | ||
1086 | } | ||
1087 | |||
1088 | irq0.mask = cpumask_of_cpu(0); | ||
1089 | setup_irq(0, &irq0); | ||
1090 | } | ||
1091 | |||
1092 | #ifdef CONFIG_MCA | ||
1093 | /** | ||
1094 | * mca_nmi_hook - hook into MCA specific NMI chain | ||
1095 | * | ||
1096 | * Description: | ||
1097 | * The MCA (Microchannel Architecture) has an NMI chain for NMI sources | ||
1098 | * along the MCA bus. Use this to hook into that chain if you will need | ||
1099 | * it. | ||
1100 | **/ | ||
1101 | void mca_nmi_hook(void) | ||
1102 | { | ||
1103 | /* | ||
1104 | * If I recall correctly, there's a whole bunch of other things that | ||
1105 | * we can do to check for NMI problems, but that's all I know about | ||
1106 | * at the moment. | ||
1107 | */ | ||
1108 | pr_warning("NMI generated from unknown source!\n"); | ||
1109 | } | ||
1110 | #endif /* CONFIG_MCA */ | ||
988 | 1111 | ||
1112 | #endif /* CONFIG_X86_32 */ | ||