Commit f4192bf2 authored by Michael Holzheu's avatar Michael Holzheu Committed by Martin Schwidefsky

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: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 0d234a28
...@@ -30,7 +30,6 @@ extern int smp_store_status(int cpu); ...@@ -30,7 +30,6 @@ extern int smp_store_status(int cpu);
extern int smp_vcpu_scheduled(int cpu); extern int smp_vcpu_scheduled(int cpu);
extern void smp_yield_cpu(int cpu); extern void smp_yield_cpu(int cpu);
extern void smp_yield(void); extern void smp_yield(void);
extern void smp_stop_cpu(void);
extern void smp_cpu_set_polarization(int cpu, int val); extern void smp_cpu_set_polarization(int cpu, int val);
extern int smp_cpu_get_polarization(int cpu); extern int smp_cpu_get_polarization(int cpu);
extern void smp_fill_possible_mask(void); extern void smp_fill_possible_mask(void);
...@@ -54,6 +53,8 @@ static inline void smp_yield_cpu(int cpu) { } ...@@ -54,6 +53,8 @@ static inline void smp_yield_cpu(int cpu) { }
static inline void smp_yield(void) { } static inline void smp_yield(void) { }
static inline void smp_fill_possible_mask(void) { } static inline void smp_fill_possible_mask(void) { }
#endif /* CONFIG_SMP */
static inline void smp_stop_cpu(void) static inline void smp_stop_cpu(void)
{ {
u16 pcpu = stap(); u16 pcpu = stap();
...@@ -64,8 +65,6 @@ static inline void smp_stop_cpu(void) ...@@ -64,8 +65,6 @@ static inline void smp_stop_cpu(void)
} }
} }
#endif /* CONFIG_SMP */
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
extern int smp_rescan_cpus(void); extern int smp_rescan_cpus(void);
extern void __noreturn cpu_die(void); extern void __noreturn cpu_die(void);
......
...@@ -404,15 +404,6 @@ void smp_send_stop(void) ...@@ -404,15 +404,6 @@ void smp_send_stop(void)
} }
} }
/*
* Stop the current cpu.
*/
void smp_stop_cpu(void)
{
pcpu_sigp_retry(pcpu_devices + smp_processor_id(), SIGP_STOP, 0);
for (;;) ;
}
/* /*
* This is the main routine where commands issued by other * This is the main routine where commands issued by other
* cpus are handled. * cpus are handled.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment