Remove pte_zero_p and simply check against 0.

This commit is contained in:
skrll 2020-08-22 15:34:51 +00:00
parent eea3f3e629
commit 504fb3492e
3 changed files with 6 additions and 18 deletions

View File

@ -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.
@ -305,12 +305,6 @@ pte_readonly_p(pt_entry_t pte)
return (pte & MIPS_MMU(PG_RO)) != 0;
}
static inline bool
pte_zero_p(pt_entry_t pte)
{
return pte == 0;
}
static inline bool
pte_cached_p(pt_entry_t pte)
{

View File

@ -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.
@ -101,12 +101,6 @@ pte_valid_p(pt_entry_t pt_entry)
return pt_entry != 0;
}
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)
{

View File

@ -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 char *caller)
#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);