diff options
Diffstat (limited to 'arch/i386/kernel/smpboot.c')
-rw-r--r-- | arch/i386/kernel/smpboot.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index eba7f53f8b4a..7007e1783797 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -1029,6 +1029,16 @@ int __devinit smp_prepare_cpu(int cpu) | |||
1029 | int apicid, ret; | 1029 | int apicid, ret; |
1030 | 1030 | ||
1031 | lock_cpu_hotplug(); | 1031 | lock_cpu_hotplug(); |
1032 | |||
1033 | /* | ||
1034 | * On x86, CPU0 is never offlined. Trying to bring up an | ||
1035 | * already-booted CPU will hang. So check for that case. | ||
1036 | */ | ||
1037 | if (cpu_online(cpu)) { | ||
1038 | ret = -EINVAL; | ||
1039 | goto exit; | ||
1040 | } | ||
1041 | |||
1032 | apicid = x86_cpu_to_apicid[cpu]; | 1042 | apicid = x86_cpu_to_apicid[cpu]; |
1033 | if (apicid == BAD_APICID) { | 1043 | if (apicid == BAD_APICID) { |
1034 | ret = -ENODEV; | 1044 | ret = -ENODEV; |