diff options
| author | Len Brown <len.brown@intel.com> | 2009-04-05 02:14:15 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2009-04-05 02:14:15 -0400 |
| commit | 478c6a43fcbc6c11609f8cee7c7b57223907754f (patch) | |
| tree | a7f7952099da60d33032aed6de9c0c56c9f8779e /kernel/kexec.c | |
| parent | 8a3f257c704e02aee9869decd069a806b45be3f1 (diff) | |
| parent | 6bb597507f9839b13498781e481f5458aea33620 (diff) | |
Merge branch 'linus' into release
Conflicts:
arch/x86/kernel/cpu/cpufreq/longhaul.c
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'kernel/kexec.c')
| -rw-r--r-- | kernel/kexec.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c index 483899578259..5a758c6e4950 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | note_buf_t* crash_notes; | 42 | note_buf_t* crash_notes; |
| 43 | 43 | ||
| 44 | /* vmcoreinfo stuff */ | 44 | /* vmcoreinfo stuff */ |
| 45 | unsigned char vmcoreinfo_data[VMCOREINFO_BYTES]; | 45 | static unsigned char vmcoreinfo_data[VMCOREINFO_BYTES]; |
| 46 | u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4]; | 46 | u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4]; |
| 47 | size_t vmcoreinfo_size; | 47 | size_t vmcoreinfo_size; |
| 48 | size_t vmcoreinfo_max_size = sizeof(vmcoreinfo_data); | 48 | size_t vmcoreinfo_max_size = sizeof(vmcoreinfo_data); |
| @@ -1130,7 +1130,7 @@ void crash_save_cpu(struct pt_regs *regs, int cpu) | |||
| 1130 | return; | 1130 | return; |
| 1131 | memset(&prstatus, 0, sizeof(prstatus)); | 1131 | memset(&prstatus, 0, sizeof(prstatus)); |
| 1132 | prstatus.pr_pid = current->pid; | 1132 | prstatus.pr_pid = current->pid; |
| 1133 | elf_core_copy_regs(&prstatus.pr_reg, regs); | 1133 | elf_core_copy_kernel_regs(&prstatus.pr_reg, regs); |
| 1134 | buf = append_elf_note(buf, KEXEC_CORE_NOTE_NAME, NT_PRSTATUS, | 1134 | buf = append_elf_note(buf, KEXEC_CORE_NOTE_NAME, NT_PRSTATUS, |
| 1135 | &prstatus, sizeof(prstatus)); | 1135 | &prstatus, sizeof(prstatus)); |
| 1136 | final_note(buf); | 1136 | final_note(buf); |
| @@ -1409,6 +1409,7 @@ static int __init crash_save_vmcoreinfo_init(void) | |||
| 1409 | VMCOREINFO_OFFSET(list_head, prev); | 1409 | VMCOREINFO_OFFSET(list_head, prev); |
| 1410 | VMCOREINFO_OFFSET(vm_struct, addr); | 1410 | VMCOREINFO_OFFSET(vm_struct, addr); |
| 1411 | VMCOREINFO_LENGTH(zone.free_area, MAX_ORDER); | 1411 | VMCOREINFO_LENGTH(zone.free_area, MAX_ORDER); |
| 1412 | log_buf_kexec_setup(); | ||
| 1412 | VMCOREINFO_LENGTH(free_area.free_list, MIGRATE_TYPES); | 1413 | VMCOREINFO_LENGTH(free_area.free_list, MIGRATE_TYPES); |
| 1413 | VMCOREINFO_NUMBER(NR_FREE_PAGES); | 1414 | VMCOREINFO_NUMBER(NR_FREE_PAGES); |
| 1414 | VMCOREINFO_NUMBER(PG_lru); | 1415 | VMCOREINFO_NUMBER(PG_lru); |
| @@ -1450,11 +1451,7 @@ int kernel_kexec(void) | |||
| 1450 | error = device_suspend(PMSG_FREEZE); | 1451 | error = device_suspend(PMSG_FREEZE); |
| 1451 | if (error) | 1452 | if (error) |
| 1452 | goto Resume_console; | 1453 | goto Resume_console; |
| 1453 | error = disable_nonboot_cpus(); | ||
| 1454 | if (error) | ||
| 1455 | goto Resume_devices; | ||
| 1456 | device_pm_lock(); | 1454 | device_pm_lock(); |
| 1457 | local_irq_disable(); | ||
| 1458 | /* At this point, device_suspend() has been called, | 1455 | /* At this point, device_suspend() has been called, |
| 1459 | * but *not* device_power_down(). We *must* | 1456 | * but *not* device_power_down(). We *must* |
| 1460 | * device_power_down() now. Otherwise, drivers for | 1457 | * device_power_down() now. Otherwise, drivers for |
| @@ -1464,12 +1461,15 @@ int kernel_kexec(void) | |||
| 1464 | */ | 1461 | */ |
| 1465 | error = device_power_down(PMSG_FREEZE); | 1462 | error = device_power_down(PMSG_FREEZE); |
| 1466 | if (error) | 1463 | if (error) |
| 1467 | goto Enable_irqs; | 1464 | goto Resume_devices; |
| 1468 | 1465 | error = disable_nonboot_cpus(); | |
| 1466 | if (error) | ||
| 1467 | goto Enable_cpus; | ||
| 1468 | local_irq_disable(); | ||
| 1469 | /* Suspend system devices */ | 1469 | /* Suspend system devices */ |
| 1470 | error = sysdev_suspend(PMSG_FREEZE); | 1470 | error = sysdev_suspend(PMSG_FREEZE); |
| 1471 | if (error) | 1471 | if (error) |
| 1472 | goto Power_up_devices; | 1472 | goto Enable_irqs; |
| 1473 | } else | 1473 | } else |
| 1474 | #endif | 1474 | #endif |
| 1475 | { | 1475 | { |
| @@ -1483,13 +1483,13 @@ int kernel_kexec(void) | |||
| 1483 | #ifdef CONFIG_KEXEC_JUMP | 1483 | #ifdef CONFIG_KEXEC_JUMP |
| 1484 | if (kexec_image->preserve_context) { | 1484 | if (kexec_image->preserve_context) { |
| 1485 | sysdev_resume(); | 1485 | sysdev_resume(); |
| 1486 | Power_up_devices: | ||
| 1487 | device_power_up(PMSG_RESTORE); | ||
| 1488 | Enable_irqs: | 1486 | Enable_irqs: |
| 1489 | local_irq_enable(); | 1487 | local_irq_enable(); |
| 1490 | device_pm_unlock(); | 1488 | Enable_cpus: |
| 1491 | enable_nonboot_cpus(); | 1489 | enable_nonboot_cpus(); |
| 1490 | device_power_up(PMSG_RESTORE); | ||
| 1492 | Resume_devices: | 1491 | Resume_devices: |
| 1492 | device_pm_unlock(); | ||
| 1493 | device_resume(PMSG_RESTORE); | 1493 | device_resume(PMSG_RESTORE); |
| 1494 | Resume_console: | 1494 | Resume_console: |
| 1495 | resume_console(); | 1495 | resume_console(); |
