Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/include Add a check to make sure that if PS...
details: https://anonhg.NetBSD.org/src/rev/c6177e69330d
branches: trunk
changeset: 339220:c6177e69330d
user: matt <matt%NetBSD.org@localhost>
date: Mon Jul 06 02:30:22 2015 +0000
description:
Add a check to make sure that if PSL_FP is set, we own the FPU.
diffstat:
sys/arch/powerpc/include/userret.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r 6fb8c270ba56 -r c6177e69330d sys/arch/powerpc/include/userret.h
--- a/sys/arch/powerpc/include/userret.h Mon Jul 06 01:55:50 2015 +0000
+++ b/sys/arch/powerpc/include/userret.h Mon Jul 06 02:30:22 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: userret.h,v 1.28 2014/03/10 00:04:04 matt Exp $ */
+/* $NetBSD: userret.h,v 1.29 2015/07/06 02:30:22 matt Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -61,6 +61,10 @@
KASSERTMSG((tf->tf_srr1 & PSL_PR) != 0,
"tf=%p: srr1 (%#lx): PSL_PR isn't set!",
tf, tf->tf_srr1);
+ KASSERTMSG((tf->tf_srr1 & PSL_FP) == 0
+ || l->l_cpu->ci_data.cpu_pcu_curlwp[PCU_FPU] == l,
+ "tf=%p: srr1 (%#lx): PSL_FP set but FPU curlwp %p is not curlwp %p!",
+ tf, tf->tf_srr1, l->l_cpu->ci_data.cpu_pcu_curlwp[PCU_FPU], l);
tf->tf_srr1 &= PSL_USERSRR1; /* clear SRR1 status bits */
Home |
Main Index |
Thread Index |
Old Index