diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2024-02-14 06:16:54 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2024-02-14 06:16:54 +0000 |
commit | aba5cd020299c732d0c1705b887349c639988bad (patch) | |
tree | 48f1eea3003f5d440f9097503ef30bd02f4ff715 /sys/arch/m88k | |
parent | 8ece2fc7f9d58862ddfc226abaa35af7ab5878e6 (diff) |
Make sure pmap_unmap_direct flushes dirty cache lines.
Diffstat (limited to 'sys/arch/m88k')
-rw-r--r-- | sys/arch/m88k/include/pmap.h | 4 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/pmap.c | 17 |
2 files changed, 18 insertions, 3 deletions
diff --git a/sys/arch/m88k/include/pmap.h b/sys/arch/m88k/include/pmap.h index 735945313f9..a08f357981d 100644 --- a/sys/arch/m88k/include/pmap.h +++ b/sys/arch/m88k/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.30 2023/12/11 22:12:53 kettenis Exp $ */ +/* $OpenBSD: pmap.h,v 1.31 2024/02/14 06:16:53 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1991 Carnegie Mellon University @@ -77,7 +77,7 @@ int pmap_translation_info(pmap_t, vaddr_t, paddr_t *, uint32_t *); #define PTI_BATC 2 #define pmap_map_direct(pg) ((vaddr_t)VM_PAGE_TO_PHYS(pg)) -#define pmap_unmap_direct(va) PHYS_TO_VM_PAGE((paddr_t)va) +vm_page_t pmap_unmap_direct(vaddr_t); #define PMAP_CHECK_COPYIN 1 diff --git a/sys/arch/m88k/m88k/pmap.c b/sys/arch/m88k/m88k/pmap.c index a5bdebdbf2e..e9f3c390986 100644 --- a/sys/arch/m88k/m88k/pmap.c +++ b/sys/arch/m88k/m88k/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.87 2024/02/07 20:54:53 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.88 2024/02/14 06:16:53 miod Exp $ */ /* * Copyright (c) 2001-2004, 2010, Miodrag Vallat. @@ -2002,3 +2002,18 @@ pmap_page_uncache(paddr_t pa) splx(s); pmap_cache_ctrl(pa, pa + PAGE_SIZE, CACHE_INH); } + +/* + * [MI] + * Marks a "direct" page as unused. + */ +vm_page_t +pmap_unmap_direct(vaddr_t va) +{ + paddr_t pa = (paddr_t)va; + vm_page_t pg = PHYS_TO_VM_PAGE(pa); + + pmap_clean_page(pa); + + return pg; +} |