diff options
author | Marcus Watts <mdw@cvs.openbsd.org> | 2002-06-08 21:54:50 +0000 |
---|---|---|
committer | Marcus Watts <mdw@cvs.openbsd.org> | 2002-06-08 21:54:50 +0000 |
commit | 2ef5ec5e04a0cb635a09d3c0f7539d2284e898b7 (patch) | |
tree | 0b1c87bc91d5ebffe54096f20c14cb955157adec /sys/arch/sparc64 | |
parent | a60f73f516d8d06012d7bc7136dc1076e75ad9d5 (diff) |
Netbsd cache flush speedup to dcache_flush_page.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/sparc64/locore.s | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s index 803fc273af1..23ebe77c210 100644 --- a/sys/arch/sparc64/sparc64/locore.s +++ b/sys/arch/sparc64/sparc64/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.15 2002/06/08 08:06:46 art Exp $ */ +/* $OpenBSD: locore.s,v 1.16 2002/06/08 21:54:49 mdw Exp $ */ /* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */ /* @@ -6055,26 +6055,32 @@ _C_LABEL(dcache_flush_page): clr %o4 srl %o1, 2, %o1 ! Now we have bits <29:0> set set (2*NBPG), %o5 - andn %o1, 3, %o1 ! Now we have bits <29:2> set - + ba,pt %icc, 1f + andn %o1, 3, %o1 ! Now we have bits <29:2> set + + .align 8 1: ldxa [%o4] ASI_DCACHE_TAG, %o3 + mov %o4, %o0 + deccc 16, %o5 + bl,pn %icc, 2f + + inc 16, %o4 xor %o3, %o2, %o3 andcc %o3, %o1, %g0 - bne,pt %xcc, 2f - dec 16, %o5 - membar #LoadStore - stxa %g0, [%o4] ASI_DCACHE_TAG - membar #StoreLoad + bne,pt %xcc, 1b + membar #LoadStore + + stxa %g0, [%o0] ASI_DCACHE_TAG + ba,pt %icc, 1b + membar #StoreLoad 2: - brnz,pt %o5, 1b - inc 16, %o4 + wr %g0, ASI_PRIMARY_NOFAULT, %asi sethi %hi(KERNBASE), %o5 flush %o5 - membar #Sync retl - nop + membar #Sync /* * cache_flush_virt(va, len) |