summaryrefslogtreecommitdiff
path: root/include/asm-ia64/gcc_intrin.h
diff options
context:
space:
mode:
authorXiantao Zhang <xiantao.zhang@intel.com>2008-04-01 10:42:00 +0400
committerAvi Kivity <avi@qumranet.com>2008-04-27 13:01:01 +0400
commite235f3450f5bf94b989746163b7791784a78ee05 (patch)
tree460b30df8a12e0c3f608da381e7d10075cdeb286 /include/asm-ia64/gcc_intrin.h
parentc71799c1f404c6e4f34fa64e6be39cd6149e5019 (diff)
downloadlinux-e235f3450f5bf94b989746163b7791784a78ee05.tar.xz
KVM: ia64: Prepare some structure and routines for kvm use
Register structures are defined per SDM. Add three small routines for kernel: ia64_ttag, ia64_loadrs, ia64_flushrs Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include/asm-ia64/gcc_intrin.h')
-rw-r--r--include/asm-ia64/gcc_intrin.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-ia64/gcc_intrin.h b/include/asm-ia64/gcc_intrin.h
index de2ed2cbdd84..2fe292c275fe 100644
--- a/include/asm-ia64/gcc_intrin.h
+++ b/include/asm-ia64/gcc_intrin.h
@@ -21,6 +21,10 @@
#define ia64_invala_fr(regnum) asm volatile ("invala.e f%0" :: "i"(regnum))
+#define ia64_flushrs() asm volatile ("flushrs;;":::"memory")
+
+#define ia64_loadrs() asm volatile ("loadrs;;":::"memory")
+
extern void ia64_bad_param_for_setreg (void);
extern void ia64_bad_param_for_getreg (void);
@@ -517,6 +521,14 @@ do { \
#define ia64_ptrd(addr, size) \
asm volatile ("ptr.d %0,%1" :: "r"(addr), "r"(size) : "memory")
+#define ia64_ttag(addr) \
+({ \
+ __u64 ia64_intri_res; \
+ asm volatile ("ttag %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \
+ ia64_intri_res; \
+})
+
+
/* Values for lfhint in ia64_lfetch and ia64_lfetch_fault */
#define ia64_lfhint_none 0