diff options
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index c414cee296ba..28b4287296aa 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -1402,6 +1402,29 @@ void native_cpu_die(unsigned int cpu) | |||
1402 | } | 1402 | } |
1403 | printk(KERN_ERR "CPU %u didn't die...\n", cpu); | 1403 | printk(KERN_ERR "CPU %u didn't die...\n", cpu); |
1404 | } | 1404 | } |
1405 | |||
1406 | void play_dead_common(void) | ||
1407 | { | ||
1408 | idle_task_exit(); | ||
1409 | reset_lazy_tlbstate(); | ||
1410 | irq_ctx_exit(raw_smp_processor_id()); | ||
1411 | |||
1412 | mb(); | ||
1413 | /* Ack it */ | ||
1414 | __get_cpu_var(cpu_state) = CPU_DEAD; | ||
1415 | |||
1416 | /* | ||
1417 | * With physical CPU hotplug, we should halt the cpu | ||
1418 | */ | ||
1419 | local_irq_disable(); | ||
1420 | } | ||
1421 | |||
1422 | void native_play_dead(void) | ||
1423 | { | ||
1424 | play_dead_common(); | ||
1425 | wbinvd_halt(); | ||
1426 | } | ||
1427 | |||
1405 | #else /* ... !CONFIG_HOTPLUG_CPU */ | 1428 | #else /* ... !CONFIG_HOTPLUG_CPU */ |
1406 | int native_cpu_disable(void) | 1429 | int native_cpu_disable(void) |
1407 | { | 1430 | { |
@@ -1413,4 +1436,10 @@ void native_cpu_die(unsigned int cpu) | |||
1413 | /* We said "no" in __cpu_disable */ | 1436 | /* We said "no" in __cpu_disable */ |
1414 | BUG(); | 1437 | BUG(); |
1415 | } | 1438 | } |
1439 | |||
1440 | void native_play_dead(void) | ||
1441 | { | ||
1442 | BUG(); | ||
1443 | } | ||
1444 | |||
1416 | #endif | 1445 | #endif |