Use vtopte() instead of pmap_pte().

This commit is contained in:
thorpej 2002-03-24 18:12:54 +00:00
parent 3d1452008e
commit 5ffc15a083
8 changed files with 18 additions and 27 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rpc_machdep.c,v 1.27 2002/03/23 02:22:56 thorpej Exp $ */
/* $NetBSD: rpc_machdep.c,v 1.28 2002/03/24 18:12:54 thorpej Exp $ */
/*
* Copyright (c) 2000-2001 Reinoud Zandijk.
@ -57,7 +57,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.27 2002/03/23 02:22:56 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.28 2002/03/24 18:12:54 thorpej Exp $");
#include <sys/systm.h>
#include <sys/kernel.h>
@ -1098,7 +1098,7 @@ rpc_sa110_cc_setup(void)
(void) pmap_extract(pmap_kernel(), KERNEL_TEXT_BASE, &kaddr);
for (loop = 0; loop < CPU_SA110_CACHE_CLEAN_SIZE; loop += NBPG) {
pte = pmap_pte(pmap_kernel(), (sa110_cc_base + loop));
pte = vtopte(sa110_cc_base + loop);
*pte = L2_PTE(kaddr, AP_KR);
}
sa110_cache_clean_addr = sa110_cc_base;

View File

@ -1,4 +1,4 @@
/* $NetBSD: esc.c,v 1.5 2002/02/18 19:57:09 bjh21 Exp $ */
/* $NetBSD: esc.c,v 1.6 2002/03/24 18:12:54 thorpej Exp $ */
/*
* Copyright (c) 1995 Scott Stevens
@ -55,7 +55,7 @@
#include <sys/param.h>
__RCSID("$NetBSD: esc.c,v 1.5 2002/02/18 19:57:09 bjh21 Exp $");
__RCSID("$NetBSD: esc.c,v 1.6 2002/03/24 18:12:54 thorpej Exp $");
#include <sys/systm.h>
#include <sys/device.h>
@ -76,9 +76,6 @@ __RCSID("$NetBSD: esc.c,v 1.5 2002/02/18 19:57:09 bjh21 Exp $");
#include <acorn32/podulebus/escreg.h>
#include <acorn32/podulebus/escvar.h>
/* Externs */
extern pt_entry_t *pmap_pte __P((pmap_t, vm_offset_t));
void escinitialize __P((struct esc_softc *));
void esc_minphys __P((struct buf *bp));
void esc_scsi_request __P((struct scsipi_channel *,
@ -222,7 +219,7 @@ escinitialize(dev)
* Setup pages to noncachable, that way we don't have to flush the cache
* every time we need "bumped" transfer.
*/
pte = pmap_pte(pmap_kernel(), (vm_offset_t)dev->sc_bump_va);
pte = vtopte((vaddr_t) dev->sc_bump_va);
*pte &= ~PT_C;
cpu_tlb_flushD();
cpu_dcache_wbinv_range((vm_offset_t)dev->sc_bump_va, NBPG);

View File

@ -1,4 +1,4 @@
/* $NetBSD: sfas.c,v 1.4 2002/01/25 19:19:23 thorpej Exp $ */
/* $NetBSD: sfas.c,v 1.5 2002/03/24 18:12:54 thorpej Exp $ */
/*
* Copyright (c) 1995 Scott Stevens
@ -70,9 +70,6 @@
#include <acorn32/podulebus/sfasreg.h>
#include <acorn32/podulebus/sfasvar.h>
/* Externs */
extern pt_entry_t *pmap_pte __P((pmap_t, vm_offset_t));
void sfasinitialize __P((struct sfas_softc *));
void sfas_minphys __P((struct buf *bp));
void sfas_scsi_request __P((struct scsipi_channel *,
@ -206,7 +203,7 @@ sfasinitialize(dev)
* Setup pages to noncachable, that way we don't have to flush the cache
* every time we need "bumped" transfer.
*/
pte = pmap_pte(pmap_kernel(), (vm_offset_t)dev->sc_bump_va);
pte = vtopte((vaddr_t) dev->sc_bump_va);
*pte &= ~(PT_C | PT_B);
cpu_tlb_flushD();
cpu_dcache_wbinv_range((vm_offset_t)dev->sc_bump_va, NBPG);

View File

@ -1,4 +1,4 @@
/* $NetBSD: footbridge_machdep.c,v 1.5 2002/01/05 22:41:48 chris Exp $ */
/* $NetBSD: footbridge_machdep.c,v 1.6 2002/03/24 18:12:55 thorpej Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@ -41,8 +41,6 @@
#include <arm/footbridge/footbridge.h>
#include <arm/footbridge/dc21285mem.h>
extern pt_entry_t *pmap_pte __P((pmap_t pmap, vm_offset_t va));
/*
* For optimal cache cleaning we need two 16K banks of
* virtual address space that NOTHING else will access
@ -76,7 +74,7 @@ footbridge_sa110_cc_setup(void)
/* printf("vaddr=%x addr=%x\n", vaddr, addr);*/
for (loop = 0; loop < cleanarea; loop += NBPG) {
pte = pmap_pte(pmap_kernel(), (addr + loop));
pte = vtopte(addr + loop);
*pte = L2_PTE(DC21285_SA_CACHE_FLUSH_BASE + loop, AP_KR);
}
sa110_cache_clean_addr = addr;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sa11x0_io.c,v 1.6 2002/03/23 19:38:31 thorpej Exp $ */
/* $NetBSD: sa11x0_io.c,v 1.7 2002/03/24 18:12:55 thorpej Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@ -166,7 +166,7 @@ sa11x0_bs_map(t, bpa, size, cacheable, bshp)
for(pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) {
pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE);
pte = pmap_pte(pmap_kernel(), va);
pte = vtopte(va);
if (cacheable)
*pte |= PT_CACHEABLE;
else

View File

@ -1,4 +1,4 @@
/* $NetBSD: obio_space.c,v 1.2 2002/03/19 01:36:13 briggs Exp $ */
/* $NetBSD: obio_space.c,v 1.3 2002/03/24 18:12:55 thorpej Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -168,7 +168,7 @@ obio_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags,
for (pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) {
pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE);
pte = pmap_pte(pmap_kernel(), va);
pte = vtopte(va);
*pte &= ~PT_CACHEABLE;
}
pmap_update(pmap_kernel());

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpc_machdep.c,v 1.39 2002/03/23 02:54:00 thorpej Exp $ */
/* $NetBSD: hpc_machdep.c,v 1.40 2002/03/24 18:12:55 thorpej Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@ -196,7 +196,6 @@ void dumppages(char *, int);
extern int db_trapper();
extern void dump_spl_masks __P((void));
extern pt_entry_t *pmap_pte __P((pmap_t pmap, vaddr_t va));
extern void dumpsys __P((void));
@ -773,7 +772,7 @@ rpc_sa110_cc_setup(void)
(void) pmap_extract(pmap_kernel(), KERNEL_TEXT_BASE, &kaddr);
for (loop = 0; loop < CPU_SA110_CACHE_CLEAN_SIZE; loop += NBPG) {
pte = pmap_pte(pmap_kernel(), (sa110_cc_base + loop));
pte = vtopte(sa110_cc_base + loop);
*pte = L2_PTE(kaddr, AP_KR);
}
sa110_cache_clean_addr = sa110_cc_base;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sa11x0_io.c,v 1.8 2002/03/23 02:54:00 thorpej Exp $ */
/* $NetBSD: sa11x0_io.c,v 1.9 2002/03/24 18:12:55 thorpej Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@ -166,7 +166,7 @@ sa11x0_bs_map(t, bpa, size, cacheable, bshp)
for(pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) {
pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE);
pte = pmap_pte(pmap_kernel(), va);
pte = vtopte(va);
if (cacheable)
*pte |= PT_CACHEABLE;
else