From b3c3c1cf49ec82ec7bc86b70f990eb09885a328e Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Sun, 12 May 2013 15:04:53 +0000 Subject: [PATCH] --- yaml --- r: 375557 b: refs/heads/master c: 79c66ce8f6448a3295a32efeac88c9debd7f7094 h: refs/heads/master i: 375555: 3bcf18f75dcd17bd915379f711479f33890763a9 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/machine_kexec_64.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 8084cedecf1f..8debfe050bb9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 83d5e64b7efa7f39b10ff5e92792e807a720289c +refs/heads/master: 79c66ce8f6448a3295a32efeac88c9debd7f7094 diff --git a/trunk/arch/powerpc/kernel/machine_kexec_64.c b/trunk/arch/powerpc/kernel/machine_kexec_64.c index 466a2908bb63..611acdf30096 100644 --- a/trunk/arch/powerpc/kernel/machine_kexec_64.c +++ b/trunk/arch/powerpc/kernel/machine_kexec_64.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -335,10 +336,13 @@ void default_machine_kexec(struct kimage *image) pr_debug("kexec: Starting switchover sequence.\n"); /* switch to a staticly allocated stack. Based on irq stack code. + * We setup preempt_count to avoid using VMX in memcpy. * XXX: the task struct will likely be invalid once we do the copy! */ kexec_stack.thread_info.task = current_thread_info()->task; kexec_stack.thread_info.flags = 0; + kexec_stack.thread_info.preempt_count = HARDIRQ_OFFSET; + kexec_stack.thread_info.cpu = current_thread_info()->cpu; /* We need a static PACA, too; copy this CPU's PACA over and switch to * it. Also poison per_cpu_offset to catch anyone using non-static