aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/Makefile4
-rw-r--r--arch/x86/kernel/smpboot.c42
-rw-r--r--arch/x86/kernel/smpboot_32.c68
-rw-r--r--arch/x86/kernel/smpboot_64.c73
-rw-r--r--arch/x86/pci/numa.c7
5 files changed, 50 insertions, 144 deletions
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 5d33509fd1c1..d5a05a0cef62 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -46,10 +46,10 @@ obj-$(CONFIG_MICROCODE) += microcode.o
46obj-$(CONFIG_PCI) += early-quirks.o 46obj-$(CONFIG_PCI) += early-quirks.o
47apm-y := apm_32.o 47apm-y := apm_32.o
48obj-$(CONFIG_APM) += apm.o 48obj-$(CONFIG_APM) += apm.o
49obj-$(CONFIG_X86_SMP) += smpboot_$(BITS).o smp.o 49obj-$(CONFIG_X86_SMP) += smp.o
50obj-$(CONFIG_X86_SMP) += smpboot.o tsc_sync.o ipi.o tlb_$(BITS).o 50obj-$(CONFIG_X86_SMP) += smpboot.o tsc_sync.o ipi.o tlb_$(BITS).o
51obj-$(CONFIG_X86_32_SMP) += smpcommon.o 51obj-$(CONFIG_X86_32_SMP) += smpcommon.o
52obj-$(CONFIG_X86_64_SMP) += smpboot_64.o tsc_sync.o smpcommon.o 52obj-$(CONFIG_X86_64_SMP) += tsc_sync.o smpcommon.o
53obj-$(CONFIG_X86_TRAMPOLINE) += trampoline_$(BITS).o 53obj-$(CONFIG_X86_TRAMPOLINE) += trampoline_$(BITS).o
54obj-$(CONFIG_X86_MPPARSE) += mpparse_$(BITS).o 54obj-$(CONFIG_X86_MPPARSE) += mpparse_$(BITS).o
55obj-$(CONFIG_X86_LOCAL_APIC) += apic_$(BITS).o nmi_$(BITS).o 55obj-$(CONFIG_X86_LOCAL_APIC) += apic_$(BITS).o nmi_$(BITS).o
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 75637fb760e7..61b9a5b6fc07 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1,3 +1,44 @@
1/*
2 * x86 SMP booting functions
3 *
4 * (c) 1995 Alan Cox, Building #3 <alan@redhat.com>
5 * (c) 1998, 1999, 2000 Ingo Molnar <mingo@redhat.com>
6 * Copyright 2001 Andi Kleen, SuSE Labs.
7 *
8 * Much of the core SMP work is based on previous work by Thomas Radke, to
9 * whom a great many thanks are extended.
10 *
11 * Thanks to Intel for making available several different Pentium,
12 * Pentium Pro and Pentium-II/Xeon MP machines.
13 * Original development of Linux SMP code supported by Caldera.
14 *
15 * This code is released under the GNU General Public License version 2 or
16 * later.
17 *
18 * Fixes
19 * Felix Koop : NR_CPUS used properly
20 * Jose Renau : Handle single CPU case.
21 * Alan Cox : By repeated request 8) - Total BogoMIPS report.
22 * Greg Wright : Fix for kernel stacks panic.
23 * Erich Boleyn : MP v1.4 and additional changes.
24 * Matthias Sattler : Changes for 2.1 kernel map.
25 * Michel Lespinasse : Changes for 2.1 kernel map.
26 * Michael Chastain : Change trampoline.S to gnu as.
27 * Alan Cox : Dumb bug: 'B' step PPro's are fine
28 * Ingo Molnar : Added APIC timers, based on code
29 * from Jose Renau
30 * Ingo Molnar : various cleanups and rewrites
31 * Tigran Aivazian : fixed "0.00 in /proc/uptime on SMP" bug.
32 * Maciej W. Rozycki : Bits for genuine 82489DX APICs
33 * Andi Kleen : Changed for SMP boot into long mode.
34 * Martin J. Bligh : Added support for multi-quad systems
35 * Dave Jones : Report invalid combinations of Athlon CPUs.
36 * Rusty Russell : Hacked into shape for new "hotplug" boot process.
37 * Andi Kleen : Converted to new state machine.
38 * Ashok Raj : CPU hotplug support
39 * Glauber Costa : i386 and x86_64 integration
40 */
41
1#include <linux/init.h> 42#include <linux/init.h>
2#include <linux/smp.h> 43#include <linux/smp.h>
3#include <linux/module.h> 44#include <linux/module.h>
@@ -44,6 +85,7 @@ u16 x86_bios_cpu_apicid_init[NR_CPUS] __initdata
44void *x86_bios_cpu_apicid_early_ptr; 85void *x86_bios_cpu_apicid_early_ptr;
45DEFINE_PER_CPU(u16, x86_bios_cpu_apicid) = BAD_APICID; 86DEFINE_PER_CPU(u16, x86_bios_cpu_apicid) = BAD_APICID;
46EXPORT_PER_CPU_SYMBOL(x86_bios_cpu_apicid); 87EXPORT_PER_CPU_SYMBOL(x86_bios_cpu_apicid);
88u8 apicid_2_node[MAX_APICID];
47#endif 89#endif
48 90
49/* State of each CPU */ 91/* State of each CPU */
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c
deleted file mode 100644
index 3590afe575e7..000000000000
--- a/arch/x86/kernel/smpboot_32.c
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * x86 SMP booting functions
3 *
4 * (c) 1995 Alan Cox, Building #3 <alan@redhat.com>
5 * (c) 1998, 1999, 2000 Ingo Molnar <mingo@redhat.com>
6 *
7 * Much of the core SMP work is based on previous work by Thomas Radke, to
8 * whom a great many thanks are extended.
9 *
10 * Thanks to Intel for making available several different Pentium,
11 * Pentium Pro and Pentium-II/Xeon MP machines.
12 * Original development of Linux SMP code supported by Caldera.
13 *
14 * This code is released under the GNU General Public License version 2 or
15 * later.
16 *
17 * Fixes
18 * Felix Koop : NR_CPUS used properly
19 * Jose Renau : Handle single CPU case.
20 * Alan Cox : By repeated request 8) - Total BogoMIPS report.
21 * Greg Wright : Fix for kernel stacks panic.
22 * Erich Boleyn : MP v1.4 and additional changes.
23 * Matthias Sattler : Changes for 2.1 kernel map.
24 * Michel Lespinasse : Changes for 2.1 kernel map.
25 * Michael Chastain : Change trampoline.S to gnu as.
26 * Alan Cox : Dumb bug: 'B' step PPro's are fine
27 * Ingo Molnar : Added APIC timers, based on code
28 * from Jose Renau
29 * Ingo Molnar : various cleanups and rewrites
30 * Tigran Aivazian : fixed "0.00 in /proc/uptime on SMP" bug.
31 * Maciej W. Rozycki : Bits for genuine 82489DX APICs
32 * Martin J. Bligh : Added support for multi-quad systems
33 * Dave Jones : Report invalid combinations of Athlon CPUs.
34* Rusty Russell : Hacked into shape for new "hotplug" boot process. */
35
36#include <linux/module.h>
37#include <linux/init.h>
38#include <linux/kernel.h>
39
40#include <linux/mm.h>
41#include <linux/sched.h>
42#include <linux/kernel_stat.h>
43#include <linux/bootmem.h>
44#include <linux/notifier.h>
45#include <linux/cpu.h>
46#include <linux/percpu.h>
47#include <linux/nmi.h>
48
49#include <linux/delay.h>
50#include <linux/mc146818rtc.h>
51#include <asm/tlbflush.h>
52#include <asm/desc.h>
53#include <asm/arch_hooks.h>
54#include <asm/nmi.h>
55
56#include <mach_apic.h>
57#include <mach_wakecpu.h>
58#include <smpboot_hooks.h>
59#include <asm/vmi.h>
60#include <asm/mtrr.h>
61
62u8 apicid_2_node[MAX_APICID];
63
64/* Where the IO area was mapped on multiquad, always 0 otherwise */
65void *xquad_portio;
66#ifdef CONFIG_X86_NUMAQ
67EXPORT_SYMBOL(xquad_portio);
68#endif
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c
deleted file mode 100644
index 66b55629733b..000000000000
--- a/arch/x86/kernel/smpboot_64.c
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2 * x86 SMP booting functions
3 *
4 * (c) 1995 Alan Cox, Building #3 <alan@redhat.com>
5 * (c) 1998, 1999, 2000 Ingo Molnar <mingo@redhat.com>
6 * Copyright 2001 Andi Kleen, SuSE Labs.
7 *
8 * Much of the core SMP work is based on previous work by Thomas Radke, to
9 * whom a great many thanks are extended.
10 *
11 * Thanks to Intel for making available several different Pentium,
12 * Pentium Pro and Pentium-II/Xeon MP machines.
13 * Original development of Linux SMP code supported by Caldera.
14 *
15 * This code is released under the GNU General Public License version 2
16 *
17 * Fixes
18 * Felix Koop : NR_CPUS used properly
19 * Jose Renau : Handle single CPU case.
20 * Alan Cox : By repeated request 8) - Total BogoMIP report.
21 * Greg Wright : Fix for kernel stacks panic.
22 * Erich Boleyn : MP v1.4 and additional changes.
23 * Matthias Sattler : Changes for 2.1 kernel map.
24 * Michel Lespinasse : Changes for 2.1 kernel map.
25 * Michael Chastain : Change trampoline.S to gnu as.
26 * Alan Cox : Dumb bug: 'B' step PPro's are fine
27 * Ingo Molnar : Added APIC timers, based on code
28 * from Jose Renau
29 * Ingo Molnar : various cleanups and rewrites
30 * Tigran Aivazian : fixed "0.00 in /proc/uptime on SMP" bug.
31 * Maciej W. Rozycki : Bits for genuine 82489DX APICs
32 * Andi Kleen : Changed for SMP boot into long mode.
33 * Rusty Russell : Hacked into shape for new "hotplug" boot process.
34 * Andi Kleen : Converted to new state machine.
35 * Various cleanups.
36 * Probably mostly hotplug CPU ready now.
37 * Ashok Raj : CPU hotplug support
38 */
39
40
41#include <linux/init.h>
42
43#include <linux/mm.h>
44#include <linux/kernel_stat.h>
45#include <linux/bootmem.h>
46#include <linux/thread_info.h>
47#include <linux/module.h>
48#include <linux/delay.h>
49#include <linux/mc146818rtc.h>
50#include <linux/smp.h>
51#include <linux/kdebug.h>
52
53#include <asm/acpi.h>
54#include <asm/mtrr.h>
55#include <asm/pgalloc.h>
56#include <asm/desc.h>
57#include <asm/tlbflush.h>
58#include <asm/proto.h>
59#include <asm/nmi.h>
60#include <asm/irq.h>
61#include <asm/hw_irq.h>
62#include <asm/numa.h>
63
64#include <mach_wakecpu.h>
65#include <mach_apic.h>
66#include <smpboot_hooks.h>
67#include <mach_apic.h>
68
69/* Set when the idlers are all forked */
70int smp_threads_ready;
71
72cycles_t cacheflush_time;
73unsigned long cache_decay_ticks;
diff --git a/arch/x86/pci/numa.c b/arch/x86/pci/numa.c
index 9e30378364ed..79d0a98b9d03 100644
--- a/arch/x86/pci/numa.c
+++ b/arch/x86/pci/numa.c
@@ -20,7 +20,12 @@ int mp_bus_id_to_local[MAX_MP_BUSSES];
20int quad_local_to_mp_bus_id [NR_CPUS/4][4]; 20int quad_local_to_mp_bus_id [NR_CPUS/4][4];
21#define QUADLOCAL2BUS(quad,local) (quad_local_to_mp_bus_id[quad][local]) 21#define QUADLOCAL2BUS(quad,local) (quad_local_to_mp_bus_id[quad][local])
22 22
23extern void *xquad_portio; /* Where the IO area was mapped */ 23/* Where the IO area was mapped on multiquad, always 0 otherwise */
24void *xquad_portio;
25#ifdef CONFIG_X86_NUMAQ
26EXPORT_SYMBOL(xquad_portio);
27#endif
28
24#define XQUAD_PORT_ADDR(port, quad) (xquad_portio + (XQUAD_PORTIO_QUAD*quad) + port) 29#define XQUAD_PORT_ADDR(port, quad) (xquad_portio + (XQUAD_PORTIO_QUAD*quad) + port)
25 30
26#define PCI_CONF1_MQ_ADDRESS(bus, devfn, reg) \ 31#define PCI_CONF1_MQ_ADDRESS(bus, devfn, reg) \