summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-11-08 13:18:30 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-11-08 13:18:30 +0000
commit933ceb51cbf11b3e7c19d626d287eec2a661f271 (patch)
tree9abdd5f0f4f9a3831aa5dada5159ab1fe63c51bc /sys/arch
parent07299c26efe786b46116fa7b3e53565f4acbf8c0 (diff)
remove pmap_zero_page_uncached()
used by idle page zeroing code removed from uvm in 2015 ok miod@ mpi@ mlarkin@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/i386/pmap.c30
-rw-r--r--sys/arch/i386/i386/pmapae.c29
-rw-r--r--sys/arch/i386/include/pmap.h11
3 files changed, 3 insertions, 67 deletions
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index 240e8dbb054..9885a8f1245 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.225 2024/11/02 07:58:58 mpi Exp $ */
+/* $OpenBSD: pmap.c,v 1.226 2024/11/08 13:18:29 jsg Exp $ */
/* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */
/*
@@ -1612,32 +1612,6 @@ pmap_zero_phys_86(paddr_t pa)
}
/*
- * pmap_zero_page_uncached: the same, except uncached.
- */
-
-int
-pmap_zero_page_uncached_86(paddr_t pa)
-{
-#ifdef MULTIPROCESSOR
- int id = cpu_number();
-#endif
- pt_entry_t *zpte = PTESLEW(zero_pte, id);
- caddr_t zerova = VASLEW(pmap_zerop, id);
-
-#ifdef DIAGNOSTIC
- if (*zpte)
- panic("pmap_zero_page_uncached_86: lock botch");
-#endif
-
- *zpte = (pa & PG_FRAME) | PG_V | PG_RW | PG_N; /* map in */
- pmap_update_pg((vaddr_t)zerova); /* flush TLB */
- pagezero(zerova, PAGE_SIZE); /* zero */
- *zpte = 0;
-
- return 1;
-}
-
-/*
* pmap_flush_cache: flush the cache for a virtual address.
*/
void
@@ -2882,7 +2856,5 @@ void (*pmap_write_protect_p)(struct pmap *, vaddr_t, vaddr_t,
vm_prot_t) = pmap_write_protect_86;
void (*pmap_pinit_pd_p)(pmap_t) = pmap_pinit_pd_86;
void (*pmap_zero_phys_p)(paddr_t) = pmap_zero_phys_86;
-int (*pmap_zero_page_uncached_p)(paddr_t) =
- pmap_zero_page_uncached_86;
void (*pmap_copy_page_p)(struct vm_page *, struct vm_page *) =
pmap_copy_page_86;
diff --git a/sys/arch/i386/i386/pmapae.c b/sys/arch/i386/i386/pmapae.c
index b7be0b44e73..c8a0d668ed9 100644
--- a/sys/arch/i386/i386/pmapae.c
+++ b/sys/arch/i386/i386/pmapae.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmapae.c,v 1.73 2024/11/01 12:07:53 mpi Exp $ */
+/* $OpenBSD: pmapae.c,v 1.74 2024/11/08 13:18:29 jsg Exp $ */
/*
* Copyright (c) 2006-2008 Michael Shalayeff
@@ -811,7 +811,6 @@ pmap_bootstrap_pae(void)
pmap_write_protect_p = pmap_write_protect_pae;
pmap_pinit_pd_p = pmap_pinit_pd_pae;
pmap_zero_phys_p = pmap_zero_phys_pae;
- pmap_zero_page_uncached_p = pmap_zero_page_uncached_pae;
pmap_copy_page_p = pmap_copy_page_pae;
bzero((void *)kpm->pm_pdir + 8, (PDSLOT_PTE-1) * 8);
@@ -1095,32 +1094,6 @@ pmap_zero_phys_pae(paddr_t pa)
}
/*
- * pmap_zero_page_uncached: the same, except uncached.
- */
-
-int
-pmap_zero_page_uncached_pae(paddr_t pa)
-{
-#ifdef MULTIPROCESSOR
- int id = cpu_number();
-#endif
- pt_entry_t *zpte = PTESLEW(zero_pte, id);
- caddr_t zerova = VASLEW(pmap_zerop, id);
-
-#ifdef DIAGNOSTIC
- if (*zpte)
- panic("pmap_zero_page_uncached_pae: lock botch");
-#endif
-
- *zpte = (pa & PG_FRAME) | PG_V | PG_RW | PG_N; /* map in */
- pmap_update_pg((vaddr_t)zerova); /* flush TLB */
- pagezero(zerova, PAGE_SIZE); /* zero */
- *zpte = 0;
-
- return 1;
-}
-
-/*
* pmap_copy_page: copy a page
*/
diff --git a/sys/arch/i386/include/pmap.h b/sys/arch/i386/include/pmap.h
index 2ead66ef937..0c0858d72ef 100644
--- a/sys/arch/i386/include/pmap.h
+++ b/sys/arch/i386/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.95 2024/06/18 12:37:29 jsg Exp $ */
+/* $OpenBSD: pmap.h,v 1.96 2024/11/08 13:18:29 jsg Exp $ */
/* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */
/*
@@ -276,7 +276,6 @@ extern void (*pmap_unwire_p)(struct pmap *, vaddr_t);
extern void (*pmap_write_protect_p)(struct pmap*, vaddr_t, vaddr_t, vm_prot_t);
extern void (*pmap_pinit_pd_p)(pmap_t);
extern void (*pmap_zero_phys_p)(paddr_t);
-extern int (*pmap_zero_page_uncached_p)(paddr_t);
extern void (*pmap_copy_page_p)(struct vm_page *, struct vm_page *);
u_int32_t pmap_pte_set_pae(vaddr_t, paddr_t, u_int32_t);
@@ -295,7 +294,6 @@ void pmap_unwire_pae(struct pmap *, vaddr_t);
void pmap_write_protect_pae(struct pmap *, vaddr_t, vaddr_t, vm_prot_t);
void pmap_pinit_pd_pae(pmap_t);
void pmap_zero_phys_pae(paddr_t);
-int pmap_zero_page_uncached_pae(paddr_t);
void pmap_copy_page_pae(struct vm_page *, struct vm_page *);
#define pmap_pte_set (*pmap_pte_set_p)
@@ -310,7 +308,6 @@ void pmap_copy_page_pae(struct vm_page *, struct vm_page *);
#define pmap_write_protect (*pmap_write_protect_p)
#define pmap_pinit_pd (*pmap_pinit_pd_p)
#define pmap_zero_phys (*pmap_zero_phys_p)
-#define pmap_zero_page_uncached (*pmap_zero_page_uncached_p)
#define pmap_copy_page (*pmap_copy_page_p)
u_int32_t pmap_pte_set_86(vaddr_t, paddr_t, u_int32_t);
@@ -329,7 +326,6 @@ void pmap_unwire_86(struct pmap *, vaddr_t);
void pmap_write_protect_86(struct pmap *, vaddr_t, vaddr_t, vm_prot_t);
void pmap_pinit_pd_86(pmap_t);
void pmap_zero_phys_86(paddr_t);
-int pmap_zero_page_uncached_86(paddr_t);
void pmap_copy_page_86(struct vm_page *, struct vm_page *);
void pmap_tlb_shootpage(struct pmap *, vaddr_t);
void pmap_tlb_shootrange(struct pmap *, vaddr_t, vaddr_t);
@@ -363,11 +359,6 @@ void pmap_flush_page_pae(paddr_t);
#define PMAP_GROWKERNEL /* turn on pmap_growkernel interface */
/*
- * Do idle page zero'ing uncached to avoid polluting the cache.
- */
-#define PMAP_PAGEIDLEZERO(pg) pmap_zero_page_uncached(VM_PAGE_TO_PHYS(pg))
-
-/*
* Inline functions
*/