From patchwork Wed Oct 18 10:37:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dietmar Eggemann X-Patchwork-Id: 10014309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8858760215 for ; Wed, 18 Oct 2017 10:37:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D86628B0E for ; Wed, 18 Oct 2017 10:37:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 725EA28B16; Wed, 18 Oct 2017 10:37:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1B4FB28B0E for ; Wed, 18 Oct 2017 10:37:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8vxnN6Osed27gPlBDmmHuXcyjbwdSZBFkj0R25S2FY0=; b=WTeNMj3BWwd4iU IDIAWndDJWBbpPgVJ9Gv/iOgdpHTlEFuyJHsnvYVHn/X8AtA5FKKwQefL/r92fPlj9Qnxqc0LtWdT o88d3FAzOWSNgBEPTjqbbPWe0b4NT4IDk3w1Mk3i/oAoxXQVpND2TK6sEfFMZqFzL3hYvVgfd2w1r KAMQW29naReq8NM24ZNUwIqIAqrBPT493mC1WjdyRl0WRFpkDbBsfPJIRio2qATH+cKQkNu2ju9iJ duCeJbqBQxCElozY2QzWBwS8sLq6KqjmaFQpaPg1ajIfjXDNxXdyBia+50O2KjIG7T4v9QSba+fQb bpZP/ZFe2AHtK53iBzQQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e4lj8-0007P1-PT; Wed, 18 Oct 2017 10:37:30 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e4lj6-0007Mq-ET for linux-arm-kernel@lists.infradead.org; Wed, 18 Oct 2017 10:37:30 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 222DA1435; Wed, 18 Oct 2017 03:37:08 -0700 (PDT) Received: from [10.1.210.41] (e107985-lin.cambridge.arm.com [10.1.210.41]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 125D03F25D; Wed, 18 Oct 2017 03:37:06 -0700 (PDT) Subject: Re: [PATCH v2 1/1] arm: topology: remove cpu_efficiency To: Vincent Guittot References: <20171012140028.21599-1-dietmar.eggemann@arm.com> <20171012140028.21599-2-dietmar.eggemann@arm.com> From: Dietmar Eggemann Message-ID: <00d4d98e-3d75-377f-434d-dce47c0629dd@arm.com> Date: Wed, 18 Oct 2017 11:37:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171018_033728_504883_D7CAB75F X-CRM114-Status: GOOD ( 13.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Brendan Jackman , Juri Lelli , linux-kernel , LAK , Russell King Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Vincent, On 17/10/17 13:28, Vincent Guittot wrote: > Hi Dietmar, > > On 12 October 2017 at 16:00, Dietmar Eggemann 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 >> Cc: Vincent Guittot >> Cc: Juri Lelli >> Signed-off-by: Dietmar Eggemann [...] >> @@ -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();