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.
This commit is contained in:
Justin Hibbits 2019-04-29 22:37:35 +00:00
parent b4e761959b
commit 7122ab6ed3

View File

@ -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