1 Jan 2010 06:50
pmap - VIPT PVF_DIRTY condition in pmap_enter()
Masao Uebayashi <uebayasi <at> tombi.co.jp>
2010-01-01 05:50:01 GMT
2010-01-01 05:50:01 GMT
pmap_enter() has this:
892 #ifdef PMAP_CACHE_VIPT
:
895 if ((pg->mdpage.pvh_attrs & (PVF_DMOD|PVF_NC)) != PVF_NC)
896 pg->mdpage.pvh_attrs |= PVF_DIRTY;
897 KASSERT((pg->mdpage.pvh_attrs & PVF_DMOD) == 0 || \
(pg->mdpage.pvh_attrs & (PVF_DIRTY|PVF_NC)));
898 #endif
According to the log Rev. 1.185, the intention was to set PVF_DIRTY only for
cached & dirty pages. The above "if" is equivalent to:
if ((pg->mdpage.pvh_attrs & (PVF_DMOD|PVF_NC)) == PVF_NC)
;
else
pg->mdpage.pvh_attrs |= PVF_DIRTY;
which means:
cached? modiified?
n 0 -
n 1 DIRTY
y 0 DIRTY
y 1 DIRTY
I think this should be:
cached? modiified?
n 0 -
(Continue reading)
RSS Feed