From owner-cvs-src-old@FreeBSD.ORG Thu Aug 13 17:25:57 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C33810656AA for ; Thu, 13 Aug 2009 17:25:57 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 255DE8FC48 for ; Thu, 13 Aug 2009 17:25:57 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DHPv8E020831 for ; Thu, 13 Aug 2009 17:25:57 GMT (envelope-from attilio@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n7DHPvRf020830 for cvs-src-old@freebsd.org; Thu, 13 Aug 2009 17:25:57 GMT (envelope-from attilio@repoman.freebsd.org) Message-Id: <200908131725.n7DHPvRf020830@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to attilio@repoman.freebsd.org using -f From: Attilio Rao Date: Thu, 13 Aug 2009 17:09:45 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src UPDATING src/sys/amd64/amd64 local_apic.c mp_machdep.c trap.c src/sys/amd64/conf GENERIC NOTES XENHVM src/sys/amd64/include apicvar.h smp.h src/sys/conf options.amd64 options.i386 options.pc98 src/sys/i386/conf GENERIC NOTES ... X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 17:25:58 -0000 attilio 2009-08-13 17:09:45 UTC FreeBSD src repository Modified files: . UPDATING sys/amd64/amd64 local_apic.c mp_machdep.c trap.c sys/amd64/conf GENERIC NOTES XENHVM sys/amd64/include apicvar.h smp.h sys/conf options.amd64 options.i386 options.pc98 sys/i386/conf GENERIC NOTES sys/i386/i386 local_apic.c mp_machdep.c trap.c sys/i386/include apicvar.h smp.h sys/i386/xen mp_machdep.c sys/ia64/ia64 interrupt.c sys/ia64/include smp.h sys/kern kern_shutdown.c subr_kdb.c subr_smp.c sys/mips/include smp.h sys/mips/mips mp_machdep.c sys/pc98/conf NOTES sys/powerpc/include smp.h sys/powerpc/powerpc mp_machdep.c sys/sparc64/include smp.h sys/sun4v/include smp.h sys/sys smp.h Log: SVN rev 196196 on 2009-08-13 17:09:45Z by attilio * Completely Remove the option STOP_NMI from the kernel. This option has proven to have a good effect when entering KDB by using a NMI, but it completely violates all the good rules about interrupts disabled while holding a spinlock in other occasions. This can be the cause of deadlocks on events where a normal IPI_STOP is expected. * Adds an new IPI called IPI_STOP_HARD on all the supported architectures. This IPI is responsible for sending a stop message among CPUs using a privileged channel when disponible. In other cases it just does match a normal IPI_STOP. Right now the IPI_STOP_HARD functionality uses a NMI on ia32 and amd64 architectures, while on the other has a normal IPI_STOP effect. It is responsibility of maintainers to eventually implement an hard stop when necessary and possible. * Use the new IPI facility in order to implement a new userend SMP kernel function called stop_cpus_hard(). That is specular to stop_cpu() but it does use the privileged channel for the stopping facility. * Let KDB use the newly introduced function stop_cpus_hard() and leave stop_cpus() for all the other cases * Disable interrupts on CPU0 when starting the process of APs suspension. * Style cleanup and comments adding This patch should fix the reboot/shutdown deadlocks many users are constantly reporting on mailing lists. Please don't forget to update your config file with the STOP_NMI option removal Reviewed by: jhb Tested by: pho, bz, rink Approved by: re (kib) Revision Changes Path 1.633 +6 -0 src/UPDATING 1.59 +11 -2 src/sys/amd64/amd64/local_apic.c 1.310 +31 -69 src/sys/amd64/amd64/mp_machdep.c 1.333 +0 -2 src/sys/amd64/amd64/trap.c 1.532 +0 -1 src/sys/amd64/conf/GENERIC 1.92 +0 -5 src/sys/amd64/conf/NOTES 1.4 +0 -1 src/sys/amd64/conf/XENHVM 1.30 +1 -5 src/sys/amd64/include/apicvar.h 1.97 +1 -4 src/sys/amd64/include/smp.h 1.36 +0 -1 src/sys/conf/options.amd64 1.245 +0 -1 src/sys/conf/options.i386 1.206 +0 -1 src/sys/conf/options.pc98 1.520 +0 -1 src/sys/i386/conf/GENERIC 1.1276 +0 -1 src/sys/i386/conf/NOTES 1.62 +11 -2 src/sys/i386/i386/local_apic.c 1.303 +30 -69 src/sys/i386/i386/mp_machdep.c 1.321 +0 -2 src/sys/i386/i386/trap.c 1.33 +2 -5 src/sys/i386/include/apicvar.h 1.100 +2 -4 src/sys/i386/include/smp.h 1.22 +0 -2 src/sys/i386/xen/mp_machdep.c 1.71 +2 -0 src/sys/ia64/ia64/interrupt.c 1.12 +1 -0 src/sys/ia64/include/smp.h 1.199 +7 -3 src/sys/kern/kern_shutdown.c 1.28 +4 -3 src/sys/kern/subr_kdb.c 1.215 +21 -4 src/sys/kern/subr_smp.c 1.3 +1 -0 src/sys/mips/include/smp.h 1.5 +6 -1 src/sys/mips/mips/mp_machdep.c 1.101 +0 -4 src/sys/pc98/conf/NOTES 1.6 +1 -0 src/sys/powerpc/include/smp.h 1.25 +7 -1 src/sys/powerpc/powerpc/mp_machdep.c 1.26 +1 -0 src/sys/sparc64/include/smp.h 1.7 +1 -0 src/sys/sun4v/include/smp.h 1.91 +1 -0 src/sys/sys/smp.h