-/* $OpenBSD: pmap.c,v 1.216 2021/09/06 12:59:59 mpi Exp $ */
+/* $OpenBSD: pmap.c,v 1.217 2021/09/11 18:08:32 kettenis Exp $ */
/* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */
/*
{
pt_entry_t *ptes, pte;
+ ptes = pmap_map_ptes_86(pmap);
if (pmap_valid_entry(PDE(pmap, pdei(va)))) {
- ptes = pmap_map_ptes_86(pmap);
pte = ptes[atop(va)];
pmap_unmap_ptes_86(pmap);
if (!pmap_valid_entry(pte))
*pap = (pte & PG_FRAME) | (va & ~PG_FRAME);
return 1;
}
+ pmap_unmap_ptes_86(pmap);
return 0;
}
-/* $OpenBSD: pmapae.c,v 1.64 2021/09/06 12:59:59 mpi Exp $ */
+/* $OpenBSD: pmapae.c,v 1.65 2021/09/11 18:08:32 kettenis Exp $ */
/*
* Copyright (c) 2006-2008 Michael Shalayeff
{
pt_entry_t *ptes, pte;
+ ptes = pmap_map_ptes_pae(pmap);
if (pmap_valid_entry(PDE(pmap, pdei(va)))) {
- ptes = pmap_map_ptes_pae(pmap);
pte = ptes[atop(va)];
pmap_unmap_ptes_pae(pmap);
if (!pmap_valid_entry(pte))
*pap = (pte & PG_FRAME) | (va & ~PG_FRAME);
return 1;
}
+ pmap_unmap_ptes_pae(pmap);
return 0;
}