diff options
author | Xiantao Zhang <xiantao.zhang@intel.com> | 2008-04-01 02:42:00 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-04-27 05:01:01 -0400 |
commit | e235f3450f5bf94b989746163b7791784a78ee05 (patch) | |
tree | 460b30df8a12e0c3f608da381e7d10075cdeb286 /include/asm-ia64/gcc_intrin.h | |
parent | c71799c1f404c6e4f34fa64e6be39cd6149e5019 (diff) |
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.h | 12 |
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 @@ | |||
21 | 21 | ||
22 | #define ia64_invala_fr(regnum) asm volatile ("invala.e f%0" :: "i"(regnum)) | 22 | #define ia64_invala_fr(regnum) asm volatile ("invala.e f%0" :: "i"(regnum)) |
23 | 23 | ||
24 | #define ia64_flushrs() asm volatile ("flushrs;;":::"memory") | ||
25 | |||
26 | #define ia64_loadrs() asm volatile ("loadrs;;":::"memory") | ||
27 | |||
24 | extern void ia64_bad_param_for_setreg (void); | 28 | extern void ia64_bad_param_for_setreg (void); |
25 | extern void ia64_bad_param_for_getreg (void); | 29 | extern void ia64_bad_param_for_getreg (void); |
26 | 30 | ||
@@ -517,6 +521,14 @@ do { \ | |||
517 | #define ia64_ptrd(addr, size) \ | 521 | #define ia64_ptrd(addr, size) \ |
518 | asm volatile ("ptr.d %0,%1" :: "r"(addr), "r"(size) : "memory") | 522 | asm volatile ("ptr.d %0,%1" :: "r"(addr), "r"(size) : "memory") |
519 | 523 | ||
524 | #define ia64_ttag(addr) \ | ||
525 | ({ \ | ||
526 | __u64 ia64_intri_res; \ | ||
527 | asm volatile ("ttag %0=%1" : "=r"(ia64_intri_res) : "r" (addr)); \ | ||
528 | ia64_intri_res; \ | ||
529 | }) | ||
530 | |||
531 | |||
520 | /* Values for lfhint in ia64_lfetch and ia64_lfetch_fault */ | 532 | /* Values for lfhint in ia64_lfetch and ia64_lfetch_fault */ |
521 | 533 | ||
522 | #define ia64_lfhint_none 0 | 534 | #define ia64_lfhint_none 0 |