[lkml]   [2003]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH][2.5][8/14] smp_call_function_on_cpu - s390
On Sat, 15 Feb 2003, Ulrich Weigand wrote:

> Hmm. I think this code still has a problem. If the caller
> passes in a mask containing bits for offline CPUs, those will
> be counted here

It would be a bug in the caller, this is a primitive really. If the caller
is calling this with random bitmasks they are probably making errors
elsewhere too. This is also the behaviour of the Alpha version, which has
been around before this patch.

> > + num_cpus = hweight32(mask);
> but there will be no external interrupt generated for those,
> and thus this loop
> > + while (atomic_read(&data.started) != num_cpus)
> will never terminate ...

The following cpu_online call only goes as far as avoiding IPI'ing to
nonexistent cpus, anything more would be spoonfeeding the caller, i prefer
garbage in, garbage out.

for (i = 0; i < NR_CPUS; i++) {
if (cpu_online(i) && ((1UL << i) & mask))
smp_ext_bitcall(i, ec_call_function);
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean