From 2f6b4e199c96f3f3322e8f0689352c176d2b46a3 Mon Sep 17 00:00:00 2001 From: miod Date: Mon, 28 Jul 2008 19:08:43 +0000 Subject: [PATCH] No longer clear ci_want_resched within cpu_switchto(), now that it's done in the MI code. --- sys/arch/alpha/alpha/locore.s | 3 +-- sys/arch/amd64/amd64/locore.S | 6 ++---- sys/arch/arm/arm/cpuswitch.S | 10 +--------- sys/arch/hppa/hppa/locore.S | 5 +---- sys/arch/hppa64/hppa64/locore.S | 5 +---- sys/arch/i386/i386/locore.s | 7 ++----- sys/arch/macppc/macppc/locore.S | 5 +---- sys/arch/mips64/mips64/context.S | 3 +-- sys/arch/mvmeppc/mvmeppc/locore.S | 7 +------ sys/arch/socppc/socppc/locore.S | 5 +---- sys/arch/solbourne/solbourne/locore.s | 4 +--- sys/arch/sparc/sparc/locore.s | 4 +--- sys/arch/sparc64/sparc64/locore.s | 3 +-- 13 files changed, 15 insertions(+), 52 deletions(-) diff --git a/sys/arch/alpha/alpha/locore.s b/sys/arch/alpha/alpha/locore.s index 8e455142527..c6b2461ca33 100644 --- a/sys/arch/alpha/alpha/locore.s +++ b/sys/arch/alpha/alpha/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.33 2008/06/26 05:42:08 ray Exp $ */ +/* $OpenBSD: locore.s,v 1.34 2008/07/28 19:08:43 miod Exp $ */ /* $NetBSD: locore.s,v 1.94 2001/04/26 03:10:44 ross Exp $ */ /*- @@ -791,7 +791,6 @@ EXPORT(__bwx_switch1) stq v0, P_CPU(s2) /* p->p_cpu = curcpu() */ #endif stq s2, CPU_INFO_CURPROC(v0) /* curproc = p */ - stq zero, CPU_INFO_WANT_RESCHED(v0) /* we've rescheduled */ /* * Now running on the new u struct. diff --git a/sys/arch/amd64/amd64/locore.S b/sys/arch/amd64/amd64/locore.S index cfb4e2d9850..bcc20ef8ba7 100644 --- a/sys/arch/amd64/amd64/locore.S +++ b/sys/arch/amd64/amd64/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.26 2008/06/27 06:03:07 ray Exp $ */ +/* $OpenBSD: locore.S,v 1.27 2008/07/28 19:08:46 miod Exp $ */ /* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */ /* @@ -752,11 +752,9 @@ ENTRY(cpu_switchto) movq %rdi, %r13 movq %rsi, %r12 - xorq %rax,%rax - movl %eax,CPUVAR(RESCHED) - switch_resume: #ifdef DIAGNOSTIC + xorq %rax,%rax cmpq %rax,P_WCHAN(%r12) jne _C_LABEL(switch_error2) cmpb $SRUN,P_STAT(%r12) diff --git a/sys/arch/arm/arm/cpuswitch.S b/sys/arch/arm/arm/cpuswitch.S index c167c3c5de9..39873cf7a1a 100644 --- a/sys/arch/arm/arm/cpuswitch.S +++ b/sys/arch/arm/arm/cpuswitch.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cpuswitch.S,v 1.9 2007/10/13 12:46:17 miod Exp $ */ +/* $OpenBSD: cpuswitch.S,v 1.10 2008/07/28 19:08:46 miod Exp $ */ /* $NetBSD: cpuswitch.S,v 1.41 2003/11/15 08:44:18 scw Exp $ */ /* @@ -128,9 +128,6 @@ .Lcurproc: .word _C_LABEL(cpu_info_store) + CI_CURPROC -.Lwant_resched: - .word _C_LABEL(want_resched) - .Lcpufuncs: .word _C_LABEL(cpufuncs) @@ -204,11 +201,6 @@ ENTRY(cpu_idle_leave) ENTRY(cpu_switchto) stmfd sp!, {r4-r7, lr} - /* Clear the want_resched flag */ - ldr r7, .Lwant_resched - mov r2, #0x00000000 - str r2, [r7] - #ifdef MULTIPROCESSOR /* XXX use curcpu() */ ldr r2, .Lcpu_info_store diff --git a/sys/arch/hppa/hppa/locore.S b/sys/arch/hppa/hppa/locore.S index 1ae594f1485..f0104e28123 100644 --- a/sys/arch/hppa/hppa/locore.S +++ b/sys/arch/hppa/hppa/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.157 2008/05/21 19:42:05 miod Exp $ */ +/* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -94,7 +94,6 @@ .import esym, data .import curproc, data .import cpu_info_primary, data - .import want_resched, data .import virtual_avail, data .import proc0, data .import proc0paddr, data @@ -2821,8 +2820,6 @@ kstack_check nop kstack_ok #endif - ldil L%want_resched, t4 - stw r0, R%want_resched(t4) /* Record new proc. */ ldi SONPROC, t1 diff --git a/sys/arch/hppa64/hppa64/locore.S b/sys/arch/hppa64/hppa64/locore.S index 59fed31fb35..1be0fa6eaeb 100644 --- a/sys/arch/hppa64/hppa64/locore.S +++ b/sys/arch/hppa64/hppa64/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.8 2008/05/21 19:42:07 miod Exp $ */ +/* $OpenBSD: locore.S,v 1.9 2008/07/28 19:08:46 miod Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -36,7 +36,6 @@ .import boothowto, data .import bootdev, data .import esym, data - .import want_resched, data .import proc0, data .import proc0paddr, data @@ -1508,8 +1507,6 @@ kstack_check nop kstack_ok #endif - ldil L%want_resched, %r1 - stw %r0, R%want_resched(%r1) /* Record new proc. */ ldi SONPROC, %r1 diff --git a/sys/arch/i386/i386/locore.s b/sys/arch/i386/i386/locore.s index 17e25ddc685..a3acaa09e56 100644 --- a/sys/arch/i386/i386/locore.s +++ b/sys/arch/i386/i386/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.123 2008/06/09 20:43:43 miod Exp $ */ +/* $OpenBSD: locore.s,v 1.124 2008/07/28 19:08:46 miod Exp $ */ /* $NetBSD: locore.s,v 1.145 1996/05/03 19:41:19 christos Exp $ */ /*- @@ -1302,11 +1302,8 @@ ENTRY(cpu_switchto) movl 16(%esp), %esi movl 20(%esp), %edi - xorl %eax, %eax - - movl %eax, CPUVAR(RESCHED) - #ifdef DIAGNOSTIC + xorl %eax, %eax cmpl %eax,P_WCHAN(%edi) # Waiting for something? jne _C_LABEL(switch_error1) # Yes; shouldn't be queued. cmpb $SRUN,P_STAT(%edi) # In run state? diff --git a/sys/arch/macppc/macppc/locore.S b/sys/arch/macppc/macppc/locore.S index f34ec003cd7..1004b5629d4 100644 --- a/sys/arch/macppc/macppc/locore.S +++ b/sys/arch/macppc/macppc/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.40 2008/06/10 18:38:59 drahn Exp $ */ +/* $OpenBSD: locore.S,v 1.41 2008/07/28 19:08:46 miod Exp $ */ /* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */ /* @@ -158,9 +158,6 @@ _ENTRY(_C_LABEL(cpu_switchto_asm)) * r5 - cpuinfo */ GET_CPUINFO(%r5) - li %r31,0 - /* just did this resched thing, clear resched */ - stw %r31,CI_WANT_RESCHED(%r5) li %r31,SONPROC stb %r31,P_STAT(%r4) diff --git a/sys/arch/mips64/mips64/context.S b/sys/arch/mips64/mips64/context.S index 70f35ac3ac9..eb9de21acec 100644 --- a/sys/arch/mips64/mips64/context.S +++ b/sys/arch/mips64/mips64/context.S @@ -1,4 +1,4 @@ -/* $OpenBSD: context.S,v 1.19 2008/02/16 18:43:27 miod Exp $ */ +/* $OpenBSD: context.S,v 1.20 2008/07/28 19:08:46 miod Exp $ */ /* * Copyright (c) 2002-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -142,7 +142,6 @@ NON_LEAF(cpu_switchto, FRAMESZ(CF_SZ), ra) * Switch to new context */ move s0, a1 # save p - sw zero, want_resched jal pmap_activate move a0, s0 diff --git a/sys/arch/mvmeppc/mvmeppc/locore.S b/sys/arch/mvmeppc/mvmeppc/locore.S index e14ff02af86..381cb10e373 100644 --- a/sys/arch/mvmeppc/mvmeppc/locore.S +++ b/sys/arch/mvmeppc/mvmeppc/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.12 2005/11/24 12:08:16 pedro Exp $ */ +/* $OpenBSD: locore.S,v 1.13 2008/07/28 19:08:46 miod Exp $ */ /* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */ /* @@ -217,11 +217,6 @@ _C_LABEL(sw1): stw %r9,_C_LABEL(whichqs)@l(%r8) /* mark it empty */ 1: - /* just did this resched thing, clear resched */ - li %r3,0 - lis %r4,_C_LABEL(want_resched)@ha - stw %r3,_C_LABEL(want_resched)@l(%r4) - stw %r3,P_BACK(%r31) /* probably superfluous */ lis %r4,_C_LABEL(curproc)@ha diff --git a/sys/arch/socppc/socppc/locore.S b/sys/arch/socppc/socppc/locore.S index b438788c4f7..3c0fc0af64d 100644 --- a/sys/arch/socppc/socppc/locore.S +++ b/sys/arch/socppc/socppc/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.5 2008/05/14 22:23:48 kettenis Exp $ */ +/* $OpenBSD: locore.S,v 1.6 2008/07/28 19:08:46 miod Exp $ */ /* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */ /* @@ -162,9 +162,6 @@ _ENTRY(_C_LABEL(cpu_switchto_asm)) * r5 - cpuinfo */ GET_CPUINFO(%r5) - li %r31,0 - /* just did this resched thing, clear resched */ - stw %r31,CI_WANT_RESCHED(%r5) li %r31,SONPROC stb %r31,P_STAT(%r4) diff --git a/sys/arch/solbourne/solbourne/locore.s b/sys/arch/solbourne/solbourne/locore.s index f0a6cbd381a..749c80559d0 100644 --- a/sys/arch/solbourne/solbourne/locore.s +++ b/sys/arch/solbourne/solbourne/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.11 2008/07/14 13:13:18 art Exp $ */ +/* $OpenBSD: locore.s,v 1.12 2008/07/28 19:08:46 miod Exp $ */ /* OpenBSD: locore.s,v 1.64 2005/04/17 18:47:50 miod Exp */ /* @@ -3266,8 +3266,6 @@ ENTRY(cpu_switchto) mov SONPROC, %o0 ! p->p_stat = SONPROC stb %o0, [%g3 + P_STAT] - sethi %hi(_C_LABEL(want_resched)), %o0 - st %g0, [%o0 + %lo(_C_LABEL(want_resched))] ! want_resched = 0; ld [%g3 + P_ADDR], %g5 ! newpcb = p->p_addr; ld [%g5 + PCB_PSR], %g2 ! newpsr = newpcb->pcb_psr; st %g3, [%g7 + %lo(_C_LABEL(curproc))] ! curproc = p; diff --git a/sys/arch/sparc/sparc/locore.s b/sys/arch/sparc/sparc/locore.s index abb105a2b53..7b996396ca4 100644 --- a/sys/arch/sparc/sparc/locore.s +++ b/sys/arch/sparc/sparc/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.80 2008/07/16 16:40:05 miod Exp $ */ +/* $OpenBSD: locore.s,v 1.81 2008/07/28 19:08:46 miod Exp $ */ /* $NetBSD: locore.s,v 1.73 1997/09/13 20:36:48 pk Exp $ */ /* @@ -4411,8 +4411,6 @@ ENTRY(cpu_switchto) mov SONPROC, %o0 ! p->p_stat = SONPROC stb %o0, [%g3 + P_STAT] - sethi %hi(_C_LABEL(want_resched)), %o0 - st %g0, [%o0 + %lo(_C_LABEL(want_resched))] ! want_resched = 0; ld [%g3 + P_ADDR], %g5 ! newpcb = p->p_addr; ld [%g5 + PCB_PSR], %g2 ! newpsr = newpcb->pcb_psr; st %g3, [%g7 + %lo(_C_LABEL(curproc))] ! curproc = p; diff --git a/sys/arch/sparc64/sparc64/locore.s b/sys/arch/sparc64/sparc64/locore.s index 41a6b980189..bfdc65fbc40 100644 --- a/sys/arch/sparc64/sparc64/locore.s +++ b/sys/arch/sparc64/sparc64/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.148 2008/07/25 14:53:38 kettenis Exp $ */ +/* $OpenBSD: locore.s,v 1.149 2008/07/28 19:08:46 miod Exp $ */ /* $NetBSD: locore.s,v 1.137 2001/08/13 06:10:10 jdolecek Exp $ */ /* @@ -6081,7 +6081,6 @@ ENTRY(cpu_switchto) #endif /* defined(MULTIPROCESSOR) */ mov SONPROC, %o0 ! newproc->p_stat = SONPROC stb %o0, [%i1 + P_STAT] - st %g0, [%g7 + CI_WANT_RESCHED] ! want_resched = 0; ldx [%i1 + P_ADDR], %l1 ! newpcb = newpeoc->p_addr; flushw ! save all register windows except this one -- 2.20.1