|
@@ -1,14 +1,8 @@
|
|
/*
|
|
/*
|
|
- * Asm versions of Xen pv-ops, suitable for either direct use or
|
|
|
|
- * inlining. The inline versions are the same as the direct-use
|
|
|
|
- * versions, with the pre- and post-amble chopped off.
|
|
|
|
- *
|
|
|
|
- * This code is encoded for size rather than absolute efficiency, with
|
|
|
|
- * a view to being able to inline as much as possible.
|
|
|
|
|
|
+ * Asm versions of Xen pv-ops, suitable for direct use.
|
|
*
|
|
*
|
|
* We only bother with direct forms (ie, vcpu in percpu data) of the
|
|
* We only bother with direct forms (ie, vcpu in percpu data) of the
|
|
- * operations here; the indirect forms are better handled in C, since
|
|
|
|
- * they're generally too large to inline anyway.
|
|
|
|
|
|
+ * operations here; the indirect forms are better handled in C.
|
|
*/
|
|
*/
|
|
|
|
|
|
#include <asm/asm-offsets.h>
|
|
#include <asm/asm-offsets.h>
|
|
@@ -16,7 +10,7 @@
|
|
#include <asm/processor-flags.h>
|
|
#include <asm/processor-flags.h>
|
|
#include <asm/frame.h>
|
|
#include <asm/frame.h>
|
|
|
|
|
|
-#include "xen-asm.h"
|
|
|
|
|
|
+#include <linux/linkage.h>
|
|
|
|
|
|
/*
|
|
/*
|
|
* Enable events. This clears the event mask and tests the pending
|
|
* Enable events. This clears the event mask and tests the pending
|
|
@@ -38,13 +32,11 @@ ENTRY(xen_irq_enable_direct)
|
|
testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending
|
|
testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending
|
|
jz 1f
|
|
jz 1f
|
|
|
|
|
|
-2: call check_events
|
|
|
|
|
|
+ call check_events
|
|
1:
|
|
1:
|
|
-ENDPATCH(xen_irq_enable_direct)
|
|
|
|
FRAME_END
|
|
FRAME_END
|
|
ret
|
|
ret
|
|
ENDPROC(xen_irq_enable_direct)
|
|
ENDPROC(xen_irq_enable_direct)
|
|
- RELOC(xen_irq_enable_direct, 2b+1)
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -53,10 +45,8 @@ ENDPATCH(xen_irq_enable_direct)
|
|
*/
|
|
*/
|
|
ENTRY(xen_irq_disable_direct)
|
|
ENTRY(xen_irq_disable_direct)
|
|
movb $1, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask
|
|
movb $1, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask
|
|
-ENDPATCH(xen_irq_disable_direct)
|
|
|
|
ret
|
|
ret
|
|
- ENDPROC(xen_irq_disable_direct)
|
|
|
|
- RELOC(xen_irq_disable_direct, 0)
|
|
|
|
|
|
+ENDPROC(xen_irq_disable_direct)
|
|
|
|
|
|
/*
|
|
/*
|
|
* (xen_)save_fl is used to get the current interrupt enable status.
|
|
* (xen_)save_fl is used to get the current interrupt enable status.
|
|
@@ -71,10 +61,8 @@ ENTRY(xen_save_fl_direct)
|
|
testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask
|
|
testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask
|
|
setz %ah
|
|
setz %ah
|
|
addb %ah, %ah
|
|
addb %ah, %ah
|
|
-ENDPATCH(xen_save_fl_direct)
|
|
|
|
ret
|
|
ret
|
|
ENDPROC(xen_save_fl_direct)
|
|
ENDPROC(xen_save_fl_direct)
|
|
- RELOC(xen_save_fl_direct, 0)
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -101,13 +89,11 @@ ENTRY(xen_restore_fl_direct)
|
|
/* check for unmasked and pending */
|
|
/* check for unmasked and pending */
|
|
cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending
|
|
cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending
|
|
jnz 1f
|
|
jnz 1f
|
|
-2: call check_events
|
|
|
|
|
|
+ call check_events
|
|
1:
|
|
1:
|
|
-ENDPATCH(xen_restore_fl_direct)
|
|
|
|
FRAME_END
|
|
FRAME_END
|
|
ret
|
|
ret
|
|
ENDPROC(xen_restore_fl_direct)
|
|
ENDPROC(xen_restore_fl_direct)
|
|
- RELOC(xen_restore_fl_direct, 2b+1)
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
/*
|