Module Name: src
Committed By: skrll
Date: Sat Aug 22 15:32:36 UTC 2020
Modified Files:
src/sys/uvm/pmap: pmap_segtab.c
Log Message:
Remove the #if defined(__mips_n64) && PAGE_SIZE == 8192 and make the
check MI - all PTs are PAGE_SIZE aligned
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/uvm/pmap/pmap_segtab.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/uvm/pmap/pmap_segtab.c
diff -u src/sys/uvm/pmap/pmap_segtab.c:1.21 src/sys/uvm/pmap/pmap_segtab.c:1.22
--- src/sys/uvm/pmap/pmap_segtab.c:1.21 Sat Aug 22 13:59:16 2020
+++ src/sys/uvm/pmap/pmap_segtab.c Sat Aug 22 15:32:36 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_segtab.c,v 1.21 2020/08/22 13:59:16 skrll Exp $ */
+/* $NetBSD: pmap_segtab.c,v 1.22 2020/08/22 15:32:36 skrll Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.21 2020/08/22 13:59:16 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.22 2020/08/22 15:32:36 skrll Exp $");
/*
* Manages physical address maps.
@@ -171,6 +171,13 @@ pmap_check_stp(pmap_segtab_t *stp, const
static void
pmap_check_ptes(pt_entry_t *pte, const char *caller)
{
+ /*
+ * All pte arrays should be page aligned.
+ */
+ if (((uintptr_t)pte & PAGE_MASK) != 0) {
+ panic("%s: pte entry at %p not page aligned", caller, pte);
+ }
+
#ifdef DEBUG
for (size_t i = 0; i < NPTEPG; i++)
if (!pte_zero_p(pte[i])) {
@@ -283,17 +290,6 @@ pmap_segtab_release(pmap_t pmap, pmap_se
continue;
pmap_check_ptes(pte, __func__);
-#if defined(__mips_n64) && PAGE_SIZE == 8192
- /*
- * XXX This is evil. If vinc is 1000000 we are in
- * the last level, and this pte should be page aligned.
- */
- if (vinc == 0x1000000 && ((uintptr_t)pte & PAGE_MASK) != 0) {
- panic("%s: pte entry at %p not page aligned",
- __func__, pte);
- }
-#endif
-
/*
* If our caller wants a callback, do so.
*/