[PATCH 4/8] Implement ppc32 variant of __is_user_regs

Anton Vorontsov avorontsov at ru.mvista.com
Sat Nov 28 09:33:44 EST 2009


* tapset/nd_syscalls.stp: Implement ppc32 variant of __is_user_regs.
* tapset/syscalls.stp: Ditto.

Signed-off-by: Anton Vorontsov <avorontsov at ru.mvista.com>
---
 tapset/nd_syscalls.stp |    3 +++
 tapset/syscalls.stp    |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/tapset/nd_syscalls.stp b/tapset/nd_syscalls.stp
index f9a6ffc..e7492a1 100644
--- a/tapset/nd_syscalls.stp
+++ b/tapset/nd_syscalls.stp
@@ -1320,6 +1320,9 @@ function __is_user_regs:long (regs:long)
 #elif defined(__powerpc64__)
 	unsigned long msr = kread(&regs->msr);
 	THIS->__retvalue = ((msr >> MSR_PR_LG) & 0x1);
+#elif defined(__powerpc__)
+	unsigned long msr = kread(&regs->msr);
+	THIS->__retvalue = ((msr >> MSR_PR) != 0);
 #elif defined(__arm__)
 	long cpsr = kread(&regs->ARM_cpsr);
 	THIS->__retvalue = ((cpsr & 0xf) == 0);
diff --git a/tapset/syscalls.stp b/tapset/syscalls.stp
index dde0ca9..430d37f 100644
--- a/tapset/syscalls.stp
+++ b/tapset/syscalls.stp
@@ -1093,6 +1093,9 @@ function __is_user_regs:long (regs:long)
 #elif defined(__powerpc64__)
 	unsigned long msr = kread(&regs->msr);
 	THIS->__retvalue = ((msr >> MSR_PR_LG) & 0x1);
+#elif defined(__powerpc__)
+	unsigned long msr = kread(&regs->msr);
+	THIS->__retvalue = ((msr >> MSR_PR) != 0);
 #elif defined(__arm__)
 	long cpsr = kread(&regs->ARM_cpsr);
 	THIS->__retvalue = ((cpsr & 0xf) == 0);
-- 
1.6.3.3



More information about the Linuxppc-dev mailing list