Skip to contentSkip to conversation

x86: call restore_sched_clock_state after %gs is initialized

PATCH Applied Marcelo Tosatti 2 participants 2 messages Mar 21, 2012 – Mar 22, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

arch/x86/power/cpu.c +1 -1
index 0e76a28..0f405d9 100644
@@ -224,13 +224,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
Applied
#1 lore raw
Quoted 6 lines · Marcelo Tosatti

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.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function