summaryrefslogtreecommitdiffstats
path: root/arch/ia64/include/asm/xen/inst.h
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2009-03-04 21:05:39 +0900
committerTony Luck <tony.luck@intel.com>2009-03-26 10:50:32 -0700
commit496203b15b7249599712525c2b6aafe231b4628d (patch)
treeee8c5dbe02b820ac208fe6f3b7982a49a502cc28 /arch/ia64/include/asm/xen/inst.h
parent94752a794ddfdef65289a16627faefa7e2e62d58 (diff)
downloadblackbird-op-linux-496203b15b7249599712525c2b6aafe231b4628d.tar.gz
blackbird-op-linux-496203b15b7249599712525c2b6aafe231b4628d.zip
ia64/pv_ops/xen: paravirtualize read/write ar.itc and ar.itm
paravirtualize ar.itc and ar.itm in order to support save/restore. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/include/asm/xen/inst.h')
-rw-r--r--arch/ia64/include/asm/xen/inst.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/ia64/include/asm/xen/inst.h b/arch/ia64/include/asm/xen/inst.h
index e8e01b28d2ae..90537dc15efe 100644
--- a/arch/ia64/include/asm/xen/inst.h
+++ b/arch/ia64/include/asm/xen/inst.h
@@ -113,6 +113,27 @@
.endm
#define MOV_FROM_PSR(pred, reg, clob) __MOV_FROM_PSR pred, reg, clob
+/* assuming ar.itc is read with interrupt disabled. */
+#define MOV_FROM_ITC(pred, pred_clob, reg, clob) \
+(pred) movl clob = XSI_ITC_OFFSET; \
+ ;; \
+(pred) ld8 clob = [clob]; \
+(pred) mov reg = ar.itc; \
+ ;; \
+(pred) add reg = reg, clob; \
+ ;; \
+(pred) movl clob = XSI_ITC_LAST; \
+ ;; \
+(pred) ld8 clob = [clob]; \
+ ;; \
+(pred) cmp.geu.unc pred_clob, p0 = clob, reg; \
+ ;; \
+(pred_clob) add reg = 1, clob; \
+ ;; \
+(pred) movl clob = XSI_ITC_LAST; \
+ ;; \
+(pred) st8 [clob] = reg
+
#define MOV_TO_IFA(reg, clob) \
movl clob = XSI_IFA; \
OpenPOWER on IntegriCloud