mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	LAK <linux-arm-kernel@lists.infradead.org>,
	Russell King <linux@armlinux.org.uk>,
	Juri Lelli <juri.lelli@gmail.com>,
	Brendan Jackman <Brendan.Jackman@arm.com>
Subject: Re: [PATCH v2 1/1] arm: topology: remove cpu_efficiency
Date: Wed, 18 Oct 2017 11:37:06 +0100	[thread overview]
Message-ID: <00d4d98e-3d75-377f-434d-dce47c0629dd@arm.com> (raw)
In-Reply-To: <CAKfTPtARJC161pXeqrz_d5wxqXPLczGCm_dbZ3fW54CAXuDTmQ@mail.gmail.com>

Hi Vincent,

On 17/10/17 13:28, Vincent Guittot wrote:
> Hi Dietmar,
> 
> On 12 October 2017 at 16:00, Dietmar Eggemann <dietmar.eggemann@arm.com> wrote:
>> Remove the 'cpu_efficiency/clock-frequency dt property' based solution
>> to set cpu capacity which was only working for Cortex-A15/A7 arm
>> big.LITTLE systems.
>>
>> I.e. the 'capacity-dmips-mhz' based solution is now the only one. It is
>> shared between arm and arm64 and works for every big.LITTLE system no
>> matter which core types it consists of.
>>
>> Cc: Russell King <linux@arm.linux.org.uk>
>> Cc: Vincent Guittot <vincent.guittot@linaro.org>
>> Cc: Juri Lelli <juri.lelli@gmail.com>
>> Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>

[...]

>> @@ -111,76 +50,15 @@ static void __init parse_dt_topology(void)
>>                         continue;
>>                 }
>>
>> -               if (topology_parse_cpu_capacity(cn, cpu)) {
>> +               if (topology_parse_cpu_capacity(cn, cpu))
>>                         of_node_put(cn);
> 
> We should call the of_node_put unconditionally  to balance the
> of_get_cpu_node, isn't it ?
> Note that this problem is also present without your change

Thanks for the review. Brendan mentioned this the other day already.

I could add an additional patch to the v3 with this code change. What do
you think?

diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index 15cc131ae387..81ec42333489 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -41,6 +41,7 @@ static void __init parse_dt_topology(void)
                pr_err("No CPU information found in DT\n");
                return;
        }
+       of_node_put(cn);

        for_each_possible_cpu(cpu) {
                /* too early to use cpu->of_node */
@@ -50,8 +51,8 @@ static void __init parse_dt_topology(void)
                        continue;
                }

-               if (topology_parse_cpu_capacity(cn, cpu))
-                       of_node_put(cn);
+               topology_parse_cpu_capacity(cn, cpu);
+               of_node_put(cn);
        }

        topology_normalize_cpu_scale();

  reply	other threads:[~2017-10-18 10:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 14:00 [PATCH v2 0/1] arm: " Dietmar Eggemann
2017-10-12 14:00 ` [PATCH v2 1/1] arm: topology: " Dietmar Eggemann
2017-10-17 12:28   ` Vincent Guittot
2017-10-18 10:37     ` Dietmar Eggemann [this message]
2017-10-19  7:32       ` Vincent Guittot

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=00d4d98e-3d75-377f-434d-dce47c0629dd@arm.com \
    --to=dietmar.eggemann@arm.com \
    --cc=Brendan.Jackman@arm.com \
    --cc=juri.lelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=vincent.guittot@linaro.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

all inboxes | Powered by JetHome®