Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha/include Fix PMAP_SIZEOF() to deal with that t...



details:   https://anonhg.NetBSD.org/src/rev/475692d6196e
branches:  trunk
changeset: 325627:475692d6196e
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Jan 01 16:09:04 2014 +0000

description:
Fix PMAP_SIZEOF() to deal with that the pmap has 0 pmap_asn_info now.
Addresses PR/48488.

diffstat:

 sys/arch/alpha/include/pmap.h |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (24 lines):

diff -r c3644fc291e5 -r 475692d6196e sys/arch/alpha/include/pmap.h
--- a/sys/arch/alpha/include/pmap.h     Wed Jan 01 16:06:35 2014 +0000
+++ b/sys/arch/alpha/include/pmap.h     Wed Jan 01 16:09:04 2014 +0000
@@ -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 @@
 };
 
 /*
- * 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 */
 



Home | Main Index | Thread Index | Old Index