RFC: OpenPIC IPI patch

Zbyszek Bodek zbb at semihalf.com
Sat Jun 2 16:06:37 UTC 2012


On 31.05.2012 12:45, Nathan Whitehorn wrote:
> On 05/30/12 22:13, Rafal Jaworowski wrote:
>> Can you please have a look at this patch and let us know about any
>> comments / objections? We identified a problem with IPI on the recent
>> FSL eOpenPIC, description in the patch:
>>
>> http://people.freebsd.org/~raj/patches/powerpc/openpic.diff
>> <http://people.freebsd.org/%7Eraj/patches/powerpc/openpic.diff>
>>
>> Rafal
>>
>

Hello.
As Rafal noticed, when we've changed pic_ipi method, ps3pic_ipi() ought 
to be adjusted too.

@@ -203,12 +204,17 @@ ps3pic_eoi(device_t dev, u_int irq)
  }

  static void
-ps3pic_ipi(device_t dev, u_int cpu)
+ps3pic_ipi(device_t dev, cpuset_t cpumask)
  {
  	struct ps3pic_softc *sc;
+	u_int cpu;
+
  	sc = device_get_softc(dev);

-	lv1_send_event_locally(sc->sc_ipi_outlet[cpu]);
+	for (cpu = 0; cpu < 2; cpu++) {
+		if (CPU_ISSET(cpu, &cpumask))
+			lv1_send_event_locally(sc->sc_ipi_outlet[cpu]);
+	}
  }

I've made a modification but it requires some overview.
I have used a hard-coded value of 2 to sweep the mask of CPUs because
sc_ipi_outlet has two fields anyway. Don't know if that approach isn't 
too "far-reaching" or should I use mp_ncpus instead.

The patch is available in the email's attachment.
Please send your comments.

Best regards
Zbyszek Bodek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ps3pic_ipi.patch
Type: text/x-patch
Size: 1132 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ppc/attachments/20120602/d46bf247/ps3pic_ipi.bin


More information about the freebsd-ppc mailing list