summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2010-07-06 15:38:38 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2010-07-06 15:38:38 +0000
commitd49a81ed5ee4a7bd3ab1f3ecdf2d64f94f36aea2 (patch)
tree04422a7269b97fcaa1d14306d8ba8e749a3a0127
parent990347ec5d0306c6f82b564336200db370a0ee1c (diff)
downloadFreeBSD-src-d49a81ed5ee4a7bd3ab1f3ecdf2d64f94f36aea2.zip
FreeBSD-src-d49a81ed5ee4a7bd3ab1f3ecdf2d64f94f36aea2.tar.gz
It does not actually make sense to provide an IPI facility on non-root
PICs, so replace cpuid logic with an assert.
-rw-r--r--sys/powerpc/powerpc/openpic.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/powerpc/powerpc/openpic.c b/sys/powerpc/powerpc/openpic.c
index f06349a..7668f77 100644
--- a/sys/powerpc/powerpc/openpic.c
+++ b/sys/powerpc/powerpc/openpic.c
@@ -331,13 +331,12 @@ void
openpic_ipi(device_t dev, u_int cpu)
{
struct openpic_softc *sc;
- u_int cpuid;
+
+ KASSERT(dev == root_pic, ("Cannot send IPIs from non-root OpenPIC"));
sc = device_get_softc(dev);
sched_pin();
- cpuid = (dev == root_pic) ? PCPU_GET(cpuid) : 0;
-
- openpic_write(sc, OPENPIC_PCPU_IPI_DISPATCH(cpuid, 0),
+ openpic_write(sc, OPENPIC_PCPU_IPI_DISPATCH(PCPU_GET(cpuid), 0),
1u << cpu);
sched_unpin();
}
OpenPOWER on IntegriCloud