> The smp_call_function{_single} functions are used to run
> given function on all {or speicified} *other* CPUs. For
> UP systems, "other" CPUs simply don't exist, so we flag
> such incorrect usage of these functions using a WARNING.
If other cpus don't exist then smp_call_function() should just do
*nothing* (there is no other cpu right?). We don't want to sprinkle
a ton of #ifdef CONFIG_SMP around each smp_call_function().
> Also, -EBUSY is generally returned by arch implementations
> when they find that target_cpu == current_cpu, which is not
> a comparable case to the !SMP case. Use -EINVAL instead,
> similar to what powerpc does for !cpu_online(target), which
> is somewhat more analogous.
No. Current semantics of smp_call_function_single() are that it
returns -EBUSY if called on the *current* cpu. Since on !CONFIG_SMP the
only possible cpu it can be called on is the current one, the only
sane return value is -EBUSY.