summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-01-12 22:09:09 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-01-12 22:09:09 +0000
commit07f09b870eb11773a650980764365254b795d5fd (patch)
tree3a61bbb86ff037202c7f1b90a58c351bc6cad0ff
parent8bc3dedf672d83a3c0713c8a2eb1d6633d1372a0 (diff)
Get rid of some dead code.
ok miod@
-rw-r--r--sys/arch/sparc64/sparc64/cache.h5
-rw-r--r--sys/arch/sparc64/sparc64/locore.s40
-rw-r--r--sys/arch/sparc64/sparc64/mem.c76
3 files changed, 8 insertions, 113 deletions
diff --git a/sys/arch/sparc64/sparc64/cache.h b/sys/arch/sparc64/sparc64/cache.h
index f002f5b1039..5d3b8844495 100644
--- a/sys/arch/sparc64/sparc64/cache.h
+++ b/sys/arch/sparc64/sparc64/cache.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cache.h,v 1.4 2006/12/29 00:14:28 kettenis Exp $ */
+/* $OpenBSD: cache.h,v 1.5 2007/01/12 22:09:08 kettenis Exp $ */
/* $NetBSD: cache.h,v 1.3 2000/08/01 00:28:02 eeh Exp $ */
/*
@@ -139,8 +139,7 @@ void cache_enable(void); /* turn it on */
int cache_flush_page(paddr_t); /* flush page from E$ */
int cache_flush(vaddr_t, vsize_t); /* flush region */
-/* The following two are for I$ and D$ flushes and are in locore.s */
-void blast_vcache(void); /* Clear entire contents of I$ and D$ */
+/* The following are for D$ flushes and are in locore.s */
#define dcache_flush_page(pa) cacheinfo.c_dcache_flush_page(pa)
void us_dcache_flush_page(paddr_t); /* flush page from D$ */
void us3_dcache_flush_page(paddr_t); /* flush page from D$ */
diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s
index 3dce1923e3b..3689f45e0f5 100644
--- a/sys/arch/sparc64/sparc64/locore.s
+++ b/sys/arch/sparc64/sparc64/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.69 2007/01/06 23:07:13 kettenis Exp $ */
+/* $OpenBSD: locore.s,v 1.70 2007/01/12 22:09:08 kettenis Exp $ */
/* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */
/*
@@ -4786,35 +4786,6 @@ _C_LABEL(tlb_flush_ctx):
nop
/*
- * blast_vcache()
- *
- * Clear out all of D$ regardless of contents
- * Does not modify %o0
- *
- */
- .align 8
- .globl _C_LABEL(blast_vcache)
- .proc 1
- FTYPE(blast_vcache)
-_C_LABEL(blast_vcache):
-/*
- * We turn off interrupts for the duration to prevent RED exceptions.
- */
- rdpr %pstate, %o3
- set (2*NBPG)-8, %o1
- andn %o3, PSTATE_IE, %o4 ! Turn off PSTATE_IE bit
- wrpr %o4, 0, %pstate
-1:
-dlflush3:
- stxa %g0, [%o1] ASI_DCACHE_TAG
- brnz,pt %o1, 1b
- dec 8, %o1
- sethi %hi(KERNBASE), %o2
- flush %o2
- retl
- wrpr %o3, %pstate
-
-/*
* dcache_flush_page(paddr_t pa)
*
* Clear one page from D$.
@@ -4849,7 +4820,7 @@ _C_LABEL(us_dcache_flush_page):
bne,pt %xcc, 1b
membar #LoadStore
-dlflush4:
+dlflush3:
stxa %g0, [%o0] ASI_DCACHE_TAG
ba,pt %icc, 1b
membar #StoreLoad
@@ -4906,7 +4877,7 @@ _C_LABEL(cache_flush_virt):
!! Clear from start to end
1:
-dlflush5:
+dlflush4:
stxa %g0, [%o0] ASI_DCACHE_TAG
dec 16, %o4
brgz,pt %o4, 1b
@@ -4961,7 +4932,7 @@ _C_LABEL(cache_flush_phys):
nop
membar #LoadStore
-dlflush6:
+dlflush5:
stxa %g0, [%o4] ASI_DCACHE_TAG ! Just right
2:
membar #StoreLoad
@@ -6323,7 +6294,7 @@ ENTRY(pmap_zero_phys)
dec 8, %o2
stxa %g0, [%o0] ASI_PHYS_CACHED
inc 8, %o0
-dlflush7:
+dlflush6:
stxa %g0, [%o1] ASI_DCACHE_TAG
brgz %o2, 1b
inc 16, %o1
@@ -9630,5 +9601,4 @@ _C_LABEL(dlflush_start):
.xword dlflush4
.xword dlflush5
.xword dlflush6
- .xword dlflush7
.xword 0
diff --git a/sys/arch/sparc64/sparc64/mem.c b/sys/arch/sparc64/sparc64/mem.c
index a8d34e30b4e..07739c3333f 100644
--- a/sys/arch/sparc64/sparc64/mem.c
+++ b/sys/arch/sparc64/sparc64/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.8 2003/06/02 23:27:56 millert Exp $ */
+/* $OpenBSD: mem.c,v 1.9 2007/01/12 22:09:08 kettenis Exp $ */
/* $NetBSD: mem.c,v 1.18 2001/04/24 04:31:12 thorpej Exp $ */
/*
@@ -125,7 +125,6 @@ mmrw(dev, uio, flags)
/* minor device 0 is physical memory */
case 0:
-#if 1
v = uio->uio_offset;
if (!pmap_pa_exists(v)) {
error = EFAULT;
@@ -143,79 +142,6 @@ mmrw(dev, uio, flags)
(vaddr_t)vmmap + NBPG);
pmap_update(pmap_kernel());
break;
-#else
- /* On v9 we can just use the physical ASI and not bother w/mapin & mapout */
- v = uio->uio_offset;
- if (!pmap_pa_exists(v)) {
- error = EFAULT;
- goto unlock;
- }
- o = uio->uio_offset & PGOFSET;
- c = min(uio->uio_resid, (int)(NBPG - o));
- /* However, we do need to partially re-implement uiomove() */
- if (uio->uio_rw != UIO_READ && uio->uio_rw != UIO_WRITE)
- panic("mmrw: uio mode");
- if (uio->uio_segflg == UIO_USERSPACE && uio->uio_procp != curproc)
- panic("mmrw: uio proc");
- while (c > 0 && uio->uio_resid) {
- struct iovec *iov;
- u_int cnt;
- int d;
-
- iov = uio->uio_iov;
- cnt = iov->iov_len;
- if (cnt == 0) {
- uio->uio_iov++;
- uio->uio_iovcnt--;
- continue;
- }
- if (cnt > c)
- cnt = c;
- d = iov->iov_base;
- switch (uio->uio_segflg) {
-
- case UIO_USERSPACE:
- if (uio->uio_rw == UIO_READ)
- while (cnt--) {
- char tmp;
-
- tmp = lduba(v++, ASI_PHYS_CACHED);
- error = copyout(&tmp, d++, sizeof(tmp));
- if (error != 0)
- break;
- }
- else
- while (cnt--) {
- char tmp;
-
- error = copyin(d++, &tmp, sizeof(tmp));
- if (error != 0)
- break;
- stba(v++, ASI_PHYS_CACHED, tmp);
- }
- if (error)
- goto unlock;
- break;
-
- case UIO_SYSSPACE:
- if (uio->uio_rw == UIO_READ)
- while (cnt--)
- stba(d++, ASI_P, lduba(v++, ASI_PHYS_CACHED));
- else
- while (cnt--)
- stba(v++, ASI_PHYS_CACHED, lduba(d++, ASI_P));
- break;
- }
- iov->iov_base = (caddr_t)iov->iov_base + cnt;
- iov->iov_len -= cnt;
- uio->uio_resid -= cnt;
- uio->uio_offset += cnt;
- c -= cnt;
- }
- /* Should not be necessary */
- blast_vcache();
- break;
-#endif
/* minor device 1 is kernel memory */
case 1: