Re: [PATCH][2.5][14/14] smp_call_function_on_cpu - x86_64

From: Zwane Mwaikambo (zwane@holomorphy.com)
Date: Fri Feb 14 2003 - 12:09:19 EST


On Fri, 14 Feb 2003, Andi Kleen wrote:

> On Fri, Feb 14, 2003 at 07:52:15AM -0500, Zwane Mwaikambo wrote:
> > One liner to fix num_cpus == 0 on SMP kernel w/ UP box
>
> Shouldn't num_cpus be 1 in that case ?

We mask out current cpu first like so;

mask &= ~(1UL << smp_processor_id());
num_cpus = hweight(mask);
if (num_cpus == )
        return 0;

So really it's number of eligible IPI cpus

        Zwane

-- 
function.linuxpower.ca
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Feb 15 2003 - 22:00:55 EST