aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-02-18 14:18:57 -0500
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-03-30 02:36:01 -0400
commit224101ed69d3fbb486868e0f6e0f9fa37302efb4 (patch)
tree46830842a99659421eeabee65d299ab4c3b59f28 /arch/x86/xen/enlighten.c
parentb407fc57b815b2016186220baabc76cc8264206e (diff)
x86/paravirt: finish change from lazy cpu to context switch start/end
Impact: fix lazy context switch API Pass the previous and next tasks into the context switch start end calls, so that the called functions can properly access the task state (esp in end_context_switch, in which the next task is not yet completely current). Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r--arch/x86/xen/enlighten.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index f586e63b9a63..70b355d3a86c 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -203,10 +203,10 @@ static unsigned long xen_get_debugreg(int reg)
203 return HYPERVISOR_get_debugreg(reg); 203 return HYPERVISOR_get_debugreg(reg);
204} 204}
205 205
206static void xen_leave_lazy_cpu(void) 206static void xen_end_context_switch(struct task_struct *next)
207{ 207{
208 xen_mc_flush(); 208 xen_mc_flush();
209 paravirt_leave_lazy_cpu(); 209 paravirt_end_context_switch(next);
210} 210}
211 211
212static unsigned long xen_store_tr(void) 212static unsigned long xen_store_tr(void)
@@ -817,10 +817,8 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = {
817 /* Xen takes care of %gs when switching to usermode for us */ 817 /* Xen takes care of %gs when switching to usermode for us */
818 .swapgs = paravirt_nop, 818 .swapgs = paravirt_nop,
819 819
820 .lazy_mode = { 820 .start_context_switch = paravirt_start_context_switch,
821 .enter = paravirt_enter_lazy_cpu, 821 .end_context_switch = xen_end_context_switch,
822 .leave = xen_leave_lazy_cpu,
823 },
824}; 822};
825 823
826static const struct pv_apic_ops xen_apic_ops __initdata = { 824static const struct pv_apic_ops xen_apic_ops __initdata = {