]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/smp: Handle restart interrupt on ipl cpu
authorSven Schnelle <svens@linux.ibm.com>
Tue, 16 Jul 2024 07:26:13 +0000 (09:26 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 23 Jul 2024 14:02:31 +0000 (16:02 +0200)
The current smp code allows to trigger a restart interrupt on CPUs
offline in linux. To allow using the percpu infrastructure instead
of the pcpu_devices array, switch to the ipl cpu which is always
online before calling do_restart().

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/smp.h
arch/s390/kernel/ipl.c
arch/s390/kernel/smp.c

index c13c79025348c39a9e18269bbb8d746e597fe6f7..cd835f4fb11a1dafcab776bef676542765c799c9 100644 (file)
@@ -24,7 +24,6 @@ extern int __cpu_up(unsigned int cpu, struct task_struct *tidle);
 extern void arch_send_call_function_single_ipi(int cpu);
 extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
 
-extern void smp_call_online_cpu(void (*func)(void *), void *);
 extern void smp_call_ipl_cpu(void (*func)(void *), void *);
 extern void smp_emergency_stop(void);
 
index 3a7d6e1722112ac37813329309cab839cc454580..f17bb7bf939242c4a012cfff1dd0b0e6191354f4 100644 (file)
@@ -2112,7 +2112,7 @@ void do_restart(void *arg)
        tracing_off();
        debug_locks_off();
        lgr_info_log();
-       smp_call_online_cpu(__do_restart, arg);
+       smp_call_ipl_cpu(__do_restart, arg);
 }
 
 /* on halt */
index c3c54adf67bc23a7683376558ad6425cb4cb8cbc..1e1290525423022cd91d949bab5b47ce3f95b4fd 100644 (file)
@@ -382,21 +382,6 @@ static int pcpu_set_smt(unsigned int mtid)
        return cc;
 }
 
-/*
- * Call function on an online CPU.
- */
-void smp_call_online_cpu(void (*func)(void *), void *data)
-{
-       struct pcpu *pcpu;
-
-       /* Use the current cpu if it is online. */
-       pcpu = pcpu_find_address(cpu_online_mask, stap());
-       if (!pcpu)
-               /* Use the first online cpu. */
-               pcpu = pcpu_devices + cpumask_first(cpu_online_mask);
-       pcpu_delegate(pcpu, func, data, (unsigned long) restart_stack);
-}
-
 /*
  * Call function on the ipl CPU.
  */