summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2007-10-16 20:40:04 +0000
committercognet <cognet@FreeBSD.org>2007-10-16 20:40:04 +0000
commit6d62ad229ec8ad8e81d54a0dc41096a44c04c527 (patch)
treef4d29872a6b1c99c93ecbab0bf9b1f4ab6e1c780
parent026e744752183a5a0c84f9204ea5e6fcbf8f8416 (diff)
downloadFreeBSD-src-6d62ad229ec8ad8e81d54a0dc41096a44c04c527.zip
FreeBSD-src-6d62ad229ec8ad8e81d54a0dc41096a44c04c527.tar.gz
Use the direct mapping, if available, for pmap_zero_page_xscale() as well.
-rw-r--r--sys/arm/arm/pmap.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/arm/arm/pmap.c b/sys/arm/arm/pmap.c
index 9dc7243..2dbbe6e 100644
--- a/sys/arm/arm/pmap.c
+++ b/sys/arm/arm/pmap.c
@@ -4114,9 +4114,23 @@ pmap_zero_page_generic(vm_paddr_t phys, int off, int size)
void
pmap_zero_page_xscale(vm_paddr_t phys, int off, int size)
{
+#ifdef ARM_USE_SMALL_ALLOC
+ char *dstpg;
+#endif
+
if (_arm_bzero && size >= _min_bzero_size &&
_arm_bzero((void *)(phys + off), size, IS_PHYSICAL) == 0)
return;
+#ifdef ARM_USE_SMALL_ALLOC
+ dstpg = (char *)arm_ptovirt(phys);
+ if (off || size != PAGE_SIZE) {
+ bzero(dstpg + off, size);
+ cpu_dcache_wbinv_range((vm_offset_t)(dstpg + off), size);
+ } else {
+ bzero_page((vm_offset_t)dstpg);
+ cpu_dcache_wbinv_range((vm_offset_t)dstpg, PAGE_SIZE);
+ }
+#else
mtx_lock(&cmtx);
/*
* Hook in the page, zero it, and purge the cache for that
@@ -4134,6 +4148,7 @@ pmap_zero_page_xscale(vm_paddr_t phys, int off, int size)
bzero_page(cdstp);
mtx_unlock(&cmtx);
xscale_cache_clean_minidata();
+#endif
}
/*
OpenPOWER on IntegriCloud