From owner-svn-src-stable@freebsd.org Fri Apr 6 12:39:34 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E8FFF81D8A; Fri, 6 Apr 2018 12:39:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B0C978DAC; Fri, 6 Apr 2018 12:39:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 05F6E11D6E; Fri, 6 Apr 2018 12:39:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w36CdX53015118; Fri, 6 Apr 2018 12:39:33 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w36CdX1l015117; Fri, 6 Apr 2018 12:39:33 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201804061239.w36CdX1l015117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 6 Apr 2018 12:39:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r332097 - stable/11/sys/i386/i386 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/i386/i386 X-SVN-Commit-Revision: 332097 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2018 12:39:34 -0000 Author: avg Date: Fri Apr 6 12:39:33 2018 New Revision: 332097 URL: https://svnweb.freebsd.org/changeset/base/332097 Log: MFC r331761: align i386 cpu_reset() with amd64 version Modified: stable/11/sys/i386/i386/vm_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/11/sys/i386/i386/vm_machdep.c Fri Apr 6 12:23:59 2018 (r332096) +++ stable/11/sys/i386/i386/vm_machdep.c Fri Apr 6 12:39:33 2018 (r332097) @@ -594,7 +594,8 @@ cpu_reset_proxy() cpu_reset_proxy_active = 1; while (cpu_reset_proxy_active == 1) - ; /* Wait for other cpu to see that we've started */ + ia32_pause(); /* Wait for other cpu to see that we've started */ + CPU_SETOF(cpu_reset_proxyid, &tcrp); stop_cpus(tcrp); printf("cpu_reset_proxy: Stopped CPU %d\n", cpu_reset_proxyid); @@ -634,19 +635,21 @@ cpu_reset() printf("cpu_reset: Restarting BSP\n"); /* Restart CPU #0. */ - /* XXX: restart_cpus(1 << 0); */ CPU_SETOF(0, &started_cpus); wmb(); cnt = 0; - while (cpu_reset_proxy_active == 0 && cnt < 10000000) + while (cpu_reset_proxy_active == 0 && cnt < 10000000) { + ia32_pause(); cnt++; /* Wait for BSP to announce restart */ + } if (cpu_reset_proxy_active == 0) printf("cpu_reset: Failed to restart BSP\n"); enable_intr(); cpu_reset_proxy_active = 2; - while (1); + while (1) + ia32_pause(); /* NOTREACHED */ }