From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 00/10] Per SoC descriptor
Date: Thu, 13 Oct 2011 18:14:41 +0200 [thread overview]
Message-ID: <201110131814.42216.arnd@arndb.de> (raw)
In-Reply-To: <20111013153449.GG21648@n2100.arm.linux.org.uk>
On Thursday 13 October 2011, Russell King - ARM Linux wrote:
> On Thu, Oct 13, 2011 at 04:25:36PM +0100, Marc Zyngier wrote:
> > On 13/10/11 11:32, Russell King - ARM Linux wrote:
> > > On Mon, Oct 10, 2011 at 03:02:12PM +0100, Marc Zyngier wrote:
> >
> > [...]
> >
> > >> 65 files changed, 569 insertions(+), 149 deletions(-)
> > >
> > > This isn't particularly appealing for something that's supposed to
> > > be a clean up - it's introducing 400+ new lines of code. It looks like
> > > most of this comes from the platform stuff rather than core stuff.
> > >
> > > Can't we do any better with this? We really need things to be going
> > > in the other direction.
> >
> > There is definitely room for improvement, by factoring in some common
> > code across platforms. But I see that as a second phase, and started by
> > just moving things to the SoC descriptor, all the code staying mostly
> > the same.
>
> I was meaning without that - what concerns me is the size of increase
> just to introduce this. It seems needlessly large.
I think the main benefit of this series is that it allows the
cross-platform consolidation patches to be smaller, which unfortunately
is not easy to measure. The idea is that stuff that is currently
hardcoded per platform but should better be run-time determined
can be moved into a per-soc structure rather than the per-board
machine_desc. It would be good to list all this "stuff" to see how
much it will eventually be.
A number of things that we discussed about putting here have since
been obsoleted by better suggestions (e.g. arch_ioremap, VMALLOC_END,
__io, NR_IRQS, ...), but I would hope the tradeoff to still be
positive for this patch series.
On a related topic, I wonder how much of the existing machine_desc
we would actually be able to move out into a soc_desc, which is
something that would immediately save code lines and object size.
If it ends up being just the SMP and CPU-hotplug functions, then
the tradeoff is probably negative and we discard the series, but
if we expect it to have a postive long-term effect, I would still
merge it right away rather than waiting for the series to become
long enough to show the benefits in the diffstat.
> I've also never been convinced by attempts to consolidate the hotplug
> code - I've said this every time it's been suggested: I believe many
> platforms just aren't trying to support hotplug CPU properly.
>
> They've just copied the noddy Realview platform version - which is
> noddy because ARMs platforms tend to have a total lack of power
> management support on them. The best we can do is put them in a WFI
> loop waiting to be re-awoken.
>
> Real platforms surely must have better PM support than that, and so
> copying the Realview implementation does not make sense - it's good
> to see that _some_ platforms have made an effort, though they still
> just return from platform_cpu_die(), rather than the intended path of
> re-awaking via the standard bringup path. The return path from
> platform_cpu_die() is supposed to be the last-ditch attempt if all else
> has failed.
Good point, but I think that is another topic:
Given that a bunch of architectures implement the same silly functions,
I think it definitely makes sense to consolidate them, even if we know
that they should actually be doing something else. By turning these
into function pointers, we can at least force platforms to include
a line like
.cpu_disable = generic_silly_cpu_disable,
which hopefully leads people to think about why they are using this
version.
Arnd
prev parent reply other threads:[~2011-10-13 16:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 14:02 [PATCH v5 00/10] Per SoC descriptor Marc Zyngier
2011-10-10 14:02 ` [PATCH v5 01/10] ARM: SoC: Introduce per " Marc Zyngier
2011-10-10 14:02 ` [PATCH v5 02/10] ARM: SoC: Add per SoC SMP and CPU hotplug operations Marc Zyngier
2011-10-10 14:02 ` [PATCH v5 03/10] ARM: SoC: convert VExpress/RealView to SoC descriptor Marc Zyngier
2011-10-10 14:02 ` [PATCH v5 04/10] ARM: SoC: convert OMAP4 " Marc Zyngier
2011-10-10 14:02 ` [PATCH v5 05/10] ARM: SoC: convert Tegra " Marc Zyngier
2011-10-10 14:02 ` [PATCH v5 06/10] ARM: SoC: convert Exynos4 " Marc Zyngier
2011-10-10 14:02 ` [PATCH v5 07/10] ARM: SoC: convert MSM SMP " Marc Zyngier
2011-10-10 14:02 ` [PATCH v5 08/10] ARM: SoC: convert ux500 " Marc Zyngier
2011-10-10 14:02 ` [PATCH v5 09/10] ARM: SoC: convert shmobile sh73a0 " Marc Zyngier
2011-10-10 14:02 ` [PATCH v5 10/10] ARM: smp: Make SoC descriptor mandatory for SMP platforms Marc Zyngier
2011-10-13 10:32 ` [PATCH v5 00/10] Per SoC descriptor Russell King - ARM Linux
2011-10-13 15:25 ` Marc Zyngier
2011-10-13 15:34 ` Russell King - ARM Linux
2011-10-13 16:14 ` Arnd Bergmann [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=201110131814.42216.arnd@arndb.de \
--to=arnd@arndb.de \
--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).