Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108474
b: refs/heads/master
c: 3122c33
h: refs/heads/master
v: v3
  • Loading branch information
Huang Ying authored and Linus Torvalds committed Aug 15, 2008
1 parent a66d552 commit edf3d9f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bdeb7b5d34f197dea7859d24475943395ffea5e
refs/heads/master: 3122c331190e9d1622bf1c8cf6ce3b17cca67c9e
16 changes: 15 additions & 1 deletion trunk/arch/x86/kernel/machine_kexec_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/init.h>
#include <linux/numa.h>
#include <linux/ftrace.h>
#include <linux/suspend.h>

#include <asm/pgtable.h>
#include <asm/pgalloc.h>
Expand Down Expand Up @@ -113,14 +114,20 @@ void machine_kexec(struct kimage *image)
{
unsigned long page_list[PAGES_NR];
void *control_page;
int save_ftrace_enabled;
asmlinkage unsigned long
(*relocate_kernel_ptr)(unsigned long indirection_page,
unsigned long control_page,
unsigned long start_address,
unsigned int has_pae,
unsigned int preserve_context);

tracer_disable();
#ifdef CONFIG_KEXEC_JUMP
if (kexec_image->preserve_context)
save_processor_state();
#endif

save_ftrace_enabled = __ftrace_enabled_save();

/* Interrupts aren't acceptable while we reboot */
local_irq_disable();
Expand Down Expand Up @@ -178,6 +185,13 @@ void machine_kexec(struct kimage *image)
(unsigned long)page_list,
image->start, cpu_has_pae,
image->preserve_context);

#ifdef CONFIG_KEXEC_JUMP
if (kexec_image->preserve_context)
restore_processor_state();
#endif

__ftrace_enabled_restore(save_ftrace_enabled);
}

void arch_crash_save_vmcoreinfo(void)
Expand Down
2 changes: 0 additions & 2 deletions trunk/kernel/kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,6 @@ int kernel_kexec(void)
error = device_power_down(PMSG_FREEZE);
if (error)
goto Enable_irqs;
save_processor_state();
} else
#endif
{
Expand All @@ -1482,7 +1481,6 @@ int kernel_kexec(void)

#ifdef CONFIG_KEXEC_JUMP
if (kexec_image->preserve_context) {
restore_processor_state();
device_power_up(PMSG_RESTORE);
Enable_irqs:
local_irq_enable();
Expand Down

0 comments on commit edf3d9f

Please sign in to comment.