]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ia64/include/asm/paravirt_privop.h
[IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.
[linux-2.6-omap-h63xx.git] / arch / ia64 / include / asm / paravirt_privop.h
index d577aac1183571c02db0f527e899495c1bf29cdb..0b597424fcfcfd825e8f72bde2d3290fd218e75f 100644 (file)
@@ -78,6 +78,19 @@ extern unsigned long ia64_native_getreg_func(int regnum);
                        ia64_native_rsm(mask);  \
        } while (0)
 
+/* returned ip value should be the one in the caller,
+ * not in __paravirt_getreg() */
+#define paravirt_getreg(reg)                                   \
+       ({                                                      \
+               unsigned long res;                              \
+               BUILD_BUG_ON(!__builtin_constant_p(reg));       \
+               if ((reg) == _IA64_REG_IP)                      \
+                       res = ia64_native_getreg(_IA64_REG_IP); \
+               else                                            \
+                       res = pv_cpu_ops.getreg(reg);           \
+               res;                                            \
+       })
+
 /******************************************************************************
  * replacement of hand written assembly codes.
  */