From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] arm64: topology: Tell the scheduler about the relative power of cores
Date: Mon, 13 Jan 2014 16:40:21 +0000 [thread overview]
Message-ID: <20140113164021.GA6934@e102568-lin.cambridge.arm.com> (raw)
In-Reply-To: <1389554441-27335-4-git-send-email-broonie@kernel.org>
On Sun, Jan 12, 2014 at 07:20:40PM +0000, Mark Brown wrote:
[...]
> @@ -89,7 +113,7 @@ static void __init parse_cluster(struct device_node *cluster, int depth)
> bool leaf = true;
> bool has_cores = false;
> struct device_node *c;
> - static int cluster_id = 0;
> + static int cluster_id;
It has to be __initdata, and the line change above does not belong in
this patch but patch 1.
[...]
> static void __init parse_dt_topology(void)
> {
> + const struct cpu_efficiency *cpu_eff;
> struct device_node *cn;
> + unsigned long min_capacity = ULONG_MAX;
> + unsigned long max_capacity = 0;
> + unsigned long capacity = 0;
> + int cpu;
> +
> + __cpu_capacity = kcalloc(nr_cpu_ids, sizeof(*__cpu_capacity),
> + GFP_NOWAIT);
>
> cn = of_find_node_by_path("/cpus");
> if (!cn) {
> @@ -155,10 +219,84 @@ static void __init parse_dt_topology(void)
> if (!cn)
> return;
> parse_cluster(cn, 0);
> +
> + for_each_possible_cpu(cpu) {
> + const u32 *rate;
> + int len;
> +
> + /* Too early to use cpu->of_node */
> + cn = of_get_cpu_node(cpu, NULL);
> + if (!cn) {
> + pr_err("Missing device node for CPU %d\n", cpu);
> + continue;
> + }
> +
> + for (cpu_eff = table_efficiency; cpu_eff->compatible; cpu_eff++)
> + if (of_device_is_compatible(cn, cpu_eff->compatible))
> + break;
> +
> + if (cpu_eff->compatible == NULL) {
> + pr_warn("%s: Unknown CPU type\n", cn->full_name);
> + continue;
> + }
> +
> + rate = of_get_property(cn, "clock-frequency", &len);
> + if (!rate || len != 4) {
> + pr_err("%s: Missing clock-frequency property\n",
> + cn->full_name);
> + continue;
> + }
I am wondering why we spit an error for a property that in practice is
optional. Either we make it required, or we drop the error output.
Actually this is not defined anywhere apart from the ePAPR, which
defines this property as required, but following your attempt to
standardize it for ARM, I gather it should be considered optional.
If it is optional, should we really print an error ? (I know it is the
same on arm32, I am questioning that code too).
Lorenzo
next prev parent reply other threads:[~2014-01-13 16:40 UTC|newest]
Thread overview: 39+ 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
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 [this message]
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 3/4] arm64: topology: Tell the scheduler about the relative power of cores Mark Brown
2014-03-21 17:27 [PATCH 1/4] arm64: topology: Initialise default topology state immediately Mark Brown
2014-03-21 17:28 ` [PATCH 3/4] arm64: topology: Tell the scheduler about the relative power of cores Mark Brown
2014-02-26 0:48 [PATCH 0/4] arm64: Topology Mark Brown
2014-02-26 0:48 ` [PATCH 3/4] arm64: topology: Tell the scheduler about the relative power of cores Mark Brown
2014-02-25 4:25 [PATCH 0/4] arm64: topology: CPU topology support Mark Brown
2014-02-25 4:25 ` [PATCH 3/4] arm64: topology: Tell the scheduler about the relative power of cores 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 3/4] arm64: topology: Tell the scheduler about the relative power of cores 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 3/4] arm64: topology: Tell the scheduler about the relative power of cores Mark Brown
2014-01-15 11:38 [PATCH v12 0/4] arm64 topology Mark Brown
2014-01-15 11:38 ` [PATCH 3/4] arm64: topology: Tell the scheduler about the relative power of cores 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 3/4] arm64: topology: Tell the scheduler about the relative power of cores Mark Brown
2014-01-09 15:06 ` Robin Randhawa
2014-01-08 17:10 [PATCH 1/4] arm64: topology: Implement basic CPU topology support Mark Brown
2014-01-08 17:10 ` [PATCH 3/4] arm64: topology: Tell the scheduler about the relative power of cores Mark Brown
2014-01-08 18:39 ` Lorenzo Pieralisi
2014-01-08 18:45 ` Mark Brown
2013-12-19 20:06 [PATCH 0/4] arm64 topology support Mark Brown
2013-12-19 20:06 ` [PATCH 3/4] arm64: topology: Tell the scheduler about the relative power of cores Mark Brown
2014-01-07 13:05 ` Lorenzo Pieralisi
2014-01-07 13:38 ` Mark Brown
2014-01-07 14:29 ` Lorenzo Pieralisi
2014-01-07 15:06 ` Mark Brown
2014-01-07 17:56 ` Lorenzo Pieralisi
2014-01-07 18:02 ` 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 3/4] arm64: topology: Tell the scheduler about the relative power of cores 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=20140113164021.GA6934@e102568-lin.cambridge.arm.com \
--to=lorenzo.pieralisi@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).