Date: Thu, 31 May 2012 19:27:58 -0700 From: Marcel Moolenaar <marcel@xcllnt.net> To: Zbigniew Bodek <zbb@semihalf.com> Cc: powerpc@freebsd.org, =?utf-8?Q?Piotr_Zi=C4=99cik?= <kosmo@semihalf.com> Subject: Re: RFC: OpenPIC IPI patch Message-ID: <FF83351D-A575-4388-9113-2BCF280ECADE@xcllnt.net> In-Reply-To: <fcdca283083e354eb4d9733a572a1041@smtp.semihalf.com> References: <0362C399-CB54-451E-A879-E836EF13CE72@semihalf.com> <251AF144-587C-4854-88B2-0CD7D26E1DF1@xcllnt.net> <fcdca283083e354eb4d9733a572a1041@smtp.semihalf.com>
index | next in thread | previous in thread | raw e-mail
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@xcllnt.net
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FF83351D-A575-4388-9113-2BCF280ECADE>
