diff options
Diffstat (limited to 'arch/x86/xen/irq.c')
-rw-r--r-- | arch/x86/xen/irq.c | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/arch/x86/xen/irq.c b/arch/x86/xen/irq.c index 2e8271431e1a..cfd17799bd6d 100644 --- a/arch/x86/xen/irq.c +++ b/arch/x86/xen/irq.c | |||
@@ -19,21 +19,6 @@ void xen_force_evtchn_callback(void) | |||
19 | (void)HYPERVISOR_xen_version(0, NULL); | 19 | (void)HYPERVISOR_xen_version(0, NULL); |
20 | } | 20 | } |
21 | 21 | ||
22 | static void __init __xen_init_IRQ(void) | ||
23 | { | ||
24 | int i; | ||
25 | |||
26 | /* Create identity vector->irq map */ | ||
27 | for(i = 0; i < NR_VECTORS; i++) { | ||
28 | int cpu; | ||
29 | |||
30 | for_each_possible_cpu(cpu) | ||
31 | per_cpu(vector_irq, cpu)[i] = i; | ||
32 | } | ||
33 | |||
34 | xen_init_IRQ(); | ||
35 | } | ||
36 | |||
37 | static unsigned long xen_save_fl(void) | 22 | static unsigned long xen_save_fl(void) |
38 | { | 23 | { |
39 | struct vcpu_info *vcpu; | 24 | struct vcpu_info *vcpu; |
@@ -50,6 +35,7 @@ static unsigned long xen_save_fl(void) | |||
50 | */ | 35 | */ |
51 | return (-flags) & X86_EFLAGS_IF; | 36 | return (-flags) & X86_EFLAGS_IF; |
52 | } | 37 | } |
38 | PV_CALLEE_SAVE_REGS_THUNK(xen_save_fl); | ||
53 | 39 | ||
54 | static void xen_restore_fl(unsigned long flags) | 40 | static void xen_restore_fl(unsigned long flags) |
55 | { | 41 | { |
@@ -76,6 +62,7 @@ static void xen_restore_fl(unsigned long flags) | |||
76 | xen_force_evtchn_callback(); | 62 | xen_force_evtchn_callback(); |
77 | } | 63 | } |
78 | } | 64 | } |
65 | PV_CALLEE_SAVE_REGS_THUNK(xen_restore_fl); | ||
79 | 66 | ||
80 | static void xen_irq_disable(void) | 67 | static void xen_irq_disable(void) |
81 | { | 68 | { |
@@ -86,6 +73,7 @@ static void xen_irq_disable(void) | |||
86 | percpu_read(xen_vcpu)->evtchn_upcall_mask = 1; | 73 | percpu_read(xen_vcpu)->evtchn_upcall_mask = 1; |
87 | preempt_enable_no_resched(); | 74 | preempt_enable_no_resched(); |
88 | } | 75 | } |
76 | PV_CALLEE_SAVE_REGS_THUNK(xen_irq_disable); | ||
89 | 77 | ||
90 | static void xen_irq_enable(void) | 78 | static void xen_irq_enable(void) |
91 | { | 79 | { |
@@ -106,6 +94,7 @@ static void xen_irq_enable(void) | |||
106 | if (unlikely(vcpu->evtchn_upcall_pending)) | 94 | if (unlikely(vcpu->evtchn_upcall_pending)) |
107 | xen_force_evtchn_callback(); | 95 | xen_force_evtchn_callback(); |
108 | } | 96 | } |
97 | PV_CALLEE_SAVE_REGS_THUNK(xen_irq_enable); | ||
109 | 98 | ||
110 | static void xen_safe_halt(void) | 99 | static void xen_safe_halt(void) |
111 | { | 100 | { |
@@ -123,11 +112,13 @@ static void xen_halt(void) | |||
123 | } | 112 | } |
124 | 113 | ||
125 | static const struct pv_irq_ops xen_irq_ops __initdata = { | 114 | static const struct pv_irq_ops xen_irq_ops __initdata = { |
126 | .init_IRQ = __xen_init_IRQ, | 115 | .init_IRQ = xen_init_IRQ, |
127 | .save_fl = xen_save_fl, | 116 | |
128 | .restore_fl = xen_restore_fl, | 117 | .save_fl = PV_CALLEE_SAVE(xen_save_fl), |
129 | .irq_disable = xen_irq_disable, | 118 | .restore_fl = PV_CALLEE_SAVE(xen_restore_fl), |
130 | .irq_enable = xen_irq_enable, | 119 | .irq_disable = PV_CALLEE_SAVE(xen_irq_disable), |
120 | .irq_enable = PV_CALLEE_SAVE(xen_irq_enable), | ||
121 | |||
131 | .safe_halt = xen_safe_halt, | 122 | .safe_halt = xen_safe_halt, |
132 | .halt = xen_halt, | 123 | .halt = xen_halt, |
133 | #ifdef CONFIG_X86_64 | 124 | #ifdef CONFIG_X86_64 |