From b9f196b2c46698e391410e2bf587cb7714cee9b5 Mon Sep 17 00:00:00 2001 From: marcel Date: Thu, 23 Sep 2004 00:05:20 +0000 Subject: Redefine a PTE as a 64-bit integral type instead of a struct of bit-fields. Unify the PTE defines accordingly and update all uses. --- lib/libkvm/kvm_ia64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/libkvm/kvm_ia64.c b/lib/libkvm/kvm_ia64.c index 5b6f1c0..aadca00 100644 --- a/lib/libkvm/kvm_ia64.c +++ b/lib/libkvm/kvm_ia64.c @@ -196,9 +196,9 @@ _kvm_kvatop(kvm_t *kd, u_long va, u_long *pa) pgaddr += (pgno * sizeof(pte)); if (kvm_read(kd, pgaddr, &pte, sizeof(pte)) != sizeof(pte)) goto fail; - if (!pte.pte_p) + if (!(pte.pte & PTE_PRESENT)) goto fail; - va = ((u_long)pte.pte_ppn << 12) + (va & (pgsz - 1)); + va = (pte.pte & PTE_PPN_MASK) + (va & (pgsz - 1)); return (_kvm_pa2off(kd, va, pa, pgsz)); } -- cgit v1.1