diff options
author | Ian Campbell <Ian.Campbell@citrix.com> | 2009-11-20 19:35:55 -0500 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2009-12-03 14:14:50 -0500 |
commit | be012920ecba161ad20303a3f6d9e96c58cf97c7 (patch) | |
tree | eb14f70bc852829c55fab84e28220f525379c3f2 /arch/x86/xen/time.c | |
parent | ae7888012969355a548372e99b066d9e31153b62 (diff) |
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: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stable Kernel <stable@kernel.org>
Diffstat (limited to 'arch/x86/xen/time.c')
-rw-r--r-- | arch/x86/xen/time.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index 0a5aa44299a5..6bbff94328d2 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c | |||
@@ -100,7 +100,7 @@ bool xen_vcpu_stolen(int vcpu) | |||
100 | return per_cpu(runstate, vcpu).state == RUNSTATE_runnable; | 100 | return per_cpu(runstate, vcpu).state == RUNSTATE_runnable; |
101 | } | 101 | } |
102 | 102 | ||
103 | static void setup_runstate_info(int cpu) | 103 | void xen_setup_runstate_info(int cpu) |
104 | { | 104 | { |
105 | struct vcpu_register_runstate_memory_area area; | 105 | struct vcpu_register_runstate_memory_area area; |
106 | 106 | ||
@@ -442,8 +442,6 @@ void xen_setup_timer(int cpu) | |||
442 | 442 | ||
443 | evt->cpumask = cpumask_of(cpu); | 443 | evt->cpumask = cpumask_of(cpu); |
444 | evt->irq = irq; | 444 | evt->irq = irq; |
445 | |||
446 | setup_runstate_info(cpu); | ||
447 | } | 445 | } |
448 | 446 | ||
449 | void xen_teardown_timer(int cpu) | 447 | void xen_teardown_timer(int cpu) |
@@ -494,6 +492,7 @@ __init void xen_time_init(void) | |||
494 | 492 | ||
495 | setup_force_cpu_cap(X86_FEATURE_TSC); | 493 | setup_force_cpu_cap(X86_FEATURE_TSC); |
496 | 494 | ||
495 | xen_setup_runstate_info(cpu); | ||
497 | xen_setup_timer(cpu); | 496 | xen_setup_timer(cpu); |
498 | xen_setup_cpu_clockevents(); | 497 | xen_setup_cpu_clockevents(); |
499 | } | 498 | } |