mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Glauber Costa <gcosta@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, tglx@linutronix.de, mingo@elte.hu,
	hugh@veritas.com
Subject: [PATCH 14/15] x86: move cpu_exit_clear to process_32.c
Date: Mon,  9 Jun 2008 11:16:57 -0300	[thread overview]
Message-ID: <1213021018-14159-15-git-send-email-gcosta@redhat.com> (raw)
In-Reply-To: <1213021018-14159-14-git-send-email-gcosta@redhat.com>

Take it out of smpboot.c, and move it to process_32.c, closer
to its only user.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
---
 arch/x86/kernel/process_32.c |   16 ++++++++++++++++
 arch/x86/kernel/smpboot.c    |   19 +------------------
 include/asm-x86/numa_32.h    |    1 +
 include/asm-x86/smp.h        |    1 -
 4 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index 1aaca76..99f8e7d 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -128,6 +128,22 @@ EXPORT_SYMBOL(default_idle);
 
 #ifdef CONFIG_HOTPLUG_CPU
 #include <asm/nmi.h>
+
+static void cpu_exit_clear(void)
+{
+	int cpu = raw_smp_processor_id();
+
+	idle_task_exit();
+
+	cpu_uninit();
+	irq_ctx_exit(cpu);
+
+	cpu_clear(cpu, cpu_callout_map);
+	cpu_clear(cpu, cpu_callin_map);
+
+	numa_remove_cpu(cpu);
+}
+
 /* We don't actually take CPU down, just spin without interrupts. */
 static inline void play_dead(void)
 {
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index f6b99b6..7952c39 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -181,7 +181,7 @@ static void map_cpu_to_logical_apicid(void)
 	map_cpu_to_node(cpu, node);
 }
 
-static void numa_remove_cpu(int cpu)
+void numa_remove_cpu(int cpu)
 {
 	cpu_2_logical_apicid[cpu] = BAD_APICID;
 	unmap_cpu_to_node(cpu);
@@ -1229,23 +1229,6 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
 
 #ifdef CONFIG_HOTPLUG_CPU
 
-#  ifdef CONFIG_X86_32
-void cpu_exit_clear(void)
-{
-	int cpu = raw_smp_processor_id();
-
-	idle_task_exit();
-
-	cpu_uninit();
-	irq_ctx_exit(cpu);
-
-	cpu_clear(cpu, cpu_callout_map);
-	cpu_clear(cpu, cpu_callin_map);
-
-	numa_remove_cpu(cpu);
-}
-#  endif /* CONFIG_X86_32 */
-
 static void remove_siblinginfo(int cpu)
 {
 	int sibling;
diff --git a/include/asm-x86/numa_32.h b/include/asm-x86/numa_32.h
index 03d0f7a..205015f 100644
--- a/include/asm-x86/numa_32.h
+++ b/include/asm-x86/numa_32.h
@@ -2,6 +2,7 @@
 #define _ASM_X86_32_NUMA_H 1
 
 extern int pxm_to_nid(int pxm);
+extern void numa_remove_cpu(int cpu);
 
 #ifdef CONFIG_NUMA
 extern void __init remap_numa_kva(void);
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h
index fc10073..fad45f6 100644
--- a/include/asm-x86/smp.h
+++ b/include/asm-x86/smp.h
@@ -188,7 +188,6 @@ static inline int hard_smp_processor_id(void)
 #endif /* CONFIG_X86_LOCAL_APIC */
 
 #ifdef CONFIG_HOTPLUG_CPU
-extern void cpu_exit_clear(void);
 extern void cpu_uninit(void);
 #endif
 
-- 
1.5.4.5


  reply	other threads:[~2008-06-09 14:24 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-09 14:16 [PATCH 0/15] Improve x86 smpboot integration Glauber Costa
2008-06-09 14:16 ` [PATCH 01/15] x86: use stack_start in x86_64 Glauber Costa
2008-06-09 14:16   ` [PATCH 02/15] x86: don't use gdt_page openly Glauber Costa
2008-06-09 14:16     ` [PATCH 03/15] x86: remove early_gdt_descr reference Glauber Costa
2008-06-09 14:16       ` [PATCH 04/15] x86: move x86_64 gdt closer to i386 Glauber Costa
2008-06-09 14:16         ` [PATCH 05/15] x86: use initial_code for i386 Glauber Costa
2008-06-09 14:16           ` [PATCH 06/15] x86: boot secondary cpus through initial_code Glauber Costa
2008-06-09 14:16             ` [PATCH 07/15] x86: clearing io_apic harmless for x86_64 Glauber Costa
2008-06-09 14:16               ` [PATCH 08/15] x86: remove ifdef from stepping Glauber Costa
2008-06-09 14:16                 ` [PATCH 09/15] x86: change __setup_vector_irq with setup_vector_irq Glauber Costa
2008-06-09 14:16                   ` [PATCH 10/15] x86: provide connect_bsp_APIC for x86_64 Glauber Costa
2008-06-09 14:16                     ` [PATCH 11/15] x86: move enabling of io_apic to prepare_cpus Glauber Costa
2008-06-09 14:16                       ` [PATCH 12/15] x86: change naming to match x86_64 Glauber Costa
2008-06-09 14:16                         ` [PATCH 13/15] x86: remove cpu from maps Glauber Costa
2008-06-09 14:16                           ` Glauber Costa [this message]
2008-06-09 14:16                             ` [PATCH 15/15] x86: take load_sp0 out of smpboot.c Glauber Costa
2008-06-09 15:23                       ` [PATCH 11/15] x86: move enabling of io_apic to prepare_cpus Maciej W. Rozycki
2008-06-09 15:52                         ` Glauber Costa
2008-06-09 19:44                         ` Glauber Costa
2008-06-09 20:12                           ` Maciej W. Rozycki
2008-06-09 20:53                             ` Yinghai Lu
2008-06-09 21:00                               ` Maciej W. Rozycki
2008-06-10  2:46                                 ` Maciej W. Rozycki
2008-06-10  5:08                                   ` Yinghai Lu
2008-06-10 13:00                                     ` Glauber Costa
2008-06-10 13:30                                       ` Maciej W. Rozycki
2008-06-10 19:09                                         ` Yinghai Lu
2008-06-10 19:36                                           ` Maciej W. Rozycki
2008-06-10 19:49                                             ` Yinghai Lu
2008-06-11  0:29                                               ` Maciej W. Rozycki
2008-06-11  2:32                                                 ` Yinghai Lu
2008-06-11 12:57                                                   ` Maciej W. Rozycki
2008-06-09 21:02                             ` Glauber Costa
2008-06-09 15:23       ` [PATCH 03/15] x86: remove early_gdt_descr reference James Bottomley
2008-06-09 15:49         ` Glauber Costa
2008-06-09 17:20           ` James Bottomley
2008-06-09 17:23             ` Glauber Costa
2008-06-09 17:40               ` James Bottomley

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=1213021018-14159-15-git-send-email-gcosta@redhat.com \
    --to=gcosta@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®