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 used L3 even if L2 could cover the ...
details: https://anonhg.NetBSD.org/src/rev/eef6dc20dfa9
branches: trunk
changeset: 454230:eef6dc20dfa9
user: ryo <ryo%NetBSD.org@localhost>
date: Wed Sep 11 08:15:48 2019 +0000
description:
used L3 even if L2 could cover the range. fix to use larger block if possible good enough.
pointed out by jmcneill@. thanks.
diffstat:
sys/arch/aarch64/aarch64/aarch64_machdep.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 1b51701a4858 -r eef6dc20dfa9 sys/arch/aarch64/aarch64/aarch64_machdep.c
--- a/sys/arch/aarch64/aarch64/aarch64_machdep.c Wed Sep 11 04:59:55 2019 +0000
+++ b/sys/arch/aarch64/aarch64/aarch64_machdep.c Wed Sep 11 08:15:48 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aarch64_machdep.c,v 1.30 2019/09/09 17:02:36 ryo Exp $ */
+/* $NetBSD: aarch64_machdep.c,v 1.31 2019/09/11 08:15:48 ryo Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.30 2019/09/09 17:02:36 ryo Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.31 2019/09/11 08:15:48 ryo Exp $");
#include "opt_arm_debug.h"
#include "opt_ddb.h"
@@ -144,7 +144,7 @@
/* align the start address to L2 blocksize */
nblocks = ulmin(left / L3_SIZE,
Ln_ENTRIES - __SHIFTOUT(start, L3_ADDR_BITS));
- if (nblocks > 0) {
+ if (((start & L3_ADDR_BITS) != 0) && (nblocks > 0)) {
mapsize = nblocks * L3_SIZE;
VPRINTF("Creating KSEG tables for %016lx-%016lx (L3)\n",
start, start + mapsize - 1);
@@ -159,7 +159,7 @@
/* align the start address to L1 blocksize */
nblocks = ulmin(left / L2_SIZE,
Ln_ENTRIES - __SHIFTOUT(start, L2_ADDR_BITS));
- if (nblocks > 0) {
+ if (((start & L2_ADDR_BITS) != 0) && (nblocks > 0)) {
mapsize = nblocks * L2_SIZE;
VPRINTF("Creating KSEG tables for %016lx-%016lx (L2)\n",
start, start + mapsize - 1);
Home |
Main Index |
Thread Index |
Old Index