Module Name: src
Committed By: skrll
Date: Sat Aug 22 15:34:52 UTC 2020
Modified Files:
src/sys/arch/mips/include: pte.h
src/sys/arch/powerpc/include/booke: pte.h
src/sys/uvm/pmap: pmap_segtab.c
Log Message:
Remove pte_zero_p and simply check against 0.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/mips/include/pte.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/include/booke/pte.h
cvs rdiff -u -r1.22 -r1.23 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/arch/mips/include/pte.h
diff -u src/sys/arch/mips/include/pte.h:1.26 src/sys/arch/mips/include/pte.h:1.27
--- src/sys/arch/mips/include/pte.h:1.26 Sun Jul 26 08:08:41 2020
+++ src/sys/arch/mips/include/pte.h Sat Aug 22 15:34:51 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: pte.h,v 1.26 2020/07/26 08:08:41 simonb Exp $ */
+/* $NetBSD: pte.h,v 1.27 2020/08/22 15:34:51 skrll Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -306,12 +306,6 @@ pte_readonly_p(pt_entry_t pte)
}
static inline bool
-pte_zero_p(pt_entry_t pte)
-{
- return pte == 0;
-}
-
-static inline bool
pte_cached_p(pt_entry_t pte)
{
if (MIPS_HAS_R4K_MMU) {
Index: src/sys/arch/powerpc/include/booke/pte.h
diff -u src/sys/arch/powerpc/include/booke/pte.h:1.10 src/sys/arch/powerpc/include/booke/pte.h:1.11
--- src/sys/arch/powerpc/include/booke/pte.h:1.10 Thu Apr 19 21:50:07 2018
+++ src/sys/arch/powerpc/include/booke/pte.h Sat Aug 22 15:34:51 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: pte.h,v 1.10 2018/04/19 21:50:07 christos Exp $ */
+/* $NetBSD: pte.h,v 1.11 2020/08/22 15:34:51 skrll Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -102,12 +102,6 @@ pte_valid_p(pt_entry_t pt_entry)
}
static __inline bool
-pte_zero_p(pt_entry_t pt_entry)
-{
- return pt_entry == 0;
-}
-
-static __inline bool
pte_exec_p(pt_entry_t pt_entry)
{
return (pt_entry & PTE_xX) != 0;
Index: src/sys/uvm/pmap/pmap_segtab.c
diff -u src/sys/uvm/pmap/pmap_segtab.c:1.22 src/sys/uvm/pmap/pmap_segtab.c:1.23
--- src/sys/uvm/pmap/pmap_segtab.c:1.22 Sat Aug 22 15:32:36 2020
+++ src/sys/uvm/pmap/pmap_segtab.c Sat Aug 22 15:34:51 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_segtab.c,v 1.22 2020/08/22 15:32:36 skrll Exp $ */
+/* $NetBSD: pmap_segtab.c,v 1.23 2020/08/22 15:34:51 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.22 2020/08/22 15:32:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.23 2020/08/22 15:34:51 skrll Exp $");
/*
* Manages physical address maps.
@@ -180,13 +180,13 @@ pmap_check_ptes(pt_entry_t *pte, const c
#ifdef DEBUG
for (size_t i = 0; i < NPTEPG; i++)
- if (!pte_zero_p(pte[i])) {
+ if (pte[i] != 0) {
#ifdef DEBUG_NOISY
UVMHIST_FUNC(__func__);
UVMHIST_CALLARGS(pmapsegtabhist, "pte=%#jx",
(uintptr_t)pte, 0, 0, 0);
for (size_t j = i + 1; j < NPTEPG; j++)
- if (!pte_zero_p(pte[j]))
+ if (pte[j] != 0)
UVMHIST_LOG(pmapsegtabhist,
"pte[%zu] = %#"PRIxPTE,
j, pte_value(pte[j]), 0, 0);