Patrick Wildt
2016-01-24 00:02:49 UTC
Hi,
there are two code points in the v7 pmap where we need the physical
address (to flush secondary cache) and use pmap_extract() instead
of just reading it from the vm page. This diff removes those.
Patrick
diff --git sys/arch/arm/arm/pmap7.c sys/arch/arm/arm/pmap7.c
index 5bcc67b..78969bd 100644
--- sys/arch/arm/arm/pmap7.c
+++ sys/arch/arm/arm/pmap7.c
@@ -1105,11 +1105,9 @@ pmap_clean_page(struct vm_page *pg, int isync)
* now while we still have a valid mapping for it.
*/
if (!wb) {
- paddr_t pa;
cpu_dcache_wb_range(pv->pv_va, PAGE_SIZE);
- if (pmap_extract(pm, (vaddr_t)pv->pv_va, &pa))
- cpu_sdcache_wb_range(pv->pv_va, pa,
- PAGE_SIZE);
+ cpu_sdcache_wb_range(pv->pv_va,
+ VM_PAGE_TO_PHYS(pg), PAGE_SIZE);
wb = TRUE;
}
}
@@ -1126,10 +1124,8 @@ pmap_clean_page(struct vm_page *pg, int isync)
PTE_SYNC(cwb_pte);
cpu_tlb_flushD_SE(cwbp);
cpu_cpwait();
- paddr_t pa;
cpu_dcache_wb_range(cwbp, PAGE_SIZE);
- if (pmap_extract(pmap_kernel(), (vaddr_t)cwbp, &pa))
- cpu_sdcache_wb_range(cwbp, pa, PAGE_SIZE);
+ cpu_sdcache_wb_range(cwbp, VM_PAGE_TO_PHYS(pg), PAGE_SIZE);
}
}
there are two code points in the v7 pmap where we need the physical
address (to flush secondary cache) and use pmap_extract() instead
of just reading it from the vm page. This diff removes those.
Patrick
diff --git sys/arch/arm/arm/pmap7.c sys/arch/arm/arm/pmap7.c
index 5bcc67b..78969bd 100644
--- sys/arch/arm/arm/pmap7.c
+++ sys/arch/arm/arm/pmap7.c
@@ -1105,11 +1105,9 @@ pmap_clean_page(struct vm_page *pg, int isync)
* now while we still have a valid mapping for it.
*/
if (!wb) {
- paddr_t pa;
cpu_dcache_wb_range(pv->pv_va, PAGE_SIZE);
- if (pmap_extract(pm, (vaddr_t)pv->pv_va, &pa))
- cpu_sdcache_wb_range(pv->pv_va, pa,
- PAGE_SIZE);
+ cpu_sdcache_wb_range(pv->pv_va,
+ VM_PAGE_TO_PHYS(pg), PAGE_SIZE);
wb = TRUE;
}
}
@@ -1126,10 +1124,8 @@ pmap_clean_page(struct vm_page *pg, int isync)
PTE_SYNC(cwb_pte);
cpu_tlb_flushD_SE(cwbp);
cpu_cpwait();
- paddr_t pa;
cpu_dcache_wb_range(cwbp, PAGE_SIZE);
- if (pmap_extract(pmap_kernel(), (vaddr_t)cwbp, &pa))
- cpu_sdcache_wb_range(cwbp, pa, PAGE_SIZE);
+ cpu_sdcache_wb_range(cwbp, VM_PAGE_TO_PHYS(pg), PAGE_SIZE);
}
}