aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2009-01-26 22:56:47 -0500
committerTejun Heo <tj@kernel.org>2009-01-26 22:56:47 -0500
commitec70de8b04bf37213982a5e8f303bc38679f3f8e (patch)
tree6d7728d89686503d06c8bfc789810c9e111f5dd8 /arch
parent74631a248dc2c2129a96f6b8b706ed54bb5c3d3c (diff)
x86: move apic variables to apic.c
Impact: Code movement Move the variable definitions to apic.c. Ifdef the copying of the two early per-cpu variables, since Voyager doesn't use them. Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/apic.c18
-rw-r--r--arch/x86/kernel/setup_percpu.c22
2 files changed, 20 insertions, 20 deletions
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index 1df341a528a1..c6f15647eba9 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -60,6 +60,24 @@
60# error SPURIOUS_APIC_VECTOR definition error 60# error SPURIOUS_APIC_VECTOR definition error
61#endif 61#endif
62 62
63unsigned int num_processors;
64unsigned disabled_cpus __cpuinitdata;
65/* Processor that is doing the boot up */
66unsigned int boot_cpu_physical_apicid = -1U;
67EXPORT_SYMBOL(boot_cpu_physical_apicid);
68unsigned int max_physical_apicid;
69
70/* Bitmask of physically existing CPUs */
71physid_mask_t phys_cpu_present_map;
72
73/*
74 * Map cpu index to physical APIC ID
75 */
76DEFINE_EARLY_PER_CPU(u16, x86_cpu_to_apicid, BAD_APICID);
77DEFINE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid, BAD_APICID);
78EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_apicid);
79EXPORT_EARLY_PER_CPU_SYMBOL(x86_bios_cpu_apicid);
80
63#ifdef CONFIG_X86_32 81#ifdef CONFIG_X86_32
64/* 82/*
65 * Knob to control our willingness to enable the local APIC. 83 * Knob to control our willingness to enable the local APIC.
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index 5d4a4964a8b3..d367996693e6 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -31,26 +31,6 @@ DEFINE_PER_CPU(int, cpu_number);
31EXPORT_PER_CPU_SYMBOL(cpu_number); 31EXPORT_PER_CPU_SYMBOL(cpu_number);
32#endif 32#endif
33 33
34#ifdef CONFIG_X86_LOCAL_APIC
35unsigned int num_processors;
36unsigned disabled_cpus __cpuinitdata;
37/* Processor that is doing the boot up */
38unsigned int boot_cpu_physical_apicid = -1U;
39EXPORT_SYMBOL(boot_cpu_physical_apicid);
40unsigned int max_physical_apicid;
41
42/* Bitmask of physically existing CPUs */
43physid_mask_t phys_cpu_present_map;
44#endif
45
46/*
47 * Map cpu index to physical APIC ID
48 */
49DEFINE_EARLY_PER_CPU(u16, x86_cpu_to_apicid, BAD_APICID);
50DEFINE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid, BAD_APICID);
51EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_apicid);
52EXPORT_EARLY_PER_CPU_SYMBOL(x86_bios_cpu_apicid);
53
54#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA 34#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA
55 35
56#ifdef CONFIG_X86_64 36#ifdef CONFIG_X86_64
@@ -108,10 +88,12 @@ void __init setup_per_cpu_areas(void)
108 * per cpu data areas. These arrays then become expendable and the 88 * per cpu data areas. These arrays then become expendable and the
109 * *_early_ptr's are zeroed indicating that the static arrays are gone. 89 * *_early_ptr's are zeroed indicating that the static arrays are gone.
110 */ 90 */
91#ifdef CONFIG_X86_LOCAL_APIC
111 per_cpu(x86_cpu_to_apicid, cpu) = 92 per_cpu(x86_cpu_to_apicid, cpu) =
112 early_per_cpu_map(x86_cpu_to_apicid, cpu); 93 early_per_cpu_map(x86_cpu_to_apicid, cpu);
113 per_cpu(x86_bios_cpu_apicid, cpu) = 94 per_cpu(x86_bios_cpu_apicid, cpu) =
114 early_per_cpu_map(x86_bios_cpu_apicid, cpu); 95 early_per_cpu_map(x86_bios_cpu_apicid, cpu);
96#endif
115#ifdef CONFIG_X86_64 97#ifdef CONFIG_X86_64
116 per_cpu(irq_stack_ptr, cpu) = 98 per_cpu(irq_stack_ptr, cpu) =
117 per_cpu(irq_stack_union.irq_stack, cpu) + IRQ_STACK_SIZE - 64; 99 per_cpu(irq_stack_union.irq_stack, cpu) + IRQ_STACK_SIZE - 64;