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 09/12] x86: Make Voyager use x86 per-cpu setup.
Date: Mon, 26 Jan 2009 01:15:29 -0500 [thread overview]
Message-ID: <1232950532-22923-9-git-send-email-brgerst@gmail.com> (raw)
In-Reply-To: <73c1f2160901252214k394d198dn815670e7f667b3ac@mail.gmail.com>
Impact: standardize all x86 platforms on same setup code
With the preceding changes, Voyager can use the same per-cpu setup
code as all the other x86 platforms.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
---
arch/x86/Kconfig | 2 +-
arch/x86/kernel/setup_percpu.c | 5 -----
arch/x86/mach-voyager/voyager_smp.c | 3 ---
3 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5a29b79..d6218e6 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -133,7 +133,7 @@ config ARCH_HAS_CACHE_LINE_SIZE
def_bool y
config HAVE_SETUP_PER_CPU_AREA
- def_bool X86_64_SMP || (X86_SMP && !X86_VOYAGER)
+ def_bool y
config HAVE_CPUMASK_OF_CPU_MAP
def_bool X86_64_SMP
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index be77f1a..599dc1c 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -35,8 +35,6 @@ EXPORT_PER_CPU_SYMBOL(cpu_number);
DEFINE_PER_CPU(unsigned long, this_cpu_off) = BOOT_PERCPU_OFFSET;
EXPORT_PER_CPU_SYMBOL(this_cpu_off);
-#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA
-
unsigned long __per_cpu_offset[NR_CPUS] __read_mostly = {
[0 ... NR_CPUS-1] = BOOT_PERCPU_OFFSET,
};
@@ -125,6 +123,3 @@ void __init setup_per_cpu_areas(void)
/* Setup cpu initialized, callin, callout masks */
setup_cpu_local_masks();
}
-
-#endif
-
diff --git a/arch/x86/mach-voyager/voyager_smp.c b/arch/x86/mach-voyager/voyager_smp.c
index 96f15b0..dd82f20 100644
--- a/arch/x86/mach-voyager/voyager_smp.c
+++ b/arch/x86/mach-voyager/voyager_smp.c
@@ -531,7 +531,6 @@ static void __init do_boot_cpu(__u8 cpu)
stack_start.sp = (void *)idle->thread.sp;
init_gdt(cpu);
- per_cpu(this_cpu_off, cpu) = __per_cpu_offset[cpu];
per_cpu(current_task, cpu) = idle;
early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu);
irq_ctx_init(cpu);
@@ -1749,7 +1748,6 @@ static void __init voyager_smp_prepare_cpus(unsigned int max_cpus)
static void __cpuinit voyager_smp_prepare_boot_cpu(void)
{
init_gdt(smp_processor_id());
- per_cpu(this_cpu_off, cpu) = __per_cpu_offset[cpu];
switch_to_new_gdt();
cpu_set(smp_processor_id(), cpu_online_map);
@@ -1782,7 +1780,6 @@ static void __init voyager_smp_cpus_done(unsigned int max_cpus)
void __init smp_setup_processor_id(void)
{
current_thread_info()->cpu = hard_smp_processor_id();
- percpu_write(cpu_number, hard_smp_processor_id());
}
static void voyager_send_call_func(cpumask_t callmask)
--
1.6.1
next prev parent reply other threads:[~2009-01-26 6:18 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 ` [PATCH 05/12] x86: Move apic variables to apic.c Brian Gerst
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 ` Brian Gerst [this message]
2009-01-26 6:15 ` [PATCH 10/12] x86: Initialize per-cpu GDT segment in per-cpu setup 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-9-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