Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/powerpc Remove worthless load.
details: https://anonhg.NetBSD.org/src/rev/f1cc6866ec5c
branches: trunk
changeset: 553495:f1cc6866ec5c
user: matt <matt%NetBSD.org@localhost>
date: Fri Oct 17 22:21:38 2003 +0000
description:
Remove worthless load.
Save curcpu before doing uniprocessor dispatch.
diffstat:
sys/arch/powerpc/powerpc/locore_subr.S | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diffs (71 lines):
diff -r 3702da8961e8 -r f1cc6866ec5c sys/arch/powerpc/powerpc/locore_subr.S
--- a/sys/arch/powerpc/powerpc/locore_subr.S Fri Oct 17 22:11:48 2003 +0000
+++ b/sys/arch/powerpc/powerpc/locore_subr.S Fri Oct 17 22:21:38 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore_subr.S,v 1.22 2003/10/17 21:08:57 matt Exp $ */
+/* $NetBSD: locore_subr.S,v 1.23 2003/10/17 22:21:38 matt Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -278,7 +278,6 @@
#endif
li %r0,0
streg %r0,CI_CURLWP(%r7) /* Zero to not accumulate cpu time */
- ldptr %r0,CI_CURPCB(%r7)
/* Lock the scheduler. */
#if defined(PPC_IBM4XX)
@@ -345,12 +344,12 @@
1:
/* just did this resched thing */
li %r3,0
- GET_CPUINFO(%r4)
- stint %r3,CI_WANT_RESCHED(%r4)
+ GET_CPUINFO(%r7)
+ stint %r3,CI_WANT_RESCHED(%r7)
streg %r3,L_BACK(%r31) /* probably superfluous */
#ifdef MULTIPROCESSOR
- streg %r4,L_CPU(%r31) /* l->l_cpu = curcpu() */
+ streg %r7,L_CPU(%r31) /* l->l_cpu = curcpu() */
#endif
/* lwp now running on a processor. */
@@ -358,8 +357,19 @@
stint %r3,L_STAT(%r31)
/* record new lwp */
- stptr %r31,CI_CURLWP(%r4)
+ stptr %r31,CI_CURLWP(%r7)
ldptr %r4,L_ADDR(%r31) /* put PCB addr in r4 */
+ stptr %r4,CI_CURPCB(%r7) /* indicate new pcb */
+#if 0
+ li %r3,CI_CURPCB
+#ifdef PPC_OEA64
+ stdcx. %r4,%r3,%r7 /* clear possible reservation */
+#else
+ stwcx. %r4,%r3,%r7 /* clear possible reservation */
+#endif
+ isync
+#endif
+
#if !defined(MULTIPROCESSOR) /* XXX */
li %r3,0 /* if it is the same lwp, return 0 */
@@ -386,16 +396,6 @@
switch_exited:
#endif
- /* indicate new pcb */
- GET_CPUINFO(%r6)
- stptru %r4,CI_CURPCB(%r6)
-#ifdef PPC_OEA64
- stdcx. %r4,%r0,%r6 /* clear possible reservation */
-#else
- stwcx. %r4,%r0,%r6 /* clear possible reservation */
-#endif
- isync
-
ldreg %r1,PCB_SP(%r4) /* get new lwp's SP */
SWITCHFRAME_RESTORE(%r1) /* get non-volatile, CR, R2, USER_SR */
ldreg %r1,0(%r1) /* get saved SP */
Home |
Main Index |
Thread Index |
Old Index