From: Brian Gerst <brgerst@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Tejun Heo <tj@kernel.org>, linux-kernel@vger.kernel.org
Subject: [PATCH 05/12] x86: Move apic variables to apic.c
Date: Mon, 26 Jan 2009 01:15:25 -0500 [thread overview]
Message-ID: <1232950532-22923-5-git-send-email-brgerst@gmail.com> (raw)
In-Reply-To: <73c1f2160901252214k394d198dn815670e7f667b3ac@mail.gmail.com>
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>
---
arch/x86/kernel/apic.c | 18 ++++++++++++++++++
arch/x86/kernel/setup_percpu.c | 22 ++--------------------
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index 1df341a..c6f1564 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -60,6 +60,24 @@
# error SPURIOUS_APIC_VECTOR definition error
#endif
+unsigned int num_processors;
+unsigned disabled_cpus __cpuinitdata;
+/* Processor that is doing the boot up */
+unsigned int boot_cpu_physical_apicid = -1U;
+EXPORT_SYMBOL(boot_cpu_physical_apicid);
+unsigned int max_physical_apicid;
+
+/* Bitmask of physically existing CPUs */
+physid_mask_t phys_cpu_present_map;
+
+/*
+ * Map cpu index to physical APIC ID
+ */
+DEFINE_EARLY_PER_CPU(u16, x86_cpu_to_apicid, BAD_APICID);
+DEFINE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid, BAD_APICID);
+EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_apicid);
+EXPORT_EARLY_PER_CPU_SYMBOL(x86_bios_cpu_apicid);
+
#ifdef CONFIG_X86_32
/*
* 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 5d4a496..d367996 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);
EXPORT_PER_CPU_SYMBOL(cpu_number);
#endif
-#ifdef CONFIG_X86_LOCAL_APIC
-unsigned int num_processors;
-unsigned disabled_cpus __cpuinitdata;
-/* Processor that is doing the boot up */
-unsigned int boot_cpu_physical_apicid = -1U;
-EXPORT_SYMBOL(boot_cpu_physical_apicid);
-unsigned int max_physical_apicid;
-
-/* Bitmask of physically existing CPUs */
-physid_mask_t phys_cpu_present_map;
-#endif
-
-/*
- * Map cpu index to physical APIC ID
- */
-DEFINE_EARLY_PER_CPU(u16, x86_cpu_to_apicid, BAD_APICID);
-DEFINE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid, BAD_APICID);
-EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_apicid);
-EXPORT_EARLY_PER_CPU_SYMBOL(x86_bios_cpu_apicid);
-
#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA
#ifdef CONFIG_X86_64
@@ -108,10 +88,12 @@ void __init setup_per_cpu_areas(void)
* per cpu data areas. These arrays then become expendable and the
* *_early_ptr's are zeroed indicating that the static arrays are gone.
*/
+#ifdef CONFIG_X86_LOCAL_APIC
per_cpu(x86_cpu_to_apicid, cpu) =
early_per_cpu_map(x86_cpu_to_apicid, cpu);
per_cpu(x86_bios_cpu_apicid, cpu) =
early_per_cpu_map(x86_bios_cpu_apicid, cpu);
+#endif
#ifdef CONFIG_X86_64
per_cpu(irq_stack_ptr, cpu) =
per_cpu(irq_stack_union.irq_stack, cpu) + IRQ_STACK_SIZE - 64;
--
1.6.1
next prev parent reply other threads:[~2009-01-26 6:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-26 6:14 [PATCH 0/12] Next batch of x86 percpu changes Brian Gerst
2009-01-26 6:15 ` [PATCH 01/12] x86: Merge setup_per_cpu_maps() into setup_per_cpu_areas() Brian Gerst
2009-01-26 6:15 ` [PATCH 02/12] x86: Move 64-bit NUMA code Brian Gerst
2009-01-26 6:15 ` [PATCH 03/12] x86: Move setup_cpu_local_masks() Brian Gerst
2009-01-26 6:15 ` [PATCH 04/12] x86: Always page-align per-cpu area start and size Brian Gerst
2009-01-26 6:15 ` Brian Gerst [this message]
2009-01-26 6:15 ` [PATCH 06/12] x86: Only compile setup_percpu.o on SMP Brian Gerst
2009-01-26 6:15 ` [PATCH 07/12] x86: Move this_cpu_offset Brian Gerst
2009-01-26 6:15 ` [PATCH 08/12] x86: Don't assume boot cpu is #0 Brian Gerst
2009-01-26 6:15 ` [PATCH 09/12] x86: Make Voyager use x86 per-cpu setup Brian Gerst
2009-01-26 6:15 ` [PATCH 10/12] x86: Initialize per-cpu GDT segment in " Brian Gerst
2009-01-26 6:15 ` [PATCH 11/12] x86: Remove extra barriers from load_gs_base() Brian Gerst
2009-01-26 6:15 ` [PATCH 12/12] x86: Load new GDT after setting up boot cpu per-cpu area Brian Gerst
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1232950532-22923-5-git-send-email-brgerst@gmail.com \
--to=brgerst@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox