RFC: OpenPIC IPI patch
Marcel Moolenaar
marcel at xcllnt.net
Fri Jun 1 02:28:18 UTC 2012
On May 31, 2012, at 4:07 PM, Zbigniew Bodek wrote:
> @@ -344,8 +345,14 @@ void
> openpic_ipi(device_t dev, cpuset_t cpumask)
> {
> struct openpic_softc *sc;
> + cpuset_t ns_cpus; /* Mask of not supported CPUs */
> +
> + CPU_FILL(&ns_cpus);
> + ns_cpus.__bits[0] = 0;
>
> KASSERT(dev == root_pic, ("Cannot send IPIs from non-root OpenPIC"));
> + KASSERT(CPU_OVERLAP(&ns_cpus, &cpumask) == 0,
> + ("Cannot send an IPI to a CPU which number exceeds #31"));
>
> sc = device_get_softc(dev);
> sched_pin();
>
I like it.
Thanks,
--
Marcel Moolenaar
marcel at xcllnt.net
More information about the freebsd-ppc
mailing list