s390/smp: perform cpu reset before delegating work to target cpu
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 27 Feb 2023 17:56:10 +0000 (18:56 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 28 Feb 2023 12:19:06 +0000 (13:19 +0100)
Clear CPU state (e.g. all TLB entries, prefetched instructions, etc.)
of the target CPU, however without clearing register contents before
starting any work on it.

This puts the target CPU in a more defined state compared to the
current Stop + Restart sigp orders.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/smp.c

index 9796152..d488845 100644 (file)
@@ -333,6 +333,7 @@ static void pcpu_delegate(struct pcpu *pcpu,
        }
        /* Stop target cpu (if func returns this stops the current cpu). */
        pcpu_sigp_retry(pcpu, SIGP_STOP, 0);
+       pcpu_sigp_retry(pcpu, SIGP_CPU_RESET, 0);
        /* Restart func on the target cpu and stop the current cpu. */
        if (lc) {
                lc->restart_stack = stack;