[IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.
pv_cpu_ops.getreg(_IA64_REG_IP) returned constant. But the returned ip valued should be the one in the caller, not of the callee. This patch fixes that. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:

committed by
Tony Luck

parent
d596410776
commit
93fe10b670
@@ -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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user