Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 Remove unused function pseg_find (w...
details: https://anonhg.NetBSD.org/src/rev/bfcdc34f8bf9
branches: trunk
changeset: 542373:bfcdc34f8bf9
user: martin <martin%NetBSD.org@localhost>
date: Mon Jan 27 14:51:30 2003 +0000
description:
Remove unused function pseg_find (which looked quite similar to
pseg_get anyway).
diffstat:
sys/arch/sparc64/sparc64/locore.s | 115 +-------------------------------------
1 files changed, 1 insertions(+), 114 deletions(-)
diffs (129 lines):
diff -r aa99b1b30dea -r bfcdc34f8bf9 sys/arch/sparc64/sparc64/locore.s
--- a/sys/arch/sparc64/sparc64/locore.s Mon Jan 27 14:46:10 2003 +0000
+++ b/sys/arch/sparc64/sparc64/locore.s Mon Jan 27 14:51:30 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.163 2003/01/18 06:55:24 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.164 2003/01/27 14:51:30 martin Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath
@@ -8898,119 +8898,6 @@
retl
or %o0, 1, %o0 ! spare needed
-/*
- * In 32-bit mode:
- *
- * extern void pseg_find(struct pmap* %o0, vaddr_t addr %o1,
- * paddr_t spare %o2:%o3);
- *
- * In 64-bit mode:
- *
- * extern void pseg_find(struct pmap* %o0, vaddr_t addr %o1, paddr_t spare %o2);
- *
- * Get the paddr for a particular TTE entry. Returns the TTE's PA on success,
- * 1 if it needs to fill a pseg, and -1 if the address is in the virtual hole.
- * (NB: nobody in pmap checks for the virtual hole, so the system will hang.)
- * Allocate a page, pass the phys addr in as the spare, and try again.
- * If spare is not NULL it is assumed to be the address of a zeroed physical
- * page that can be used to generate a directory table or page table if needed.
- *
- */
-ENTRY(pseg_find)
-#ifndef _LP64
- btst 1, %sp ! 64-bit mode?
- bnz,pt %icc, 0f
- sllx %o2, 32, %o2 ! Shift to high 32-bits
- sll %o3, 0, %o3 ! Zero extend
- sll %o1, 0, %o1
- or %o2, %o3, %o2
-0:
-#endif
-#ifdef NOT_DEBUG
- !! Trap any changes to pmap_kernel below 0xf0000000
- set _C_LABEL(kernel_pmap_), %o5
- cmp %o0, %o5
- bne 0f
- sethi %hi(0xf0000000), %o5
- cmp %o1, %o5
- tlu 1
-0:
-#endif
- !!
- !! However we managed to get here we now have:
- !!
- !! %o0 = *pmap
- !! %o1 = addr
- !! %o2 = spare
- !!
- srax %o1, HOLESHIFT, %o4 ! Check for valid address
- brz,pt %o4, 0f ! Should be zero or -1
- inc %o4 ! Make -1 -> 0
- brz,pt %o4, 0f
- nop
-#ifdef DEBUG
- ta 1 ! Break into debugger
-#endif
- mov -1, %o0 ! Error -- in hole!
- retl
- mov -1, %o1
-0:
- ldx [%o0 + PM_PHYS], %o4 ! pmap->pm_segs
- srlx %o1, STSHIFT, %o5
- and %o5, STMASK, %o5
- sll %o5, 3, %o5
- add %o4, %o5, %o4
-2:
- DLFLUSH(%o4,%o3)
- ldxa [%o4] ASI_PHYS_CACHED, %o5 ! Load page directory pointer
- DLFLUSH2(%o3)
-
- brnz,a,pt %o5, 0f ! Null pointer?
- mov %o5, %o4
- brz,pn %o2, 1f ! Have a spare?
- mov %o2, %o5
- casxa [%o4] ASI_PHYS_CACHED, %g0, %o5
- brnz,pn %o5, 2b ! Something changed?
- DLFLUSH(%o4, %o5)
- mov %o2, %o4
- clr %o2 ! Mark spare as used
-0:
- srlx %o1, PDSHIFT, %o5
- and %o5, PDMASK, %o5
- sll %o5, 3, %o5
- add %o4, %o5, %o4
-2:
- DLFLUSH(%o4,%o3)
- ldxa [%o4] ASI_PHYS_CACHED, %o5 ! Load table directory pointer
- DLFLUSH2(%o3)
-
- brnz,a,pt %o5, 0f ! Null pointer?
- mov %o5, %o4
- brz,pn %o2, 1f ! Have a spare?
- mov %o2, %o5
- casxa [%o4] ASI_PHYS_CACHED, %g0, %o5
- brnz,pn %o5, 2b ! Something changed?
- DLFLUSH(%o4, %o4)
- mov %o2, %o4
- clr %o2 ! Mark spare as used
-0:
- srlx %o1, PTSHIFT, %o5 ! Convert to ptab offset
- btst 1, %sp
- and %o5, PTMASK, %o5
- sll %o5, 3, %o5
- bz,pn %icc, 0f ! 64-bit mode?
- add %o5, %o4, %o0
- retl
- clr %o0
-0:
- srl %o0, 0, %o1
- retl ! No, generate a %o0:%o1 double
- srlx %o0, 32, %o0
-
-1:
- retl
- mov 1, %o0
-
/*
* Use block_disable to turn off block insns for
Home |
Main Index |
Thread Index |
Old Index