Module Name:    src
Committed By:   matt
Date:           Thu May 17 16:21:46 UTC 2012

Modified Files:
        src/sys/arch/powerpc/include: userret.h

Log Message:
Add an KASSERT to check that PSL_PR is always set.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/include/userret.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/powerpc/include/userret.h
diff -u src/sys/arch/powerpc/include/userret.h:1.22 src/sys/arch/powerpc/include/userret.h:1.23
--- src/sys/arch/powerpc/include/userret.h:1.22	Tue Sep 27 01:02:36 2011
+++ src/sys/arch/powerpc/include/userret.h	Thu May 17 16:21:45 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: userret.h,v 1.22 2011/09/27 01:02:36 jym Exp $	*/
+/*	$NetBSD: userret.h,v 1.23 2012/05/17 16:21:45 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -57,6 +57,10 @@ userret(struct lwp *l, struct trapframe 
 	/* Invoke MI userret code */
 	mi_userret(l);
 
+	KASSERTMSG((tf->tf_srr1 & PSL_PR) != 0,
+	    "tf=%p: srr1 (%#lx): PSL_PR isn't set!",
+	    tf, tf->tf_srr1);
+
 	tf->tf_srr1 &= PSL_USERSRR1;	/* clear SRR1 status bits */
 
 #ifdef ALTIVEC

Reply via email to