Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm/pmap Remove pte_zero_p and simply check against 0.
details: https://anonhg.NetBSD.org/src/rev/72469fe8f0ce
branches: trunk
changeset: 937621:72469fe8f0ce
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Aug 22 15:34:51 2020 +0000
description:
Remove pte_zero_p and simply check against 0.
diffstat:
sys/arch/mips/include/pte.h | 8 +-------
sys/arch/powerpc/include/booke/pte.h | 8 +-------
sys/uvm/pmap/pmap_segtab.c | 8 ++++----
3 files changed, 6 insertions(+), 18 deletions(-)
diffs (78 lines):
diff -r 0afcc7ad9c53 -r 72469fe8f0ce sys/arch/mips/include/pte.h
--- a/sys/arch/mips/include/pte.h Sat Aug 22 15:32:36 2020 +0000
+++ b/sys/arch/mips/include/pte.h Sat Aug 22 15:34:51 2020 +0000
@@ -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 @@
}
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) {
diff -r 0afcc7ad9c53 -r 72469fe8f0ce sys/arch/powerpc/include/booke/pte.h
--- a/sys/arch/powerpc/include/booke/pte.h Sat Aug 22 15:32:36 2020 +0000
+++ b/sys/arch/powerpc/include/booke/pte.h Sat Aug 22 15:34:51 2020 +0000
@@ -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 @@
}
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;
diff -r 0afcc7ad9c53 -r 72469fe8f0ce sys/uvm/pmap/pmap_segtab.c
--- a/sys/uvm/pmap/pmap_segtab.c Sat Aug 22 15:32:36 2020 +0000
+++ b/sys/uvm/pmap/pmap_segtab.c Sat Aug 22 15:34:51 2020 +0000
@@ -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 @@
#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);
Home |
Main Index |
Thread Index |
Old Index