Changeset View
Changeset View
Standalone View
Standalone View
sys/riscv/riscv/pmap.c
Show First 20 Lines • Show All 345 Lines • ▼ Show 20 Lines | #define PTE_TO_PHYS(pte) \ | ||||||||
((((pte) & ~PTE_HI_MASK) >> PTE_PPN0_S) * PAGE_SIZE) | ((((pte) & ~PTE_HI_MASK) >> PTE_PPN0_S) * PAGE_SIZE) | ||||||||
#define L2PTE_TO_PHYS(l2) \ | #define L2PTE_TO_PHYS(l2) \ | ||||||||
((((l2) & ~PTE_HI_MASK) >> PTE_PPN1_S) << L2_SHIFT) | ((((l2) & ~PTE_HI_MASK) >> PTE_PPN1_S) << L2_SHIFT) | ||||||||
static __inline pd_entry_t * | static __inline pd_entry_t * | ||||||||
pmap_l1(pmap_t pmap, vm_offset_t va) | pmap_l1(pmap_t pmap, vm_offset_t va) | ||||||||
{ | { | ||||||||
KASSERT(VIRT_IS_VALID(va), | |||||||||
("%s: malformed virtual address %#lx", __func__, va)); | |||||||||
markj: No need for newlines in kassert/panic strings. | |||||||||
Done Inline Actions
for my sanity, please :) (one of the things I loathe about the arm64 port...) jrtc27: for my sanity, please :) (one of the things I loathe about the arm64 port...) | |||||||||
return (&pmap->pm_l1[pmap_l1_index(va)]); | return (&pmap->pm_l1[pmap_l1_index(va)]); | ||||||||
} | } | ||||||||
static __inline pd_entry_t * | static __inline pd_entry_t * | ||||||||
pmap_l1_to_l2(pd_entry_t *l1, vm_offset_t va) | pmap_l1_to_l2(pd_entry_t *l1, vm_offset_t va) | ||||||||
{ | { | ||||||||
vm_paddr_t phys; | vm_paddr_t phys; | ||||||||
pd_entry_t *l2; | pd_entry_t *l2; | ||||||||
▲ Show 20 Lines • Show All 4,423 Lines • Show Last 20 Lines |
No need for newlines in kassert/panic strings.