6 Aug 2008 11:55
[PATCH] ARM: VIPT cache coherency fix
Imre Deak <imre.deak <at> teleca.com>
2008-08-06 09:55:25 GMT
2008-08-06 09:55:25 GMT
Currently page loaning (at least) is broken on ARM VIPT platforms.
The reason is that possible dirty cache lines are not taken into account
at the moment, following is a fix for this.
The fix is validated against the latest breakage related to the socket
page loaning reported earlier on the list.
--Imre
diff --git a/sys/arch/arm/arm32/pmap.c b/sys/arch/arm/arm32/pmap.c
index 2b62477..3ed914d 100644
--- a/sys/arch/arm/arm32/pmap.c
+++ b/sys/arch/arm/arm32/pmap.c
<at> <at> -877,6 +877,7 <at> <at> pmap_enter_pv(struct vm_page *pg, struct pv_entry *pve, pmap_t pm,
pg->mdpage.uro_mappings++;
#ifdef PMAP_CACHE_VIPT
+ pmap_vac_me_harder(pg, pm, va);
/*
* If this is an exec mapping and its the first exec mapping
* for this page, make sure to sync the I-cache.
<at> <at> -1833,6 +1834,7 <at> <at> pmap_vac_me_harder(struct vm_page *pg, pmap_t pm, vaddr_t va)
/* Already a conflict? */
if (__predict_false(pg->mdpage.pvh_attrs & PVF_NC)) {
/* just an add, things are already non-cached */
+ KASSERT(!(pg->mdpage.pvh_attrs & PVF_DIRTY));
bad_alias = false;
if (va) {
PMAPCOUNT(vac_color_none);
<at> <at> -1849,17 +1851,21 <at> <at> pmap_vac_me_harder(struct vm_page *pg, pmap_t pm, vaddr_t va)
(Continue reading)
RSS Feed