diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mvme88k/include/mmu.h | 15 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/locore_asm_routines.S | 16 |
2 files changed, 14 insertions, 17 deletions
diff --git a/sys/arch/mvme88k/include/mmu.h b/sys/arch/mvme88k/include/mmu.h index 1eec4ecc5aa..bd1e445af9b 100644 --- a/sys/arch/mvme88k/include/mmu.h +++ b/sys/arch/mvme88k/include/mmu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mmu.h,v 1.23 2003/10/13 18:45:16 miod Exp $ */ +/* $OpenBSD: mmu.h,v 1.24 2003/11/08 21:45:18 miod Exp $ */ /* * This file bears almost no resemblance to the original m68k file, @@ -230,7 +230,18 @@ typedef u_int32_t pt_ind_entry_t; #define DMA_CACHE_SYNC_INVAL 0x2 #define DMA_CACHE_INV 0x3 -pt_entry_t invalidate_pte(pt_entry_t *); +static pt_entry_t invalidate_pte(pt_entry_t *); +static __inline__ pt_entry_t +invalidate_pte(pt_entry_t *pte) +{ + pt_entry_t oldpte; + + oldpte = PG_NV; + __asm__ __volatile__ + ("xmem %0, %2, r0" : "=r"(oldpte) : "0"(oldpte), "r"(pte)); + __asm__ __volatile__ ("tb1 0, r0, 0"); + return oldpte; +} extern vaddr_t kmapva; diff --git a/sys/arch/mvme88k/mvme88k/locore_asm_routines.S b/sys/arch/mvme88k/mvme88k/locore_asm_routines.S index 17c10b5e2d4..d05e7504bd8 100644 --- a/sys/arch/mvme88k/mvme88k/locore_asm_routines.S +++ b/sys/arch/mvme88k/mvme88k/locore_asm_routines.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore_asm_routines.S,v 1.26 2003/11/03 06:54:26 david Exp $ */ +/* $OpenBSD: locore_asm_routines.S,v 1.27 2003/11/08 21:45:19 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -1541,20 +1541,6 @@ ENTRY(longjmp) jmp.n r1 or r2,r0,1 -/* - * invalidate_pte(pte) - * - * This function will invalidate specified pte indivisibly - * to avoid the write-back of used-bit and/or modify-bit into - * that pte. It also returns the pte found in the table. - */ -ENTRY(invalidate_pte) - or r3,r0,r0 | r3 = PG_NV - xmem r3,r2,r0 | exchange with *pte - FLUSH_PIPELINE - jmp.n r1 - or r2,r3,r0 | return previous value - #ifdef DDB ENTRY(db_flush_pipeline) FLUSH_PIPELINE |