From: jsg Date: Mon, 29 Apr 2024 10:07:37 +0000 (+0000) Subject: remove unused pmap_vp_remove() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=47c965967efe1b8dbf819cd8b78a0659297c5059;p=openbsd remove unused pmap_vp_remove() ok miod@ kettenis@ --- diff --git a/sys/arch/riscv64/riscv64/pmap.c b/sys/arch/riscv64/riscv64/pmap.c index 3b29ec9e3c2..259ba5bc774 100644 --- a/sys/arch/riscv64/riscv64/pmap.c +++ b/sys/arch/riscv64/riscv64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.40 2024/04/06 18:33:54 kettenis Exp $ */ +/* $OpenBSD: pmap.c,v 1.41 2024/04/29 10:07:37 jsg Exp $ */ /* * Copyright (c) 2019-2020 Brian Bamsch @@ -343,36 +343,6 @@ pmap_vp_lookup(pmap_t pm, vaddr_t va, pt_entry_t **pl3entry) return pted; } -/* - * Remove, and return, pted at specified address, NULL if not present - */ -struct pte_desc * -pmap_vp_remove(pmap_t pm, vaddr_t va) -{ - struct pmapvp1 *vp1; - struct pmapvp2 *vp2; - struct pmapvp3 *vp3; - struct pte_desc *pted; - - vp1 = pm->pm_vp.l1; - - vp2 = vp1->vp[VP_IDX1(va)]; - if (vp2 == NULL) { - return NULL; - } - - vp3 = vp2->vp[VP_IDX2(va)]; - if (vp3 == NULL) { - return NULL; - } - - pted = vp3->vp[VP_IDX3(va)]; - vp3->vp[VP_IDX3(va)] = NULL; - - return pted; -} - - /* * Create a V -> P mapping for the given pmap and virtual address * with reference to the pte descriptor that is used to map the page.