Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm32 Add cpu_cpwait() calls after TLB updates ...
details: https://anonhg.NetBSD.org/src/rev/394d4a1736ac
branches: trunk
changeset: 517986:394d4a1736ac
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Nov 22 18:24:43 2001 +0000
description:
Add cpu_cpwait() calls after TLB updates that are not expected to
be followed up by a pmap_update().
diffstat:
sys/arch/arm/arm32/pmap.c | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diffs (113 lines):
diff -r 619121806e7e -r 394d4a1736ac sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Thu Nov 22 17:59:57 2001 +0000
+++ b/sys/arch/arm/arm32/pmap.c Thu Nov 22 18:24:43 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.31 2001/11/19 18:41:32 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.32 2001/11/22 18:24:43 thorpej Exp $ */
/*
* Copyright (c) 2001 Richard Earnshaw
@@ -140,9 +140,9 @@
#include <machine/pmap.h>
#include <machine/pcb.h>
#include <machine/param.h>
-#include <machine/katelib.h>
-
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.31 2001/11/19 18:41:32 thorpej Exp $");
+#include <arm/arm32/katelib.h>
+
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.32 2001/11/22 18:24:43 thorpej Exp $");
#ifdef PMAP_DEBUG
#define PDEBUG(_lev_,_stat_) \
if (pmap_debug_level >= (_lev_)) \
@@ -1871,6 +1871,7 @@
*/
*page_hook0.pte = L2_PTE(phys & PG_FRAME, AP_KRW);
cpu_tlb_flushD_SE(page_hook0.va);
+ cpu_cpwait();
bzero_page(page_hook0.va);
cpu_cache_purgeD_rng(page_hook0.va, NBPG);
}
@@ -1902,7 +1903,8 @@
*/
*page_hook0.pte = L2_PTE(phys & PG_FRAME, AP_KRW);
cpu_tlb_flushD_SE(page_hook0.va);
-
+ cpu_cpwait();
+
for (i = 0, ptr = (int *)page_hook0.va;
i < (NBPG / sizeof(int)); i++) {
if (sched_whichqs != 0) {
@@ -1964,6 +1966,7 @@
*page_hook1.pte = L2_PTE(dest & PG_FRAME, AP_KRW);
cpu_tlb_flushD_SE(page_hook0.va);
cpu_tlb_flushD_SE(page_hook1.va);
+ cpu_cpwait();
bcopy_page(page_hook0.va, page_hook1.va);
cpu_cache_purgeD_rng(page_hook0.va, NBPG);
cpu_cache_purgeD_rng(page_hook1.va, NBPG);
@@ -2288,6 +2291,7 @@
cpu_cache_purgeID();
cpu_tlb_flushID();
}
+ cpu_cpwait();
} else if (entries > 0) {
/*
* Turn cacheing back on for some pages. If it is a kernel
@@ -2519,7 +2523,7 @@
PDEBUG(0, printf("[%p,%08x,%08lx,%08x] ", pmap, *pte,
pv->pv_va, pv->pv_flags));
#ifdef DEBUG
- if (!pmap_pde_page(pmap_pde(pmap, pv->pv_pa)) ||
+ if (!pmap_pde_page(pmap_pde(pmap, pv->pv_va)) ||
!pmap_pte_v(pte) || pmap_pte_pa(pte) != pa)
panic("pmap_remove_all: bad mapping");
#endif /* DEBUG */
@@ -2557,6 +2561,7 @@
PDEBUG(0, printf("done\n"));
cpu_tlb_flushID();
+ cpu_cpwait();
}
@@ -3131,6 +3136,7 @@
pmap_map_in_l1(p->p_vmspace->vm_map.pmap, ALT_PAGE_TBLS_BASE,
pmap->pm_pptpt, FALSE);
cpu_tlb_flushD();
+ cpu_cpwait();
}
PDEBUG(10, printf("page tables base = %p offset=%lx\n", ptp,
((va >> (PGSHIFT-2)) & ~3)));
@@ -3304,6 +3310,7 @@
pmap_map_in_l1(p->p_vmspace->vm_map.pmap, ALT_PAGE_TBLS_BASE,
pmap->pm_pptpt, FALSE);
cpu_tlb_flushD();
+ cpu_cpwait();
return (pt_entry_t *)ALT_PAGE_TBLS_BASE;
}
@@ -3419,6 +3426,7 @@
*/
cpu_tlb_flushID_SE(pv->pv_va);
}
+ cpu_cpwait();
simple_unlock(&pvh->pvh_lock);
PMAP_HEAD_TO_MAP_UNLOCK();
@@ -3563,6 +3571,7 @@
PMAP_HEAD_TO_MAP_UNLOCK();
/* Return, indicating the problem has been dealt with */
cpu_tlb_flushID_SE(va);
+ cpu_cpwait();
return(1);
}
@@ -3611,6 +3620,7 @@
/* Return, indicating the problem has been dealt with */
cpu_tlb_flushID_SE(va);
+ cpu_cpwait();
return(1);
}
Home |
Main Index |
Thread Index |
Old Index