Skip to content

Commit f4192bf

Browse files
Michael HolzheuMartin Schwidefsky
authored andcommitted
s390/smp: Avoid busy loop after halt and "begin" on z/VM
Currently the smp_stop_cpu() function for SMP kernels enters a busy loop when "begin" is entered on the z/VM console after Linux is halted. To avoid this behavior, use the non-SMP variant of smp_stop_cpu() which stops the CPU again after "begin" is entered. As a side effect we now have consistent behavior for SMP and non-SMP Linux. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 0d234a2 commit f4192bf

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

‎arch/s390/include/asm/smp.h‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ extern int smp_store_status(int cpu);
3030
extern int smp_vcpu_scheduled(int cpu);
3131
extern void smp_yield_cpu(int cpu);
3232
extern void smp_yield(void);
33-
extern void smp_stop_cpu(void);
3433
extern void smp_cpu_set_polarization(int cpu, int val);
3534
extern int smp_cpu_get_polarization(int cpu);
3635
extern void smp_fill_possible_mask(void);
@@ -54,6 +53,8 @@ static inline void smp_yield_cpu(int cpu) { }
5453
static inline void smp_yield(void) { }
5554
static inline void smp_fill_possible_mask(void) { }
5655

56+
#endif /* CONFIG_SMP */
57+
5758
static inline void smp_stop_cpu(void)
5859
{
5960
u16 pcpu = stap();
@@ -64,8 +65,6 @@ static inline void smp_stop_cpu(void)
6465
}
6566
}
6667

67-
#endif /* CONFIG_SMP */
68-
6968
#ifdef CONFIG_HOTPLUG_CPU
7069
extern int smp_rescan_cpus(void);
7170
extern void __noreturn cpu_die(void);

‎arch/s390/kernel/smp.c‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -404,15 +404,6 @@ void smp_send_stop(void)
404404
}
405405
}
406406

407-
/*
408-
* Stop the current cpu.
409-
*/
410-
void smp_stop_cpu(void)
411-
{
412-
pcpu_sigp_retry(pcpu_devices + smp_processor_id(), SIGP_STOP, 0);
413-
for (;;) ;
414-
}
415-
416407
/*
417408
* This is the main routine where commands issued by other
418409
* cpus are handled.

0 commit comments

Comments
 (0)