NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-alpha/48488: pmap.h modify cause Kernel Panic on NetBSD/alpha current version.
The following reply was made to PR port-alpha/48488; it has been noted by GNATS.
From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: matt%3am-software.com@localhost
Cc: gnats-bugs%NetBSD.org@localhost, nullnilaki%gmail.com@localhost,
tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: port-alpha/48488: pmap.h modify cause Kernel Panic on NetBSD/alpha
current version.
Date: Thu, 2 Jan 2014 02:56:27 +0900
matt@ wrote:
> On Jan 1, 2014, at 8:59 AM, Izumi Tsutsui
> <tsutsui%ceres.dti.ne.jp@localhost> wrote:
>
> > What about this reference?
> > http://nxr.netbsd.org/xref/src/sys/arch/alpha/alpha/pmap.c?r=1.258#220
> > 220 static struct pmap kernel_pmap_store
> > 221 [(PMAP_SIZEOF(ALPHA_MAXPROCS) + sizeof(struct pmap) - 1)
> > 222 / sizeof(struct pmap)];
>
> That should be fine. Since struct pmap is smaller than
> PMAP_SIZEOF(ALPHA_MAXPROCS) you need more than one pmap struct to store
> that.
Ah, I see the original code intended a larger array was safe.
> I thought of changing that to
> roundup(PMAP_SIZEOF(ALPHA_MAXPROCS), sizeof(struct pmap)).
I have a feeling that using a union of struct pmap and
full-sized PMAP_SIZEOF(ALPHA_MAXPROCS) storage for kernel_pmap_store
would be more readable..
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index