• Anton Blanchard's avatar
    powerpc/kexec: Fix kexec when using VMX optimised memcpy · 79c66ce8
    Anton Blanchard authored
    commit b3f271e8 (powerpc: POWER7 optimised memcpy using VMX and
    enhanced prefetch) uses VMX when it is safe to do so (ie not in
    interrupt). It also looks at the task struct to decide if we have to
    save the current tasks' VMX state.
    
    kexec calls memcpy() at a point where the task struct may have been
    overwritten by the new kexec segments. If it has been overwritten
    then when memcpy -> enable_altivec looks up current->thread.regs->msr
    we get a cryptic oops or lockup.
    
    I also notice we aren't initialising thread_info->cpu, which means
    smp_processor_id is broken. Fix that too.
    Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
    Cc: <stable@vger.kernel.org> # 3.6+
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    79c66ce8
machine_kexec_64.c 11.1 KB