Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4741562ybv; Wed, 26 Feb 2020 02:20:20 -0800 (PST) X-Google-Smtp-Source: APXvYqzB91YTUHni5WcMqBaqv/GTVx/QebLIjyKX1mgKx3+4b/ZKotAkx5VbqLk4DIXAJbz9fEbR X-Received: by 2002:aca:f10:: with SMTP id 16mr2348722oip.117.1582712420273; Wed, 26 Feb 2020 02:20:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582712420; cv=none; d=google.com; s=arc-20160816; b=TvdY/5lvVlAZaDKPTC6BArZUJMQ7bqkCoojmQgSnMlMNabqg22cUxzGJZl6j5LtlIT tY4iEdJK2/zCWbDDnK9AxlyXLOFjALtDPYxYDVhyfe6X98+Dm7Y3Lpu1POhVlURobAWm cUqfAhp66AD41ktlrJ9sLn4GsgzH7pJxuoOMmp6tCiTDWfDfq+lORjkxhsMcX+48uhrl JVNPpYkEvb8YULMKXVOxYCcXfl7QkWTn0dL3UJstXW4sEZRV2Z4BB2nSujSafWUUVDc7 uHRVem5Xx3rambDPjXj5Q5A/jsJMu9ufcc4Q6URtCckwzhOrKQd9m5D5myai4PHmOrjr 8JKw== 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=P/5sf8XlcA9L6QyVk4UenOtq98APZFaDKQjP5MwaolY=; b=UggvhVo6riGz88uRUWrd0ANO1zSwc43JhSLvWQzEWHPxdGrjtnqpXRALPsgc7tFb2O WR+jR/VXf13ZASIKAMRWaFFXYL2VHqec2xcP7prqk8mRs4uOuvGEAbW/J2Q5vVCzbsLb gyyeGoJedpSKdmpiNNA31D9zfGjEUbZwdsnK8OvKnDHcOY3mGQsn3UCMjp7tAQvqkZ0Z kQ7ogZLj7lGWW6JNKvFZu8lCUVzKd5Tr70wjyPjjIWi2A/CtP2WXR1xbbCqozr1kLaCd DUKGmb90095AER5XyidfclVQTJh2unh7KsN4xERaYfvXKxWS2d/eHz1ZRwgELbPMoho1 o25g== 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 i8si843933oih.206.2020.02.26.02.20.07; Wed, 26 Feb 2020 02:20:20 -0800 (PST) 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 S1727802AbgBZKSu (ORCPT + 99 others); Wed, 26 Feb 2020 05:18:50 -0500 Received: from foss.arm.com ([217.140.110.172]:33286 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726927AbgBZKSu (ORCPT ); Wed, 26 Feb 2020 05:18:50 -0500 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 9AEA21FB; Wed, 26 Feb 2020 02:18:49 -0800 (PST) Received: from localhost (unknown [10.1.198.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3B1DC3F9E6; Wed, 26 Feb 2020 02:18:49 -0800 (PST) Date: Wed, 26 Feb 2020 10:18:47 +0000 From: Ionela Voinescu To: Lukasz Luba Cc: Valentin Schneider , catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, maz@kernel.org, suzuki.poulose@arm.com, sudeep.holla@arm.com, dietmar.eggemann@arm.com, rjw@rjwysocki.net, peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org, viresh.kumar@linaro.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH v4 6/7] arm64: use activity monitors for frequency invariance Message-ID: <20200226101847.GA19513@arm.com> References: <20200224141142.25445-1-ionela.voinescu@arm.com> <20200224141142.25445-7-ionela.voinescu@arm.com> <18604cef-1e26-96a6-38b3-ab03b1b53b48@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18604cef-1e26-96a6-38b3-ab03b1b53b48@arm.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 Hi Valentin, Lukasz, On Tuesday 25 Feb 2020 at 09:59:20 (+0000), Lukasz Luba wrote: [..] > On 2/24/20 6:40 PM, Valentin Schneider wrote: > > > > Ionela Voinescu writes: > > > +static inline int > > > > That should be bool, seeing what it returns. > > Will do! [..] > > > > > > +#ifndef arch_cpu_freq_counters > > > +static __always_inline > > > +bool arch_cpu_freq_counters(struct cpumask *cpus) > > > +{ > > > + return false; > > > +} > > > +#endif > > > > > > > Apologies for commenting on this only now, I had missed it in my earlier > > round of review. > > > > I would've liked to keep this contained within arm64 stuff until we agreed > > on a more generic counter-driven FIE interface, but seems like we can't evade > > it due to the arch_topology situation. > > > > Would it make sense to relocate this stub to arch_topology.h instead, at > > least for the time being? That way the only non-arm64 changes are condensed > > in arch_topology (even if it doesn't change much in terms of header files, > > since topology.h imports arch_topology.h) > > Or make it as a 'weak' and place it just above the arch_set_freq_scale() > in arch_topology.c, not touching headers? Yes, you guys are right, this works better nicely confined to arch_topology.c/h. As Lukasz suggested, I'll make arch_cpu_freq_counters (while here, it probably works better renamed to arch_freq_counters_available) a weak function in arch_topology.c with its strong definition in arm64/kernel/topology.c. The diff is large(ish) so I'll push v5 directly with this change. Thank you both for the review, Ionela.