Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1491352ybb; Thu, 9 Apr 2020 03:15:44 -0700 (PDT) X-Google-Smtp-Source: APiQypIf8agv0Scr16BEHQm1BqQre8LeUcDRIzCNVoGJHiIT+/Zxt8WfUJMAPBULU2HgyqR5FPNR X-Received: by 2002:a05:6808:288:: with SMTP id z8mr5532669oic.149.1586427344316; Thu, 09 Apr 2020 03:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586427344; cv=none; d=google.com; s=arc-20160816; b=gUFXDm7CVM7dowgI/94FAZYT1rGulGx8EOzTbLWOFCav535U6zU1fww/X7N+SBf7Qc yyuL2wl+B2vIlYEOpV+qC+/V8WdtD6dlCI5Em24vb8R2exzjrEyWPTGbi7gfxFLorbXW /GLqh1AXtJmU7sN6N4dA+VQRYLcE1tEoMZ3qssJxb2XUnaOyEyL20hmQHmZL3VTW/Wvj sbRDb0Pk+YjqiiDaUcGwcbEeF5hsB2nPu3+k+KBOu2CVyyIjusFr5JAM1P+mdn4DMkgf SC+2T47XWnkBrqMgu1CFR+ytM1Hg0ArR7fnNX5730A3l+NfOrfnp/yldELAmazbc/CST 9UjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=q9FHK/DeVDmCOiC/pB5YF+rjORu7C7ma9VLbibGBgIg=; b=F1/UzTkXkqn4trFEM8gIXOuvHzSymnjUPDGxFEwliQbT32s18gabCG2JT+Fi2KjfZQ iFbC+0WCAuvZo7P1dTRKO0AIxrP/wkaNGigDJDkQ5WpoC1/l3AI0AOswWz0kXBo/MauD JN/PxPQCgyg2+Flqa7rNLBDvGEILbLufzAJ8CHsyb7hreH9NkWRGTDRRj6tyTFpmXqqG /EHpGWafhkShvDL7Qjq3uSeUCEvlISXyKZ412+FJahpSej2CigQebQHSxPilHEpP1Tfs XDr8PIpTDf6YbvULa3VvJW0hoj1kgdlIrb4u+LqjA+ZRORFcKeQjJdzLU1avSycoWlnP jthA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a21si4639322otk.277.2020.04.09.03.15.29; Thu, 09 Apr 2020 03:15:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726650AbgDIKNm (ORCPT + 99 others); Thu, 9 Apr 2020 06:13:42 -0400 Received: from foss.arm.com ([217.140.110.172]:48000 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbgDIKNm (ORCPT ); Thu, 9 Apr 2020 06:13:42 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2922D31B; Thu, 9 Apr 2020 03:13:42 -0700 (PDT) Received: from bogus (unknown [10.37.12.63]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3A5833F73D; Thu, 9 Apr 2020 03:13:33 -0700 (PDT) Date: Thu, 9 Apr 2020 11:13:30 +0100 From: Sudeep Holla To: Jiaxun Yang Cc: linux-mips@vger.kernel.org, Thomas Bogendoerfer , Huacai Chen , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Florian Fainelli , Robert Richter , Greg Kroah-Hartman , "Rafael J. Wysocki" , Thomas Gleixner , Jason Cooper , Marc Zyngier , Paul Burton , Allison Randal , Enrico Weigelt , Kate Stewart , Vladimir Kondratiev , Paul Cercueil , Zhou Yanjie , =?utf-8?B?5ZGo55Cw5p2wIChaaG91IFlhbmppZSk=?= , YunQiang Su , Arnd Bergmann , Serge Semin , Matt Redfearn , Steve Winslow , Alexios Zavras , Richard Fontana , afzal mohammed , Peter Xu , Mike Rapoport , Oleksij Rempel , Sudeep Holla , Kamal Dasu , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, oprofile-list@lists.sf.net Subject: Re: [PATCH 03/12] arch_topology: Make it avilable for MIPS Message-ID: <20200409101330.GB25948@bogus> References: <20200408113505.2528103-1-jiaxun.yang@flygoat.com> <20200408113505.2528103-4-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200408113505.2528103-4-jiaxun.yang@flygoat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 08, 2020 at 07:34:13PM +0800, Jiaxun Yang wrote: > Simply drop unnecessary archtecture limitions and add dummy > function for platforms without OF/COMMON_CLK support. > Also exclude functions for arm that existed in platform code. > > Signed-off-by: Jiaxun Yang > --- > drivers/base/arch_topology.c | 121 +++++++++++++++++++---------------- > 1 file changed, 66 insertions(+), 55 deletions(-) > > diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c > index 4d0a0038b476..9c2405d08dae 100644 > --- a/drivers/base/arch_topology.c > +++ b/drivers/base/arch_topology.c > @@ -143,57 +143,6 @@ void topology_normalize_cpu_scale(void) > } > } > [...] > #ifdef CONFIG_CPU_FREQ > static cpumask_var_t cpus_to_visit; > static void parsing_done_workfn(struct work_struct *work); > @@ -275,7 +224,64 @@ static void parsing_done_workfn(struct work_struct *work) > core_initcall(free_raw_capacity); > #endif > > -#if defined(CONFIG_ARM64) || defined(CONFIG_RISCV) > +#if defined(CONFIG_OF) && !defined(CONFIG_ARM) topology_parse_cpu_capacity is used even on ARM, so you can't do the above. > +#if defined(CONFIG_COMMON_CLK) Not required, it will either fail in of_clk_get or clk_get_rate if the platform doesn't support. [...] > -#if defined(CONFIG_ARM64) || defined(CONFIG_RISCV) > +#if !defined(CONFIG_ARM) I think we need to see if we can merge ARM support too or rename these functions in ARM. Since we wanted to keep changes minimum when we moved ARM64 and RISCV to common, we skipped ARM. May be worth giving it a shot ? -- Regards, Sudeep