summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authormatt <matt@NetBSD.org>2014-01-01 16:09:04 +0000
committermatt <matt@NetBSD.org>2014-01-01 16:09:04 +0000
commit8771ee502f37ae79b67faa9593d8a20ee4e9a45c (patch)
tree20d7c8d36593a8d25476d670c69c4a5598176938 /sys
parentcafe45701accaf46a468cc2eb71989e653c7a0da (diff)
Fix PMAP_SIZEOF() to deal with that the pmap has 0 pmap_asn_info now.
Addresses PR/48488.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/include/pmap.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/arch/alpha/include/pmap.h b/sys/arch/alpha/include/pmap.h
index a6cf725f492..9d445af95d0 100644
--- a/sys/arch/alpha/include/pmap.h
+++ b/sys/arch/alpha/include/pmap.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.78 2013/11/04 19:57:29 christos Exp $ */
+/* $NetBSD: pmap.h,v 1.79 2014/01/01 16:09:04 matt Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -146,12 +146,10 @@ struct pmap {
};
/*
- * Compute the sizeof of a pmap structure. Subtract one because one
- * ASN info structure is already included in the pmap structure itself.
+ * Compute the sizeof of a pmap structure.
*/
#define PMAP_SIZEOF(x) \
- (ALIGN(sizeof(struct pmap) + \
- (sizeof(struct pmap_asn_info) * ((x) - 1))))
+ (ALIGN(offsetof(struct pmap, pm_asni[(x)])))
#define PMAP_ASN_RESERVED 0 /* reserved for Lev1map users */