Page MenuHomeFreeBSD

D45326.id139859.diff
No OneTemporary

D45326.id139859.diff

diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c
--- a/sys/riscv/riscv/pmap.c
+++ b/sys/riscv/riscv/pmap.c
@@ -2911,14 +2911,13 @@
u_int flags, int8_t psind)
{
struct rwlock *lock;
- pd_entry_t *l1, *l2, l2e;
+ pd_entry_t *l2, l2e;
pt_entry_t new_l3, orig_l3;
pt_entry_t *l3;
pv_entry_t pv;
- vm_paddr_t opa, pa, l2_pa, l3_pa;
- vm_page_t mpte, om, l2_m, l3_m;
- pt_entry_t entry;
- pn_t l2_pn, l3_pn, pn;
+ vm_paddr_t opa, pa;
+ vm_page_t mpte, om;
+ pn_t pn;
int rv;
bool nosleep;
@@ -2990,39 +2989,7 @@
}
l3 = pmap_l3(pmap, va);
} else {
- l3 = pmap_l3(pmap, va);
- /* TODO: This is not optimal, but should mostly work */
- if (l3 == NULL) {
- if (l2 == NULL) {
- l2_m = vm_page_alloc_noobj(VM_ALLOC_WIRED |
- VM_ALLOC_ZERO);
- if (l2_m == NULL)
- panic("pmap_enter: l2 pte_m == NULL");
-
- l2_pa = VM_PAGE_TO_PHYS(l2_m);
- l2_pn = (l2_pa / PAGE_SIZE);
-
- l1 = pmap_l1(pmap, va);
- entry = (PTE_V);
- entry |= (l2_pn << PTE_PPN0_S);
- pmap_store(l1, entry);
- pmap_distribute_l1(pmap, pmap_l1_index(va), entry);
- l2 = pmap_l1_to_l2(l1, va);
- }
-
- l3_m = vm_page_alloc_noobj(VM_ALLOC_WIRED |
- VM_ALLOC_ZERO);
- if (l3_m == NULL)
- panic("pmap_enter: l3 pte_m == NULL");
-
- l3_pa = VM_PAGE_TO_PHYS(l3_m);
- l3_pn = (l3_pa / PAGE_SIZE);
- entry = (PTE_V);
- entry |= (l3_pn << PTE_PPN0_S);
- pmap_store(l2, entry);
- l3 = pmap_l2_to_l3(l2, va);
- }
- pmap_invalidate_page(pmap, va);
+ panic("pmap_enter: missing L3 table for kernel va %#lx", va);
}
orig_l3 = pmap_load(l3);

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 7:43 PM (6 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14722567
Default Alt Text
D45326.id139859.diff (1 KB)

Event Timeline