summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_amap.h
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-11-11 01:16:57 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-11-11 01:16:57 +0000
commit31841b464a8e7abd8403d541b0496303b288f9e8 (patch)
treec5fbafd0a9c0cda0c556bc03fe98bdcd6d087e5c /sys/uvm/uvm_amap.h
parentaffcd7b9c20647deae01d4bd097aec4b5ec81a96 (diff)
Sync in more stuff from NetBSD.
Diffstat (limited to 'sys/uvm/uvm_amap.h')
-rw-r--r--sys/uvm/uvm_amap.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/uvm/uvm_amap.h b/sys/uvm/uvm_amap.h
index 2aff5399dcf..4bdf119d927 100644
--- a/sys/uvm/uvm_amap.h
+++ b/sys/uvm/uvm_amap.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_amap.h,v 1.7 2001/11/07 02:55:50 art Exp $ */
-/* $NetBSD: uvm_amap.h,v 1.13 2000/11/25 06:27:59 chs Exp $ */
+/* $OpenBSD: uvm_amap.h,v 1.8 2001/11/11 01:16:56 art Exp $ */
+/* $NetBSD: uvm_amap.h,v 1.14 2001/02/18 21:19:08 chs Exp $ */
/*
*
@@ -248,15 +248,10 @@ struct vm_amap {
*/
/* AMAP_B2SLOT: convert byte offset to slot */
-#ifdef DIAGNOSTIC
-#define AMAP_B2SLOT(S,B) { \
- if ((B) & (PAGE_SIZE - 1)) \
- panic("AMAP_B2SLOT: invalid byte count"); \
- (S) = (B) >> PAGE_SHIFT; \
+#define AMAP_B2SLOT(S,B) { \
+ KASSERT(((B) & (PAGE_SIZE - 1)) == 0); \
+ (S) = (B) >> PAGE_SHIFT; \
}
-#else
-#define AMAP_B2SLOT(S,B) (S) = (B) >> PAGE_SHIFT
-#endif
/*
* lock/unlock/refs/flags macros