From 49aec3341749fad34f9e4f38d2aab442c8b83df7 Mon Sep 17 00:00:00 2001 From: pk Date: Tue, 11 Jun 1996 21:54:44 +0000 Subject: [PATCH] pmap_changeprot: truncate VA argument to page-boundary. Needed in case we call cache_page_flush(). --- sys/arch/sparc/sparc/pmap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index 0b538c3be438..5d2617f0f40e 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.63 1996/05/30 00:02:09 pk Exp $ */ +/* $NetBSD: pmap.c,v 1.64 1996/06/11 21:54:44 pk Exp $ */ /* * Copyright (c) 1996 @@ -4677,6 +4677,7 @@ pmap_changeprot4_4c(pm, va, prot, wired) write_user_windows(); /* paranoia */ + va &= ~(NBPG-1); if (pm == pmap_kernel()) newprot = prot & VM_PROT_WRITE ? PG_S|PG_W : PG_S; else @@ -5003,6 +5004,7 @@ pmap_changeprot4m(pm, va, prot, wired) write_user_windows(); /* paranoia */ + va &= ~(NBPG-1); if (pm == pmap_kernel()) newprot = prot & VM_PROT_WRITE ? PPROT_N_RWX : PPROT_N_RX; else