From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] arm64: topology: Add support for topology DT bindings
Date: Tue, 14 Jan 2014 12:36:47 +0000 [thread overview]
Message-ID: <20140114123647.GC15567@sirena.org.uk> (raw)
In-Reply-To: <20140114114336.GB28912@e102568-lin.cambridge.arm.com>
On Tue, Jan 14, 2014 at 11:43:37AM +0000, Lorenzo Pieralisi wrote:
> On Sun, Jan 12, 2014 at 07:20:39PM +0000, Mark Brown wrote:
> > +static void __init parse_core(struct device_node *core, int cluster_id,
> > + int core_id)
> > +{
> > + char name[10];
> > + bool leaf = true;
> > + int i, cpu;
> > + struct device_node *t;
> > +
> > + i = 0;
> You could initialize i at declaration, I can understand why you are doing that
> explictly in parse_cluster (two loops, to make code clearer), but here
> it does not make much sense to add a line for that.
I still find it clearer for do { } while loops to have the start
condition required for the loop to function right next to the loop.
Yes, you can save a line code but that's about it.
> > + do {
> > + snprintf(name, sizeof(name), "thread%d", i);
> If we wanted to be very picky, you need to copy "thread" just once (same
> goes for other strings), but we'd better leave code as is IMHO.
That would just make the code more complex, we need to handle tens of
cores so just doing i + '0' won't cut it.
> > + t = of_get_child_by_name(core, name);
> Should we check the MT bit in MPIDR_EL1 before validating threads as well ?
> I do not like the idea because this means reliance on MPIDR_EL1 for MT
> and DT for topology bits, but it might be a worthwhile check.
> It is certainly odd to have a DT with threads and an MPIDR_EL1 with the MT
> bit clear.
Checking seems counter to the idea of forcing everyone to provide this
information from the firmware in the first place - checking that one bit
and ignoring the rest of the information even if it's good would seem
perverse.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140114/8b118e09/attachment.sig>
next prev parent reply other threads:[~2014-01-14 12:36 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-12 19:20 [PATCH v11 0/4] ARMv8 cpu topology Mark Brown
2014-01-12 19:20 ` [PATCH 1/4] arm64: topology: Implement basic CPU topology support Mark Brown
2014-01-13 16:10 ` Lorenzo Pieralisi
2014-01-13 16:30 ` Mark Brown
2014-01-13 17:44 ` Lorenzo Pieralisi
2014-01-14 8:17 ` Vincent Guittot
2014-01-13 16:44 ` Vincent Guittot
2014-01-13 17:33 ` Lorenzo Pieralisi
2014-01-12 19:20 ` [PATCH 2/4] arm64: topology: Add support for topology DT bindings Mark Brown
2014-01-14 11:43 ` Lorenzo Pieralisi
2014-01-14 12:36 ` Mark Brown [this message]
2014-01-12 19:20 ` [PATCH 3/4] arm64: topology: Tell the scheduler about the relative power of cores Mark Brown
2014-01-13 16:40 ` Lorenzo Pieralisi
2014-01-13 17:01 ` Mark Brown
2014-01-14 10:12 ` Lorenzo Pieralisi
2014-01-14 12:13 ` Mark Brown
2014-01-14 13:23 ` Lorenzo Pieralisi
2014-01-14 14:01 ` Mark Brown
2014-01-12 19:20 ` [PATCH 4/4] arm64: topology: Provide relative power numbers for cores Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2014-04-22 20:21 [PATCH 1/4] arm64: topology: Initialise default topology state immediately Mark Brown
2014-04-22 20:21 ` [PATCH 2/4] arm64: topology: Add support for topology DT bindings Mark Brown
2014-04-24 14:48 ` Lorenzo Pieralisi
2014-03-21 17:27 [PATCH 1/4] arm64: topology: Initialise default topology state immediately Mark Brown
2014-03-21 17:27 ` [PATCH 2/4] arm64: topology: Add support for topology DT bindings Mark Brown
2014-03-24 15:36 ` Lorenzo Pieralisi
2014-03-24 15:45 ` Mark Brown
2014-03-24 16:02 ` Lorenzo Pieralisi
2014-03-24 16:27 ` Mark Brown
2014-02-26 0:48 [PATCH 0/4] arm64: Topology Mark Brown
2014-02-26 0:48 ` [PATCH 2/4] arm64: topology: Add support for topology DT bindings Mark Brown
2014-02-25 4:25 [PATCH 0/4] arm64: topology: CPU topology support Mark Brown
2014-02-25 4:25 ` [PATCH 2/4] arm64: topology: Add support for topology DT bindings Mark Brown
2014-02-11 22:06 [PATCH 1/4] arm64: topology: Implement basic CPU topology support Mark Brown
2014-02-11 22:06 ` [PATCH 2/4] arm64: topology: Add support for topology DT bindings Mark Brown
2014-02-10 13:02 [PATCH 1/4] arm64: topology: Implement basic CPU topology support Mark Brown
2014-02-10 13:02 ` [PATCH 2/4] arm64: topology: Add support for topology DT bindings Mark Brown
2014-01-15 11:38 [PATCH v12 0/4] arm64 topology Mark Brown
2014-01-15 11:38 ` [PATCH 2/4] arm64: topology: Add support for topology DT bindings Mark Brown
2014-01-08 19:12 [PATCH 1/4] arm64: topology: Implement basic CPU topology support Mark Brown
2014-01-08 19:12 ` [PATCH 2/4] arm64: topology: Add support for topology DT bindings Mark Brown
2014-01-09 12:50 ` Lorenzo Pieralisi
2014-01-09 13:26 ` Mark Brown
2014-01-08 17:10 [PATCH 1/4] arm64: topology: Implement basic CPU topology support Mark Brown
2014-01-08 17:10 ` [PATCH 2/4] arm64: topology: Add support for topology DT bindings Mark Brown
2014-01-08 18:23 ` Lorenzo Pieralisi
2014-01-08 18:32 ` Mark Brown
2013-12-19 20:06 [PATCH 0/4] arm64 topology support Mark Brown
2013-12-19 20:06 ` [PATCH 2/4] arm64: topology: Add support for topology DT bindings Mark Brown
2013-12-16 16:49 [PATCH 1/4] arm64: topology: Implement basic CPU topology support Mark Brown
2013-12-16 16:49 ` [PATCH 2/4] arm64: topology: Add support for topology DT bindings Mark Brown
2013-12-17 17:40 ` Lorenzo Pieralisi
2013-12-17 19:19 ` Mark Brown
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=20140114123647.GC15567@sirena.org.uk \
--to=broonie@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.