From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH][ ARM cpu hotplug 1/2 ] extract common code for arm cpu hotplug
Date: Tue, 30 Nov 2010 16:58:19 +0000 [thread overview]
Message-ID: <20101130165819.GC2377@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4CF5252B.5050109@gmail.com>
On Tue, Nov 30, 2010 at 10:24:11AM -0600, Rob Herring wrote:
> On 11/30/2010 05:03 AM, Russell King - ARM Linux wrote:
>> On Tue, Nov 30, 2010 at 04:17:32PM +0530, Amit Kucheria wrote:
>>> Since the main aim here is to consolidate as much code here as
>>> possible while still allowing platforms to override the defaults,
>>> would you have an objection to the introduction of a struct smp_ops
>>> that'll allow a platform to override the defaults? This seems to be
>>> done on other platforms I've briefly looked at.
>>
>> I see no point to what is being proposed in this thread. It's _soo_
>> little code that the platforms have to implement that it really is
>> not worth the effort.
>>
> Whether the code can be consolidated or not, the current API does not
> allow a single kernel binary (ignoring the list of other issues). The
> introduction of struct smp_ops would help enable both single kernel and
> default versions of the functions.
True. However, the "single kernel binary" is a long way off, with a
fair number of fundamental issues. Currently, the toolchain people seem
to be going in a completely different direction, adding blocks to being
able to build a single binary for several different CPUs. See the recent
thread on the SWP emulation build failure.
However, that's a different issue to the subject of these patches, which
is to add another _optional_ layer of APIs between the generic ARM SMP
code, and the platform code.
We currently have one API, which is:
- platform_cpu_kill, platform_cpu_die, platform_cpu_disable
What is being proposed in these patches so far is that we introduce
another optional layer which introduces a new set of APIs:
- platform_enter_lowpower, platform_do_lowpower, platform_leave_lowpower
to support the noddy 'spin in a low power loop waiting for wakeup' method.
In order to support platforms which don't want to use the noddy method,
instead of having just three interfaces to deal with being different
between platforms, we instead have _six_ interfaces.
This is not the way to go. We really don't need to increase the
complexity by adding a 'consolidation' layer on top of what we already
have.
In terms of allowing platform independence, just wrapping these three
(platform_cpu_kill, platform_cpu_die, platform_cpu_disable) into some
smp_ops structure may seem a nice idea, but there's more SMP platform
specifics than just that. Eg, there's the cross-call support (which must
be initialized with the IRQ controller.)
I don't think wrapping them into something which purports to be a generic
smp_ops structure, and then having to play games with ifdefs because
they're spread across several files with different compilation options
is a sane way forward.
I still come back to my original point though. Let's first get the
existing support fixed so that we know what we are dealing with, so we
can first see whether the existing APIs are right for everyone, rather
than just blindly believing that they are because most people have
mindlessly cut'n'pasted the Realview code.
prev parent reply other threads:[~2010-11-30 16:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AANLkTi=fJeOUhH0xUJF8qx-fTJ5popE7ZuVxDZXpTH-i@mail.gmail.com>
2010-11-29 9:54 ` [PATCH][ ARM cpu hotplug 1/2 ] extract common code for arm cpu hotplug Vincent Guittot
2010-11-29 10:41 ` Russell King - ARM Linux
2010-11-29 17:27 ` Vincent Guittot
2010-11-29 19:24 ` Russell King - ARM Linux
2010-11-30 10:47 ` Amit Kucheria
2010-11-30 11:03 ` Russell King - ARM Linux
2010-11-30 11:51 ` Russell King - ARM Linux
2010-11-30 14:05 ` Will Deacon
2010-11-30 16:24 ` Rob Herring
2010-11-30 16:58 ` Russell King - ARM Linux [this message]
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=20101130165819.GC2377@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).