From: claudio Date: Tue, 28 May 2024 09:27:54 +0000 (+0000) Subject: cpu_emergency_disable() was only used by mvme88k and can be removed now. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f943bcf5c784ca019617bbc8de518ecb78c99e2b;p=openbsd cpu_emergency_disable() was only used by mvme88k and can be removed now. This removes one of the SCHED_LOCK usages in arch. OK miod@ --- diff --git a/sys/arch/m88k/include/cpu.h b/sys/arch/m88k/include/cpu.h index 2f82380bf4a..d5ce5dff711 100644 --- a/sys/arch/m88k/include/cpu.h +++ b/sys/arch/m88k/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.77 2024/03/31 07:23:29 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.78 2024/05/28 09:27:54 claudio Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * Copyright (c) 1992, 1993 @@ -208,7 +208,6 @@ curcpu(void) #define CPU_IS_RUNNING(ci) ((ci)->ci_flags & CIF_ALIVE) void cpu_boot_secondary_processors(void); -__dead void cpu_emergency_disable(void); void cpu_unidle(struct cpu_info *); void m88k_send_ipi(int, cpuid_t); void m88k_broadcast_ipi(int); diff --git a/sys/arch/m88k/m88k/m88k_machdep.c b/sys/arch/m88k/m88k/m88k_machdep.c index dcf3a14f628..4245a65f598 100644 --- a/sys/arch/m88k/m88k/m88k_machdep.c +++ b/sys/arch/m88k/m88k/m88k_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: m88k_machdep.c,v 1.72 2023/01/06 19:10:18 miod Exp $ */ +/* $OpenBSD: m88k_machdep.c,v 1.73 2024/05/28 09:27:54 claudio Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -500,44 +500,3 @@ atomic_init() #endif /* M88100 && M88110 */ } #endif /* MULTIPROCESSOR */ - -#ifdef MULTIPROCESSOR - -/* - * This function is invoked when it turns out one secondary processor is - * not usable. - * Be sure to put the process currently running on it in the run queues, - * so that another processor can take care of it. - */ -__dead void -cpu_emergency_disable() -{ - struct cpu_info *ci = curcpu(); - struct schedstate_percpu *spc = &ci->ci_schedstate; - struct proc *p = curproc; - int s; - extern void savectx(struct pcb *); - - if (p != NULL && p != spc->spc_idleproc) { - savectx(curpcb); - - /* - * The following is an inline yield(), without the call - * to mi_switch(). - */ - SCHED_LOCK(s); - setrunqueue(p->p_cpu, p, p->p_usrpri); - p->p_ru.ru_nvcsw++; - SCHED_UNLOCK(s); - } - - CLR(ci->ci_flags, CIF_ALIVE); - set_psr(get_psr() | PSR_IND); - splhigh(); - - for (;;) - continue; - /* NOTREACHED */ -} - -#endif /* MULTIPROCESSOR */