[S390] smp: perform initial cpu reset before starting a cpu
Performing an initial cpu reset makes sure all registers and tlbs of the targeted cpu are initialized and flushed. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
committed by
Martin Schwidefsky
parent
6d54c5a3fb
commit
d0d3cdf4c2
@@ -534,18 +534,23 @@ int __cpuinit __cpu_up(unsigned int cpu)
|
|||||||
struct _lowcore *cpu_lowcore;
|
struct _lowcore *cpu_lowcore;
|
||||||
struct stack_frame *sf;
|
struct stack_frame *sf;
|
||||||
sigp_ccode ccode;
|
sigp_ccode ccode;
|
||||||
|
u32 lowcore;
|
||||||
|
|
||||||
if (smp_cpu_state[cpu] != CPU_STATE_CONFIGURED)
|
if (smp_cpu_state[cpu] != CPU_STATE_CONFIGURED)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
if (smp_alloc_lowcore(cpu))
|
if (smp_alloc_lowcore(cpu))
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
do {
|
||||||
|
ccode = signal_processor(cpu, sigp_initial_cpu_reset);
|
||||||
|
if (ccode == sigp_busy)
|
||||||
|
udelay(10);
|
||||||
|
if (ccode == sigp_not_operational)
|
||||||
|
goto err_out;
|
||||||
|
} while (ccode == sigp_busy);
|
||||||
|
|
||||||
ccode = signal_processor_p((__u32)(unsigned long)(lowcore_ptr[cpu]),
|
lowcore = (u32)(unsigned long)lowcore_ptr[cpu];
|
||||||
cpu, sigp_set_prefix);
|
while (signal_processor_p(lowcore, cpu, sigp_set_prefix) == sigp_busy)
|
||||||
if (ccode) {
|
udelay(10);
|
||||||
smp_free_lowcore(cpu);
|
|
||||||
return -EIO;
|
|
||||||
}
|
|
||||||
|
|
||||||
idle = current_set[cpu];
|
idle = current_set[cpu];
|
||||||
cpu_lowcore = lowcore_ptr[cpu];
|
cpu_lowcore = lowcore_ptr[cpu];
|
||||||
@@ -574,6 +579,10 @@ int __cpuinit __cpu_up(unsigned int cpu)
|
|||||||
while (!cpu_online(cpu))
|
while (!cpu_online(cpu))
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err_out:
|
||||||
|
smp_free_lowcore(cpu);
|
||||||
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init setup_possible_cpus(char *s)
|
static int __init setup_possible_cpus(char *s)
|
||||||
|
Reference in New Issue
Block a user