Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/riscv/include Some fixes from Simon.
details: https://anonhg.NetBSD.org/src/rev/dae86aa293a7
branches: trunk
changeset: 371929:dae86aa293a7
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Oct 18 06:44:43 2022 +0000
description:
Some fixes from Simon.
diffstat:
sys/arch/riscv/include/pte.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 2df71cac07b9 -r dae86aa293a7 sys/arch/riscv/include/pte.h
--- a/sys/arch/riscv/include/pte.h Tue Oct 18 04:39:38 2022 +0000
+++ b/sys/arch/riscv/include/pte.h Tue Oct 18 06:44:43 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pte.h,v 1.9 2022/10/15 06:41:43 simonb Exp $ */
+/* $NetBSD: pte.h,v 1.10 2022/10/18 06:44:43 skrll Exp $ */
/*
* Copyright (c) 2014, 2019, 2021 The NetBSD Foundation, Inc.
@@ -259,19 +259,19 @@
static inline pd_entry_t
pte_pde_pdetab(paddr_t pa, bool kernel_p)
{
- return PTE_V | (pa >> PAGE_SHIFT) << L2_SHIFT;
+ return PTE_V | (pa >> PAGE_SHIFT) << PTE_PPN_SHIFT;
}
static inline pd_entry_t
pte_pde_ptpage(paddr_t pa, bool kernel_p)
{
- return PTE_V | PTE_X | PTE_W | PTE_R | (pa >> PAGE_SHIFT) << L2_SHIFT;
+ return PTE_V | PTE_X | PTE_W | PTE_R | (pa >> PAGE_SHIFT) << PTE_PPN_SHIFT;
}
static inline bool
pte_pde_valid_p(pd_entry_t pde)
{
- return (pde & (PTE_X | PTE_W | PTE_R)) == 0;
+ return (pde & (PTE_X | PTE_W | PTE_R | PTE_V)) == PTE_V;
}
static inline paddr_t
Home |
Main Index |
Thread Index |
Old Index