diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-02-01 16:16:37 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-02-01 16:16:37 +0000 |
commit | 8ca26118ae6005dda3b996da7d803d95480f1bfd (patch) | |
tree | 3a6e3241c7e7dd216bb1c47e50f4c21ba5200f3d /sys/arch | |
parent | 4bedddaf569c8fde6143d2af9be9ea71ee2e03f7 (diff) |
Add a bunch of XXX on incorrect handling of pv_flags.
None of the noted problems are critical (the code still works), but they
can have a severe impact on the performance and they are all really hard
to fix in an elegant way.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/sparc/pmap.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index e68eaeba339..af1a9d82a56 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.72 2000/02/01 10:34:32 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.73 2000/02/01 16:16:36 art Exp $ */ /* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */ /* @@ -2357,6 +2357,13 @@ pv_changepte4m(pv0, bis, bic) setpgt4m(ptep, tpte); /* Update PV_C4M flag if required */ + /* + * XXX - this is incorrect. The PV_C4M means that _this_ + * mapping should be kept uncached. This way we + * effectively uncache this pa until all mappings + * to it are gone (see also the XXX in pv_link4m and + * pv_unlink4m). + */ if (bis & SRMMU_PG_C) pv->pv_flags |= PV_C4M; if (bic & SRMMU_PG_C) @@ -2489,6 +2496,11 @@ pv_unlink4m(pv, pm, va) /* * Not cached: check to see if we can fix that now. */ + /* + * XXX - This code is incorrect. Even if the bad alias + * has disappeared we keep the PV_ANC flag because + * one of the mappings is not PV_C4M. + */ va = pv->pv_va; for (npv = pv->pv_next; npv != NULL; npv = npv->pv_next) if (BADALIAS(va, npv->pv_va) || @@ -2524,6 +2536,9 @@ retry: pv->pv_next = NULL; pv->pv_pmap = pm; pv->pv_va = va; + /* + * XXX - should we really keep the MOD/REF flags? + */ pv->pv_flags |= nc ? 0 : PV_C4M; return (ret); } @@ -2554,6 +2569,11 @@ retry: ret = SRMMU_PG_C; } else { for (npv = pv; npv != NULL; npv = npv->pv_next) { + /* + * XXX - This code is incorrect. Even when we have + * a bad alias we can fail to set PV_ANC because + * one of the mappings doesn't have PV_C4M set. + */ if ((npv->pv_flags & PV_C4M) == 0) { ret = SRMMU_PG_C; break; |