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 Simplify conditionals when clearing...
details: https://anonhg.NetBSD.org/src/rev/536d27024ea8
branches: trunk
changeset: 461931:536d27024ea8
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Jul 18 06:47:36 2019 +0000
description:
Simplify conditionals when clearing the CONTIG flag in pmapboot_enter and
update the comments to be a little clearer.
diffstat:
sys/arch/aarch64/aarch64/pmapboot.c | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diffs (53 lines):
diff -r 239886eb5b97 -r 536d27024ea8 sys/arch/aarch64/aarch64/pmapboot.c
--- a/sys/arch/aarch64/aarch64/pmapboot.c Thu Jul 18 06:47:10 2019 +0000
+++ b/sys/arch/aarch64/aarch64/pmapboot.c Thu Jul 18 06:47:36 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmapboot.c,v 1.3 2018/12/29 19:53:38 alnsn Exp $ */
+/* $NetBSD: pmapboot.c,v 1.4 2019/07/18 06:47:36 skrll Exp $ */
/*
* Copyright (c) 2018 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmapboot.c,v 1.3 2018/12/29 19:53:38 alnsn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmapboot.c,v 1.4 2019/07/18 06:47:36 skrll Exp $");
#include "opt_arm_debug.h"
#include "opt_ddb.h"
@@ -386,21 +386,21 @@
nextblk:
#ifdef OPTIMIZE_TLB_CONTIG
/*
- * when overwrite pte, also contiguous bit before/after
- * this pte should be cleared.
+ * when overwriting a pte entry the contiguous bit in entries
+ * before/after the entry should be cleared.
*/
- if ((ll != NULL) && (va == va_start) &&
- ((llidx & 15) != 0)) {
- /* clear CONTIG flag in front of this pte entry */
- for (i = (llidx & ~15); i < llidx; i++) {
- ll[i] &= ~LX_BLKPAG_CONTIG;
+ if (ll != NULL) {
+ if (va == va_start && (llidx & 15) != 0) {
+ /* clear CONTIG flag before this pte entry */
+ for (i = (llidx & ~15); i < llidx; i++) {
+ ll[i] &= ~LX_BLKPAG_CONTIG;
+ }
}
- }
- if ((ll != NULL) && (va == va_end) &&
- ((llidx & 15) != 15)) {
- /* clear CONTIG flag in back of this pte entry */
- for (i = (llidx + 1); i < ((llidx + 16) & ~15); i++) {
- ll[i] &= ~LX_BLKPAG_CONTIG;
+ if (va == va_end && (llidx & 15) != 15) {
+ /* clear CONTIG flag after this pte entry */
+ for (i = (llidx + 1); i < ((llidx + 16) & ~15); i++) {
+ ll[i] &= ~LX_BLKPAG_CONTIG;
+ }
}
}
#endif
Home |
Main Index |
Thread Index |
Old Index