[PATCH v6 13/15] ARM: hotplug: Introduce dummy_cpu_kill
Marc Zyngier
marc.zyngier at arm.com
Wed Feb 8 19:57:08 EST 2012
On Wed, 8 Feb 2012 16:16:24 -0800 (PST), Nicolas Pitre
<nicolas.pitre at linaro.org> wrote:
> On Wed, 8 Feb 2012, Marc Zyngier wrote:
>
>> Most platforms don't implement their cpu_kill method.
>> Some because they simply don't offer the capability, some other
>> because nobody cared enough to implement the necessary code.
>>
>> Either way, this code is duplicated all over the place. Implement
>> a global dummy_cpu_kill method and convert all SMP (but shmobile)
>> to use it. Hopefully the "dummy" prefix will be an incentive
>> for people to do the right thing.
>>
>> Cc: Arnd Bergmann <arnd at arndb.de>
>> Cc: Colin Cross <ccross at android.com>
>> Cc: David Brown <davidb at codeaurora.org>
>> Cc: Kukjin Kim <kgene.kim at samsung.com>
>> Cc: Linus Walleij <linus.walleij at stericsson.com>
>> Cc: Magnus Damm <magnus.damm at gmail.com>
>> Cc: Nicolas Pitre <nico at fluxnic.net>
>> Cc: Paul Mundt <lethal at linux-sh.org>
>> Cc: Santosh Shilimkar <santosh.shilimkar at ti.com>
>> Cc: Stephen Warren <swarren at nvidia.com>
>> Cc: Shawn Guo <shawn.guo at linaro.org>
>> Cc: Rob Herring <rob.herring at calxeda.com>
>> Signed-off-by: Marc Zyngier <marc.zyngier at arm.com>
>
> What avout this instead:
>
> int __weak __cpuinit platform_cpu_kill(unsigned int cpu)
> {
> if (!soc_smp_ops)
> return 0;
> if (!soc_smp_ops->cpu_kill)
> return 1;
> return soc_smp_ops->cpu_kill(cpu);
> }
>
> and get rid of the dummy handler entirely?
I thought the "dummy" prefix would maybe give maintainers a chance to
think whether or not this is the best they can do (given that they mostly
copied the RealView code, I'm quite sure it is possible...). I'll use your
approach if you think it's better.
M.
--
Fast, cheap, reliable. Pick two.
More information about the linux-arm-kernel
mailing list