]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[IA64] pvops: preparation: introduce ia64_set_rr0_to_rr4() to make kernel paravirtual...
authorIsaku Yamahata <yamahata@valinux.co.jp>
Mon, 19 May 2008 13:13:30 +0000 (22:13 +0900)
committerTony Luck <tony.luck@intel.com>
Tue, 27 May 2008 21:38:44 +0000 (14:38 -0700)
make kernel paravirtualization friendly by introducing
ia64_set_rr0_to_rr4().
ia64/Xen will replace setting rr[0-4] with single hypercall later.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
include/asm-ia64/intrinsics.h
include/asm-ia64/mmu_context.h

index f1135b5b94c3df8483f8fc2af0ec32f07b563130..9b83f8f01678462eba91009f5245d703e244a908 100644 (file)
 # include <asm/gcc_intrin.h>
 #endif
 
+#define ia64_set_rr0_to_rr4(val0, val1, val2, val3, val4)      \
+do {                                                           \
+       ia64_set_rr(0x0000000000000000UL, (val0));              \
+       ia64_set_rr(0x2000000000000000UL, (val1));              \
+       ia64_set_rr(0x4000000000000000UL, (val2));              \
+       ia64_set_rr(0x6000000000000000UL, (val3));              \
+       ia64_set_rr(0x8000000000000000UL, (val4));              \
+} while (0)
+
 /*
  * Force an unresolved reference if someone tries to use
  * ia64_fetch_and_add() with a bad value.
index cef2400983fafe3fd1961895a4d355f11a14d34b..040bc87db9304766b5379abefcd563c25aa3c01c 100644 (file)
@@ -152,11 +152,7 @@ reload_context (nv_mm_context_t context)
 #  endif
 #endif
 
-       ia64_set_rr(0x0000000000000000UL, rr0);
-       ia64_set_rr(0x2000000000000000UL, rr1);
-       ia64_set_rr(0x4000000000000000UL, rr2);
-       ia64_set_rr(0x6000000000000000UL, rr3);
-       ia64_set_rr(0x8000000000000000UL, rr4);
+       ia64_set_rr0_to_rr4(rr0, rr1, rr2, rr3, rr4);
        ia64_srlz_i();                  /* srlz.i implies srlz.d */
 }