sparc64: Kill error_mask from hypervisor_xcall_deliver().
It can eat up a lot of stack space when NR_CPUS is large. We retain some of it's functionality by reporting at least one of the cpu's which are seen in error state. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
90f7ae8a55
commit
ed4d9c66eb
@ -626,16 +626,15 @@ retry:
|
|||||||
/* Multi-cpu list version. */
|
/* Multi-cpu list version. */
|
||||||
static void hypervisor_xcall_deliver(struct trap_per_cpu *tb, int cnt)
|
static void hypervisor_xcall_deliver(struct trap_per_cpu *tb, int cnt)
|
||||||
{
|
{
|
||||||
int retries, this_cpu, prev_sent, i;
|
int retries, this_cpu, prev_sent, i, saw_cpu_error;
|
||||||
unsigned long status;
|
unsigned long status;
|
||||||
cpumask_t error_mask;
|
|
||||||
u16 *cpu_list;
|
u16 *cpu_list;
|
||||||
|
|
||||||
this_cpu = smp_processor_id();
|
this_cpu = smp_processor_id();
|
||||||
|
|
||||||
cpu_list = __va(tb->cpu_list_pa);
|
cpu_list = __va(tb->cpu_list_pa);
|
||||||
|
|
||||||
cpus_clear(error_mask);
|
saw_cpu_error = 0;
|
||||||
retries = 0;
|
retries = 0;
|
||||||
prev_sent = 0;
|
prev_sent = 0;
|
||||||
do {
|
do {
|
||||||
@ -680,10 +679,9 @@ static void hypervisor_xcall_deliver(struct trap_per_cpu *tb, int cnt)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
err = sun4v_cpu_state(cpu);
|
err = sun4v_cpu_state(cpu);
|
||||||
if (err >= 0 &&
|
if (err == HV_CPU_STATE_ERROR) {
|
||||||
err == HV_CPU_STATE_ERROR) {
|
saw_cpu_error = (cpu + 1);
|
||||||
cpu_list[i] = 0xffff;
|
cpu_list[i] = 0xffff;
|
||||||
cpu_set(cpu, error_mask);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (unlikely(status != HV_EWOULDBLOCK))
|
} else if (unlikely(status != HV_EWOULDBLOCK))
|
||||||
@ -707,19 +705,15 @@ static void hypervisor_xcall_deliver(struct trap_per_cpu *tb, int cnt)
|
|||||||
}
|
}
|
||||||
} while (1);
|
} while (1);
|
||||||
|
|
||||||
if (unlikely(!cpus_empty(error_mask)))
|
if (unlikely(saw_cpu_error))
|
||||||
goto fatal_mondo_cpu_error;
|
goto fatal_mondo_cpu_error;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fatal_mondo_cpu_error:
|
fatal_mondo_cpu_error:
|
||||||
printk(KERN_CRIT "CPU[%d]: SUN4V mondo cpu error, some target cpus "
|
printk(KERN_CRIT "CPU[%d]: SUN4V mondo cpu error, some target cpus "
|
||||||
"were in error state\n",
|
"(including %d) were in error state\n",
|
||||||
this_cpu);
|
this_cpu, saw_cpu_error - 1);
|
||||||
printk(KERN_CRIT "CPU[%d]: Error mask [ ", this_cpu);
|
|
||||||
for_each_cpu_mask_nr(i, error_mask)
|
|
||||||
printk("%d ", i);
|
|
||||||
printk("]\n");
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fatal_mondo_timeout:
|
fatal_mondo_timeout:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user