From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 13/15] ARM: hotplug: Introduce dummy_cpu_kill
Date: Thu, 09 Feb 2012 01:57:08 +0100 [thread overview]
Message-ID: <6744403449c559f689ca7322eb0393b8@localhost> (raw)
In-Reply-To: <alpine.LFD.2.02.1202081608100.1656@xanadu.home>
On Wed, 8 Feb 2012 16:16:24 -0800 (PST), Nicolas Pitre
<nicolas.pitre@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@arndb.de>
>> Cc: Colin Cross <ccross@android.com>
>> Cc: David Brown <davidb@codeaurora.org>
>> Cc: Kukjin Kim <kgene.kim@samsung.com>
>> Cc: Linus Walleij <linus.walleij@stericsson.com>
>> Cc: Magnus Damm <magnus.damm@gmail.com>
>> Cc: Nicolas Pitre <nico@fluxnic.net>
>> Cc: Paul Mundt <lethal@linux-sh.org>
>> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> Cc: Stephen Warren <swarren@nvidia.com>
>> Cc: Shawn Guo <shawn.guo@linaro.org>
>> Cc: Rob Herring <rob.herring@calxeda.com>
>> Signed-off-by: Marc Zyngier <marc.zyngier@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.
next prev parent reply other threads:[~2012-02-09 0:57 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 0:30 [PATCH v6 00/15] Per SoC descriptor Marc Zyngier
2012-02-08 0:30 ` [PATCH v6 01/15] ARM: SoC: Introduce per " Marc Zyngier
2012-02-08 23:59 ` Nicolas Pitre
2012-02-08 0:30 ` [PATCH v6 02/15] ARM: SoC: Add per SoC SMP and CPU hotplug operations Marc Zyngier
2012-02-08 23:42 ` David Brown
2012-02-09 1:00 ` Marc Zyngier
2012-02-09 1:28 ` David Brown
2012-02-10 0:03 ` Arnd Bergmann
2012-02-09 0:02 ` Nicolas Pitre
2012-02-09 8:54 ` Russell King - ARM Linux
2012-02-08 0:30 ` [PATCH v6 03/15] ARM: SoC: convert VExpress/RealView to SoC descriptor Marc Zyngier
2012-02-08 0:30 ` [PATCH v6 04/15] ARM: SoC: convert OMAP4 " Marc Zyngier
2012-02-08 0:30 ` [PATCH v6 05/15] ARM: SoC: convert Tegra " Marc Zyngier
2012-02-08 0:30 ` [PATCH v6 06/15] ARM: SoC: convert Exynos4 " Marc Zyngier
2012-02-08 0:30 ` [PATCH v6 07/15] ARM: SoC: convert MSM SMP " Marc Zyngier
2012-02-08 23:39 ` David Brown
2012-02-08 23:42 ` Marc Zyngier
2012-02-08 0:30 ` [PATCH v6 08/15] ARM: SoC: convert ux500 " Marc Zyngier
2012-02-08 22:31 ` Linus Walleij
2012-02-09 5:29 ` Srinidhi KASAGAR
2012-02-08 0:30 ` [PATCH v6 09/15] ARM: SoC: convert shmobile SMP " Marc Zyngier
2012-02-08 0:30 ` [PATCH v6 10/15] ARM: SoC: convert highbank " Marc Zyngier
2012-02-08 0:30 ` [PATCH v6 11/15] ARM: SoC: convert imx6q " Marc Zyngier
2012-02-11 3:32 ` Shawn Guo
2012-02-08 0:30 ` [PATCH v6 12/15] ARM: smp: Make SoC descriptor mandatory for SMP platforms Marc Zyngier
2012-02-08 0:30 ` [PATCH v6 13/15] ARM: hotplug: Introduce dummy_cpu_kill Marc Zyngier
2012-02-09 0:16 ` Nicolas Pitre
2012-02-09 0:57 ` Marc Zyngier [this message]
2012-02-09 8:46 ` Russell King - ARM Linux
2012-02-09 22:48 ` Will Deacon
2012-02-08 0:30 ` [PATCH v6 14/15] ARM: hotplug: Introduce dummy_cpu_disable Marc Zyngier
2012-02-09 0:19 ` Nicolas Pitre
2012-02-08 0:30 ` [PATCH v6 15/15] ARM: hotplug: add cpu_lowpower as an alternative to cpu_die Marc Zyngier
2012-02-09 0:21 ` Nicolas Pitre
2012-02-09 8:48 ` Russell King - ARM Linux
2012-02-08 0:43 ` [PATCH v6 00/15] Per SoC descriptor Rob Herring
2012-02-08 0:49 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6744403449c559f689ca7322eb0393b8@localhost \
--to=marc.zyngier@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).