Date: Mon, 2 Apr 2018 08:06:19 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331875 - in head/sys: amd64/amd64 i386/i386 Message-ID: <201804020806.w3286J4l000180@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Mon Apr 2 08:06:18 2018 New Revision: 331875 URL: https://svnweb.freebsd.org/changeset/base/331875 Log: x86 cpu_reset: if failed to switch to BSP proceed to cpu_reset_real If cpu_reset() is called on an AP and if it somehow fails to wake the BSP, then it's better to attempt the reset on the AP than just sit there spinning on an unusable and undebuggable system. MFC after: 16 days Modified: head/sys/amd64/amd64/vm_machdep.c head/sys/i386/i386/vm_machdep.c Modified: head/sys/amd64/amd64/vm_machdep.c ============================================================================== --- head/sys/amd64/amd64/vm_machdep.c Mon Apr 2 07:45:13 2018 (r331874) +++ head/sys/amd64/amd64/vm_machdep.c Mon Apr 2 08:06:18 2018 (r331875) @@ -611,13 +611,14 @@ cpu_reset() ia32_pause(); cnt++; /* Wait for BSP to announce restart */ } - if (cpu_reset_proxy_active == 0) + if (cpu_reset_proxy_active == 0) { printf("cpu_reset: Failed to restart BSP\n"); - cpu_reset_proxy_active = 2; - - while (1) - ia32_pause(); - /* NOTREACHED */ + } else { + cpu_reset_proxy_active = 2; + while (1) + ia32_pause(); + /* NOTREACHED */ + } } DELAY(1000000); Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Mon Apr 2 07:45:13 2018 (r331874) +++ head/sys/i386/i386/vm_machdep.c Mon Apr 2 08:06:18 2018 (r331875) @@ -623,13 +623,14 @@ cpu_reset() ia32_pause(); cnt++; /* Wait for BSP to announce restart */ } - if (cpu_reset_proxy_active == 0) + if (cpu_reset_proxy_active == 0) { printf("cpu_reset: Failed to restart BSP\n"); - cpu_reset_proxy_active = 2; - - while (1) - ia32_pause(); - /* NOTREACHED */ + } else { + cpu_reset_proxy_active = 2; + while (1) + ia32_pause(); + /* NOTREACHED */ + } } DELAY(1000000);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804020806.w3286J4l000180>