Author: nwhitehorn
Date: Tue Jul  6 15:38:38 2010
New Revision: 209726
URL: http://svn.freebsd.org/changeset/base/209726

Log:
  It does not actually make sense to provide an IPI facility on non-root
  PICs, so replace cpuid logic with an assert.

Modified:
  head/sys/powerpc/powerpc/openpic.c

Modified: head/sys/powerpc/powerpc/openpic.c
==============================================================================
--- head/sys/powerpc/powerpc/openpic.c  Tue Jul  6 15:31:58 2010        
(r209725)
+++ head/sys/powerpc/powerpc/openpic.c  Tue Jul  6 15:38:38 2010        
(r209726)
@@ -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();
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to