summaryrefslogtreecommitdiffstats
path: root/sys/vm/device_pager.c
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1999-01-08 17:31:30 +0000
committereivind <eivind@FreeBSD.org>1999-01-08 17:31:30 +0000
commita8dc66f457be84eefbe16e70c901ceb11137ba65 (patch)
treee5747f527c552fa90334c779c047697b372582fb /sys/vm/device_pager.c
parent1c69824749ed0aa6efce159d39ab3f17fc9e25f2 (diff)
downloadFreeBSD-src-a8dc66f457be84eefbe16e70c901ceb11137ba65.zip
FreeBSD-src-a8dc66f457be84eefbe16e70c901ceb11137ba65.tar.gz
Split DIAGNOSTIC -> DIAGNOSTIC, INVARIANTS, and INVARIANT_SUPPORT as
discussed on -hackers. Introduce 'KASSERT(assertion, ("panic message", args))' for simple check + panic. Reviewed by: msmith
Diffstat (limited to 'sys/vm/device_pager.c')
-rw-r--r--sys/vm/device_pager.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c
index 4459b4c..a200b9c 100644
--- a/sys/vm/device_pager.c
+++ b/sys/vm/device_pager.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)device_pager.c 8.1 (Berkeley) 6/11/93
- * $Id: device_pager.c,v 1.35 1998/11/08 12:39:07 dfr Exp $
+ * $Id: device_pager.c,v 1.36 1998/12/07 21:58:50 archie Exp $
*/
#include <sys/param.h>
@@ -208,10 +208,7 @@ dev_pager_getpages(object, m, count, reqpage)
panic("dev_pager_getpage: no map function");
paddr = pmap_phys_address((*mapfunc) ((dev_t) dev, (vm_offset_t) offset << PAGE_SHIFT, prot));
-#ifdef DIAGNOSTIC
- if (paddr == -1)
- panic("dev_pager_getpage: map function returns error");
-#endif
+ KASSERT(paddr != -1,("dev_pager_getpage: map function returns error"));
/*
* Replace the passed in reqpage page with our own fake page and free up the
* all of the original pages.
OpenPOWER on IntegriCloud