Commit be012920 authored by Ian Campbell's avatar Ian Campbell Committed by Jeremy Fitzhardinge

xen: re-register runstate area earlier on resume.

This is necessary to ensure the runstate area is available to
xen_sched_clock before any calls to printk which will require it in
order to provide a timestamp.

I chose to pull the xen_setup_runstate_info out of xen_time_init into
the caller in order to maintain parity with calling
xen_setup_runstate_info separately from calling xen_time_resume.
Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stable Kernel <stable@kernel.org>
parent ae788801
...@@ -148,6 +148,8 @@ void xen_vcpu_restore(void) ...@@ -148,6 +148,8 @@ void xen_vcpu_restore(void)
HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL)) HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL))
BUG(); BUG();
xen_setup_runstate_info(cpu);
xen_vcpu_setup(cpu); xen_vcpu_setup(cpu);
if (other_cpu && if (other_cpu &&
......
...@@ -100,7 +100,7 @@ bool xen_vcpu_stolen(int vcpu) ...@@ -100,7 +100,7 @@ bool xen_vcpu_stolen(int vcpu)
return per_cpu(runstate, vcpu).state == RUNSTATE_runnable; return per_cpu(runstate, vcpu).state == RUNSTATE_runnable;
} }
static void setup_runstate_info(int cpu) void xen_setup_runstate_info(int cpu)
{ {
struct vcpu_register_runstate_memory_area area; struct vcpu_register_runstate_memory_area area;
...@@ -442,8 +442,6 @@ void xen_setup_timer(int cpu) ...@@ -442,8 +442,6 @@ void xen_setup_timer(int cpu)
evt->cpumask = cpumask_of(cpu); evt->cpumask = cpumask_of(cpu);
evt->irq = irq; evt->irq = irq;
setup_runstate_info(cpu);
} }
void xen_teardown_timer(int cpu) void xen_teardown_timer(int cpu)
...@@ -494,6 +492,7 @@ __init void xen_time_init(void) ...@@ -494,6 +492,7 @@ __init void xen_time_init(void)
setup_force_cpu_cap(X86_FEATURE_TSC); setup_force_cpu_cap(X86_FEATURE_TSC);
xen_setup_runstate_info(cpu);
xen_setup_timer(cpu); xen_setup_timer(cpu);
xen_setup_cpu_clockevents(); xen_setup_cpu_clockevents();
} }
...@@ -41,6 +41,7 @@ void __init xen_build_dynamic_phys_to_machine(void); ...@@ -41,6 +41,7 @@ void __init xen_build_dynamic_phys_to_machine(void);
void xen_init_irq_ops(void); void xen_init_irq_ops(void);
void xen_setup_timer(int cpu); void xen_setup_timer(int cpu);
void xen_setup_runstate_info(int cpu);
void xen_teardown_timer(int cpu); void xen_teardown_timer(int cpu);
cycle_t xen_clocksource_read(void); cycle_t xen_clocksource_read(void);
void xen_setup_cpu_clockevents(void); void xen_setup_cpu_clockevents(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment