21
21
#include <linux/init.h>
22
22
#include <linux/linkage.h>
23
23
24
- /*
25
- * Enable events. This clears the event mask and tests the pending
26
- * event status with one and operation. If there are pending events,
27
- * then enter the hypervisor to get them handled.
28
- */
29
- SYM_FUNC_START(xen_irq_enable_direct)
30
- FRAME_BEGIN
31
- /* Unmask events */
32
- movb $0 , PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask
33
-
34
- /*
35
- * Preempt here doesn't matter because that will deal with any
36
- * pending interrupts. The pending check may end up being run
37
- * on the wrong CPU, but that doesn't hurt.
38
- */
39
-
40
- /* Test for pending */
41
- testb $0xff , PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending
42
- jz 1f
43
-
44
- call check_events
45
- 1:
46
- FRAME_END
47
- ret
48
- SYM_FUNC_END(xen_irq_enable_direct)
49
-
50
-
51
24
/*
52
25
* Disabling events is simply a matter of making the event mask
53
26
* non-zero.
@@ -57,6 +30,8 @@ SYM_FUNC_START(xen_irq_disable_direct)
57
30
ret
58
31
SYM_FUNC_END(xen_irq_disable_direct)
59
32
33
+ .pushsection .noinstr.text, "ax"
34
+
60
35
/*
61
36
* Force an event check by making a hypercall, but preserve regs
62
37
* before making the call.
@@ -86,7 +61,32 @@ SYM_FUNC_START(check_events)
86
61
ret
87
62
SYM_FUNC_END(check_events)
88
63
89
- .pushsection .noinstr.text, "ax"
64
+ /*
65
+ * Enable events. This clears the event mask and tests the pending
66
+ * event status with one and operation. If there are pending events,
67
+ * then enter the hypervisor to get them handled.
68
+ */
69
+ SYM_FUNC_START(xen_irq_enable_direct)
70
+ FRAME_BEGIN
71
+ /* Unmask events */
72
+ movb $0 , PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask
73
+
74
+ /*
75
+ * Preempt here doesn't matter because that will deal with any
76
+ * pending interrupts. The pending check may end up being run
77
+ * on the wrong CPU, but that doesn't hurt.
78
+ */
79
+
80
+ /* Test for pending */
81
+ testb $0xff , PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending
82
+ jz 1f
83
+
84
+ call check_events
85
+ 1:
86
+ FRAME_END
87
+ ret
88
+ SYM_FUNC_END(xen_irq_enable_direct)
89
+
90
90
/*
91
91
* (xen_)save_fl is used to get the current interrupt enable status.
92
92
* Callers expect the status to be in X86_EFLAGS_IF, and other bits
0 commit comments