Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/aarch64/aarch64 ref/mod bit should be set according...
details: https://anonhg.NetBSD.org/src/rev/f6e26318b47b
branches: trunk
changeset: 1003537:f6e26318b47b
user: ryo <ryo%NetBSD.org@localhost>
date: Fri Sep 20 05:35:27 2019 +0000
description:
ref/mod bit should be set according to 'flags' argument, not 'prot'. r1.44 was incomplete.
diffstat:
sys/arch/aarch64/aarch64/pmap.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 8c2ffb212c6f -r f6e26318b47b sys/arch/aarch64/aarch64/pmap.c
--- a/sys/arch/aarch64/aarch64/pmap.c Fri Sep 20 05:32:42 2019 +0000
+++ b/sys/arch/aarch64/aarch64/pmap.c Fri Sep 20 05:35:27 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.45 2019/09/13 18:07:30 ryo Exp $ */
+/* $NetBSD: pmap.c,v 1.46 2019/09/20 05:35:27 ryo Exp $ */
/*
* Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.45 2019/09/13 18:07:30 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.46 2019/09/20 05:35:27 ryo Exp $");
#include "opt_arm_debug.h"
#include "opt_ddb.h"
@@ -1724,6 +1724,8 @@
*/
if (prot & (VM_PROT_WRITE|VM_PROT_EXECUTE))
prot |= VM_PROT_READ;
+ if (flags & (VM_PROT_WRITE|VM_PROT_EXECUTE))
+ flags |= VM_PROT_READ;
mdattr = VM_PROT_READ | VM_PROT_WRITE;
if (need_update_pv) {
@@ -1750,7 +1752,7 @@
if (pg != NULL) {
/* update referenced/modified flags */
VM_PAGE_TO_MD(pg)->mdpg_flags |=
- (prot & (VM_PROT_READ | VM_PROT_WRITE));
+ (flags & (VM_PROT_READ | VM_PROT_WRITE));
mdattr &= VM_PAGE_TO_MD(pg)->mdpg_flags;
}
Home |
Main Index |
Thread Index |
Old Index