Skip to content

Commit

Permalink
x86, kvm: Call restore_sched_clock_state() only after %gs is initialized
Browse files Browse the repository at this point in the history
s2ram broke due to this KVM commit:

  b74f05d x86: kvmclock: abstract save/restore sched_clock_state

restore_sched_clock_state() methods use percpu data, therefore
they must run after %gs is initialized, but before mtrr_bp_restore()
(due to lockstat using sched_clock).

Move it to the correct place.

Reported-and-tested-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Marcelo Tosatti authored and Ingo Molnar committed Apr 2, 2012
1 parent c0e9afc commit dba69d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/power/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@ static void __restore_processor_state(struct saved_context *ctxt)
fix_processor_context();

do_fpu_end();
x86_platform.restore_sched_clock_state();
mtrr_bp_restore();
}

/* Needed by apm.c */
void restore_processor_state(void)
{
x86_platform.restore_sched_clock_state();
__restore_processor_state(&saved_context);
}
#ifdef CONFIG_X86_32
Expand Down

0 comments on commit dba69d1

Please sign in to comment.