Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1640605ybg; Wed, 29 Jul 2020 21:25:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxh97OFukSIe61efdesp4zEFF7men//rjfHdbNe+8h8FSS5XTFChSI5UkZkDIQgjRwG8FDK X-Received: by 2002:a05:6402:1a46:: with SMTP id bf6mr908889edb.284.1596083137882; Wed, 29 Jul 2020 21:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596083137; cv=none; d=google.com; s=arc-20160816; b=AGjJOVfdKYGWy2n7lJPtZw8iQlvrI+6vHyfsao81Eu/CYUZJ+G/JWRKR6zGARsYhiv Z0v+xQshj5OzFt1jLZ5bMoY6XfQMiNN719yhAMYMYaSHlQOIkGxzi8Z4UXnRY9j6pLL+ OKyegXWhLmcfukLXd/Hjzp1xAP1xrJK+wTgSw8F/7xm9JRMxsmnc/IiPHmMQhJ9jocJu 5nIAHvlg0PPF07E9PbpMMZ/OPymEEfxR8EQJXHCTaodF6VR9t+8AX41CIWkPqA6CXEL0 z97VM1++6F/DQWYtgjSSdD72/I1I86re42jM69xW5w8NeZdDbxcc7Q3aGqJ3nUqyFKOd vwBQ== 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:dkim-signature; bh=5sgdtYzqTNVnuC7tTThaaFG3wxZ0ZxYzze4AncPyru0=; b=AZyOaUdG/LNK6vkN60QF7uZiMJiDO27ZtITVzD8SKP5zihP1atvARqpR3USfr1ntlN 4+wfyASyKzBnLAT2hU62FhRBquxjmUjmyW7m9LjxwXdJNzLNI6eQ6NpK+ymbKeaWuysV YMRx7o279U9/WL9H+J+IXAFVWbk0Q0xgs92cTaLV3V2k25gBdYUrXn/Ya07My3azKftC XRKZl5tk2qpHW1MX3qFTXWjO8NnkQDDPlBWAixTR3p4lS0+zQv8riW1rN3aWjvDB5FC5 OXLhX/ptqH8U0miciRAmoFdpBmOF/SNVhc0QuRui9VAEH7QSYgEFQTDgoxmGKBh2+EKK /KnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GRJbWIVR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm26si2478778edb.345.2020.07.29.21.25.15; Wed, 29 Jul 2020 21:25:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GRJbWIVR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726261AbgG3EY2 (ORCPT + 99 others); Thu, 30 Jul 2020 00:24:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725765AbgG3EY1 (ORCPT ); Thu, 30 Jul 2020 00:24:27 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2477C061794 for ; Wed, 29 Jul 2020 21:24:27 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id m16so13092145pls.5 for ; Wed, 29 Jul 2020 21:24:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5sgdtYzqTNVnuC7tTThaaFG3wxZ0ZxYzze4AncPyru0=; b=GRJbWIVRXQ2chTvOGH7LcET+CS3EqdQ3FE2txXjNJJQd5NhQbwr1Bs1WJV09IAstre c7nY+/7bByE/JMUWsVycHako7T8U+8AiWmGitjQiTfsigfC+SrZauFxZd+kdnTKC4o0B ctRZULLQjmxvICgTh1WOqrF4pPYw12UCGrqRzCdKTQgBIlmm24e6szM/3PNuK7LqEcpv 3KhCahzYK/6fpdEyp9hZf65tcY9kSZd/yzFTCljxnTwobIZr05T4p1U6WIFp61VaL9iH Cr1FAiKnrYVNWB7omYDjL6h5/REgvSqtYWq2OlLNN0a/DDDciMhCb0NLnRud1FD3iAqs c6iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5sgdtYzqTNVnuC7tTThaaFG3wxZ0ZxYzze4AncPyru0=; b=CpuBYYgrMVQs06FZdwtaLNMabEW1cwsKJlxSPHOkIJy9Olio1EvzTJJ9evUyTdILW/ HogebBYrE7ANd/brMtkWmhLJGfXDPoArhcdjNcPddPnU/rI8/DHULIaMODtHTbJfSqIR H0qJn1JLw9qottnhW42pyU/VTcj7dV372cfzZ8H9gV9ixGK6JeiMhpPIelTbc/5cC3me GMKHFyygsLH9mJvcLCLWxCYM4CS97skhtgX/3Y+wPs5nbCcy9hQh0fx7aCdK+16gae9r MrKOT1bBd4MC/wY8VNaIrOKjCrWErFhsOzyTTGNTDl3ZrV9MqdRo9UVNvAzspeQbCXM5 D7Nw== X-Gm-Message-State: AOAM533bUXafC+B33wejHrTAErsMSVGQ1rkdEFPFTXvAMCvapJb2Zpof Qv+pQyEXkc7cSMB0l+d+mCcOtA== X-Received: by 2002:a17:902:a713:: with SMTP id w19mr31748049plq.146.1596083067140; Wed, 29 Jul 2020 21:24:27 -0700 (PDT) Received: from localhost ([106.201.14.19]) by smtp.gmail.com with ESMTPSA id 9sm4158736pfy.177.2020.07.29.21.24.25 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 Jul 2020 21:24:26 -0700 (PDT) Date: Thu, 30 Jul 2020 09:54:23 +0530 From: Viresh Kumar To: Ionela Voinescu Cc: rjw@rjwysocki.net, dietmar.eggemann@arm.com, catalin.marinas@arm.com, sudeep.holla@arm.com, will@kernel.org, linux@armlinux.org.uk, mingo@redhat.com, peterz@infradead.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/7] arch_topology: disable frequency invariance for CONFIG_BL_SWITCHER Message-ID: <20200730042423.4j22udejluis7blw@vireshk-mac-ubuntu> References: <20200722093732.14297-1-ionela.voinescu@arm.com> <20200722093732.14297-4-ionela.voinescu@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200722093732.14297-4-ionela.voinescu@arm.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22-07-20, 10:37, Ionela Voinescu wrote: > +++ b/drivers/base/arch_topology.c > @@ -27,6 +27,7 @@ __weak bool arch_freq_counters_available(struct cpumask *cpus) > } > DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE; > > +#ifndef CONFIG_BL_SWITCHER > void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq, > unsigned long max_freq) > { > @@ -46,6 +47,7 @@ void arch_set_freq_scale(struct cpumask *cpus, unsigned long cur_freq, > for_each_cpu(i, cpus) > per_cpu(freq_scale, i) = scale; > } > +#endif I don't really like this change, the ifdef hackery is disgusting and then we are putting that in a completely different part of the kernel. There are at least these two ways of solving this, maybe more: - Fix the bl switcher driver and add the complexity in it (which you tried to do earlier). - Add a cpufreq flag to skip arch-set-freq-scale call. Rafael ? -- viresh