diff --git a/sys/sparc64/sparc64/mp_machdep.c b/sys/sparc64/sparc64/mp_machdep.c index bf79adfdb5cd..5470c113e55d 100644 --- a/sys/sparc64/sparc64/mp_machdep.c +++ b/sys/sparc64/sparc64/mp_machdep.c @@ -116,14 +116,12 @@ cpu_ipi_selected_t *cpu_ipi_selected; static vm_offset_t mp_tramp; static u_int cpuid_to_mid[MAXCPU]; -static int has_stopself; static int isjbus; static volatile u_int shutdown_cpus; static void cpu_mp_unleash(void *v); static void spitfire_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2); static void sun4u_startcpu(phandle_t cpu, void *func, u_long arg); -static void sun4u_stopself(void); static cpu_ipi_selected_t cheetah_ipi_selected; static cpu_ipi_selected_t spitfire_ipi_selected; @@ -224,24 +222,6 @@ sun4u_startcpu(phandle_t cpu, void *func, u_long arg) ofw_entry(&args); } -/* - * Stop the calling CPU. - */ -static void -sun4u_stopself(void) -{ - static struct { - cell_t name; - cell_t nargs; - cell_t nreturns; - } args = { - (cell_t)SUNW_STOPSELF, - }; - - ofw_exit(&args); - panic("%s: failed.", __func__); -} - /* * Fire up any non-boot processors. */ @@ -260,9 +240,6 @@ cpu_mp_start(void) mtx_init(&ipi_mtx, "ipi", NULL, MTX_SPIN); - if (OF_test(SUNW_STOPSELF) == 0) - has_stopself = 1; - intr_setup(PIL_AST, cpu_ipi_ast, -1, NULL, NULL); intr_setup(PIL_RENDEZVOUS, (ih_func_t *)smp_rendezvous_action, -1, NULL, NULL); @@ -457,8 +434,6 @@ cpu_ipi_stop(struct trapframe *tf) while ((started_cpus & PCPU_GET(cpumask)) == 0) { if ((shutdown_cpus & PCPU_GET(cpumask)) != 0) { atomic_clear_int(&shutdown_cpus, PCPU_GET(cpumask)); - if (has_stopself != 0) - sun4u_stopself(); (void)intr_disable(); for (;;) ; @@ -538,7 +513,8 @@ spitfire_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2) printf("%s: couldn't send IPI to module 0x%u\n", __func__, mid); else - panic("%s: couldn't send IPI", __func__); + panic("%s: couldn't send IPI to module 0x%u", + __func__, mid); } static void @@ -591,12 +567,19 @@ cheetah_ipi_selected(u_int cpus, u_long d0, u_long d1, u_long d2) bnp++; } } + /* + * On at least Fire V880 we may receive IDR_NACKs for + * CPUs we actually haven't tried to send an IPI to, + * but which apparently can be safely ignored. + */ + if (cpus == 0) + return; /* * Leave interrupts enabled for a bit before retrying * in order to avoid deadlocks if the other CPUs are * also trying to send IPIs. */ - DELAY(2 * bnp); + DELAY(2 * mp_ncpus); } if ( #ifdef KDB @@ -606,5 +589,6 @@ cheetah_ipi_selected(u_int cpus, u_long d0, u_long d1, u_long d2) printf("%s: couldn't send IPI (cpus=0x%u ids=0x%lu)\n", __func__, cpus, ids); else - panic("%s: couldn't send IPI", __func__); + panic("%s: couldn't send IPI (cpus=0x%u ids=0x%lu)", + __func__, cpus, ids); }