svn commit: r346935 - head/sys/powerpc/powerpc
Justin Hibbits
jhibbits at FreeBSD.org
Mon Apr 29 22:37:36 UTC 2019
Author: jhibbits
Date: Mon Apr 29 22:37:35 2019
New Revision: 346935
URL: https://svnweb.freebsd.org/changeset/base/346935
Log:
powerpc64: Fix switch panic from cpu_throw()
r18 is used to hold the old PCB flags, but cpu_throw doesn't populate r18
with PCB flags, since the old thread is gone. This can lead to panics on
cores that don't have the registers guarded by these flags.
Modified:
head/sys/powerpc/powerpc/swtch64.S
Modified: head/sys/powerpc/powerpc/swtch64.S
==============================================================================
--- head/sys/powerpc/powerpc/swtch64.S Mon Apr 29 22:16:33 2019 (r346934)
+++ head/sys/powerpc/powerpc/swtch64.S Mon Apr 29 22:37:35 2019 (r346935)
@@ -78,6 +78,7 @@ TOC_ENTRY(blocked_lock)
ENTRY(cpu_throw)
mr %r13, %r4
li %r14,0 /* Tell cpu_switchin not to release a thread */
+ li %r18,0 /* No old pcb flags. The old thread is extinguished. */
b cpu_switchin
More information about the svn-src-all
mailing list