Remove struct ia64_itir and use a plain old uint64_t instead.

This commit is contained in:
Marcel Moolenaar 2004-11-21 21:40:08 +00:00
parent b1ff74ebb3
commit 2ba0042660
4 changed files with 20 additions and 23 deletions

View File

@ -388,7 +388,7 @@ print_trs(int type)
int i, maxtr;
struct {
pt_entry_t pte;
struct ia64_itir itir;
uint64_t itir;
uint64_t ifa;
struct ia64_rr rr;
} buf;
@ -445,7 +445,8 @@ print_trs(int type)
buf.pte &= ~PTE_MA_MASK;
sprintf(lbuf, "%03d %06x %013lx %013lx %4s %d %d %d %d %d "
"%-3s %d %06x\n", i, buf.rr.rr_rid, buf.ifa >> 12,
(buf.pte & PTE_PPN_MASK) >> 12, psnames[buf.itir.ps],
(buf.pte & PTE_PPN_MASK) >> 12,
psnames[(buf.itir & ITIR_PS_MASK) >> 2],
(buf.pte & PTE_ED) ? 1 : 0,
(int)(buf.pte & PTE_AR_MASK) >> 9,
(int)(buf.pte & PTE_PL_MASK) >> 7,
@ -453,7 +454,7 @@ print_trs(int type)
(buf.pte & PTE_ACCESSED) ? 1 : 0,
manames[(buf.pte & PTE_MA_MASK) >> 2],
(buf.pte & PTE_PRESENT) ? 1 : 0,
buf.itir.key);
(int)((buf.itir & ITIR_KEY_MASK) >> 8));
pager_output(lbuf);
}
pager_close();

View File

@ -388,7 +388,7 @@ print_trs(int type)
int i, maxtr;
struct {
pt_entry_t pte;
struct ia64_itir itir;
uint64_t itir;
uint64_t ifa;
struct ia64_rr rr;
} buf;
@ -445,7 +445,8 @@ print_trs(int type)
buf.pte &= ~PTE_MA_MASK;
sprintf(lbuf, "%03d %06x %013lx %013lx %4s %d %d %d %d %d "
"%-3s %d %06x\n", i, buf.rr.rr_rid, buf.ifa >> 12,
(buf.pte & PTE_PPN_MASK) >> 12, psnames[buf.itir.ps],
(buf.pte & PTE_PPN_MASK) >> 12,
psnames[(buf.itir & ITIR_PS_MASK) >> 2],
(buf.pte & PTE_ED) ? 1 : 0,
(int)(buf.pte & PTE_AR_MASK) >> 9,
(int)(buf.pte & PTE_PL_MASK) >> 7,
@ -453,7 +454,7 @@ print_trs(int type)
(buf.pte & PTE_ACCESSED) ? 1 : 0,
manames[(buf.pte & PTE_MA_MASK) >> 2],
(buf.pte & PTE_PRESENT) ? 1 : 0,
buf.itir.key);
(int)((buf.itir & ITIR_KEY_MASK) >> 8));
pager_output(lbuf);
}
pager_close();

View File

@ -1093,8 +1093,7 @@ pmap_set_pte(struct ia64_lpte *pte, vm_offset_t va, vm_offset_t pa,
pte->pte |= (wired) ? PTE_WIRED : 0;
pte->pte |= pa & PTE_PPN_MASK;
pte->itir.ps = PAGE_SHIFT;
pte->itir.key = 0;
pte->itir = PAGE_SHIFT << 2;
pte->tag = ia64_ttag(va);
@ -2250,9 +2249,9 @@ print_trs(int type)
struct ia64_pal_result res;
int i, maxtr;
struct {
uint64_t ifa;
struct ia64_itir itir;
pt_entry_t pte;
uint64_t itir;
uint64_t ifa;
struct ia64_rr rr;
} buf;
static const char *manames[] = {
@ -2287,14 +2286,15 @@ print_trs(int type)
db_printf("%d %06x %013lx %013lx %4s %d %d %d %d %d %-3s "
"%d %06x\n", (int)buf.ifa & 1, buf.rr.rr_rid,
buf.ifa >> 12, (buf.pte & PTE_PPN_MASK) >> 12,
psnames[buf.itir.ps], (buf.pte & PTE_ED) ? 1 : 0,
psnames[(buf.itir & ITIR_PS_MASK) >> 2],
(buf.pte & PTE_ED) ? 1 : 0,
(int)(buf.pte & PTE_AR_MASK) >> 9,
(int)(buf.pte & PTE_PL_MASK) >> 7,
(pmap_lpte_dirty(&buf)) ? 1 : 0,
(pmap_lpte_accessed(&buf)) ? 1 : 0,
manames[(buf.pte & PTE_MA_MASK) >> 2],
(pmap_lpte_present(&buf)) ? 1 : 0,
buf.itir.key);
(int)((buf.itir & ITIR_KEY_MASK) >> 8));
}
}

View File

@ -59,6 +59,11 @@
#define PTE_MANAGED 0x0040000000000000
#define PTE_PROT_MASK 0x0700000000000000
#define ITIR__RV1_ 0x0000000000000003
#define ITIR_PS_MASK 0x00000000000000FC
#define ITIR_KEY_MASK 0x00000000FFFFFF00
#define ITIR__RV2_ 0xFFFFFFFF00000000
#ifndef LOCORE
typedef uint64_t pt_entry_t;
@ -75,22 +80,12 @@ pte_atomic_set(pt_entry_t *ptep, uint64_t val)
return (atomic_set_64(ptep, val));
}
/*
* Layout of cr.itir.
*/
struct ia64_itir {
uint64_t __rv1__ :2; /* bits 0..1 */
uint64_t ps :6; /* bits 2..7 */
uint64_t key :24; /* bits 8..31 */
uint64_t __rv2__ :32; /* bits 32..63 */
};
/*
* A long-format VHPT entry.
*/
struct ia64_lpte {
pt_entry_t pte;
struct ia64_itir itir;
uint64_t itir;
uint64_t tag; /* includes ti */
uint64_t chain; /* pa of collision chain */
};