aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/smpboot.c
diff options
context:
space:
mode:
authorAshok Raj <ashok.raj@intel.com>2005-06-25 17:54:58 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:30 -0400
commite6982c671c560da4a0bc5c908cbcbec12bd5991d (patch)
tree38e317c28afbde68d431ae139e9e943e5a818b06 /arch/x86_64/kernel/smpboot.c
parent52a119feaad92d44a0e97d01b22afbcbaf3fc079 (diff)
[PATCH] x86_64: Change init sections for CPU hotplug support
This patch adds __cpuinit and __cpuinitdata sections that need to exist past boot to support cpu hotplug. Caveat: This is done *only* for EM64T CPU Hotplug support, on request from Andi Kleen. Much of the generic hotplug code in kernel, and none of the other archs that support CPU hotplug today, i386, ia64, ppc64, s390 and parisc dont mark sections with __cpuinit, but only mark them as __devinit, and __devinitdata. If someone is motivated to change generic code, we need to make sure all existing hotplug code does not break, on other arch's that dont use __cpuinit, and __cpudevinit. Signed-off-by: Ashok Raj <ashok.raj@intel.com> Acked-by: Andi Kleen <ak@muc.de> Acked-by: Zwane Mwaikambo <zwane@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/smpboot.c')
-rw-r--r--arch/x86_64/kernel/smpboot.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
index f1ec0f345941..bc98a6722cba 100644
--- a/arch/x86_64/kernel/smpboot.c
+++ b/arch/x86_64/kernel/smpboot.c
@@ -58,11 +58,6 @@
58#include <asm/proto.h> 58#include <asm/proto.h>
59#include <asm/nmi.h> 59#include <asm/nmi.h>
60 60
61/* Change for real CPU hotplug. Note other files need to be fixed
62 first too. */
63#define __cpuinit __init
64#define __cpuinitdata __initdata
65
66/* Number of siblings per CPU package */ 61/* Number of siblings per CPU package */
67int smp_num_siblings = 1; 62int smp_num_siblings = 1;
68/* Package ID of each logical CPU */ 63/* Package ID of each logical CPU */
@@ -823,7 +818,7 @@ static __cpuinit void smp_cleanup_boot(void)
823 * 818 *
824 * RED-PEN audit/test this more. I bet there is more state messed up here. 819 * RED-PEN audit/test this more. I bet there is more state messed up here.
825 */ 820 */
826static __cpuinit void disable_smp(void) 821static __init void disable_smp(void)
827{ 822{
828 cpu_present_map = cpumask_of_cpu(0); 823 cpu_present_map = cpumask_of_cpu(0);
829 cpu_possible_map = cpumask_of_cpu(0); 824 cpu_possible_map = cpumask_of_cpu(0);
@@ -838,7 +833,7 @@ static __cpuinit void disable_smp(void)
838/* 833/*
839 * Handle user cpus=... parameter. 834 * Handle user cpus=... parameter.
840 */ 835 */
841static __cpuinit void enforce_max_cpus(unsigned max_cpus) 836static __init void enforce_max_cpus(unsigned max_cpus)
842{ 837{
843 int i, k; 838 int i, k;
844 k = 0; 839 k = 0;
@@ -855,7 +850,7 @@ static __cpuinit void enforce_max_cpus(unsigned max_cpus)
855/* 850/*
856 * Various sanity checks. 851 * Various sanity checks.
857 */ 852 */
858static int __cpuinit smp_sanity_check(unsigned max_cpus) 853static int __init smp_sanity_check(unsigned max_cpus)
859{ 854{
860 if (!physid_isset(hard_smp_processor_id(), phys_cpu_present_map)) { 855 if (!physid_isset(hard_smp_processor_id(), phys_cpu_present_map)) {
861 printk("weird, boot CPU (#%d) not listed by the BIOS.\n", 856 printk("weird, boot CPU (#%d) not listed by the BIOS.\n",
@@ -913,7 +908,7 @@ static int __cpuinit smp_sanity_check(unsigned max_cpus)
913 * Prepare for SMP bootup. The MP table or ACPI has been read 908 * Prepare for SMP bootup. The MP table or ACPI has been read
914 * earlier. Just do some sanity checking here and enable APIC mode. 909 * earlier. Just do some sanity checking here and enable APIC mode.
915 */ 910 */
916void __cpuinit smp_prepare_cpus(unsigned int max_cpus) 911void __init smp_prepare_cpus(unsigned int max_cpus)
917{ 912{
918 int i; 913 int i;
919 914
@@ -1019,7 +1014,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
1019/* 1014/*
1020 * Finish the SMP boot. 1015 * Finish the SMP boot.
1021 */ 1016 */
1022void __cpuinit smp_cpus_done(unsigned int max_cpus) 1017void __init smp_cpus_done(unsigned int max_cpus)
1023{ 1018{
1024 zap_low_mappings(); 1019 zap_low_mappings();
1025 smp_cleanup_boot(); 1020 smp_cleanup_boot();