summaryrefslogtreecommitdiffstats
path: root/arch/ia64/include/asm/paravirt_privop.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/include/asm/paravirt_privop.h')
-rw-r--r--arch/ia64/include/asm/paravirt_privop.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/ia64/include/asm/paravirt_privop.h b/arch/ia64/include/asm/paravirt_privop.h
index d577aac..0b59742 100644
--- a/arch/ia64/include/asm/paravirt_privop.h
+++ b/arch/ia64/include/asm/paravirt_privop.h
@@ -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.
*/
OpenPOWER on IntegriCloud