From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1239EC433DF for ; Thu, 30 Jul 2020 04:26:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D03C22072A for ; Thu, 30 Jul 2020 04:26:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GqSqUg3M"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GRJbWIVR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D03C22072A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=29dlEbULVNTZ0O1zRrJOvcAUb25XKdiNwej1ryhvkqM=; b=GqSqUg3M4v/j8rPSwaivweIP/ vccNks2mJc81Ot0VI+qydl7BpLbbyc+GM/d78NUJZitn3cTixoNl0vpRG6u9vH5tFXgYxMZq3FHcU +jpqh9/jbJt/+d9vesBw/UNo7gRsWdoK+Txz2RQZuUlC79hv3aeZjauksHYjLXDM2pjEZVVXUpBtO kDHIxgdYyoWn13l5GvCaJITd92zN5vIRhIOGCGgHWmL4b4UE1uf7Yiv9WwfuMGZdA3O27e4I9i8RE RRCfTgjCrU2EuROH36zRONcsz5UsO3WBhlJ38cUFAOlW7Dwwi1ibVhQnpdczYyC0oB4rw1QgE+Vvy b40AniW8g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k107M-0001HF-74; Thu, 30 Jul 2020 04:24:32 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k107K-0001GL-8l for linux-arm-kernel@lists.infradead.org; Thu, 30 Jul 2020 04:24:31 +0000 Received: by mail-pl1-x644.google.com with SMTP id q17so13079300pls.9 for ; Wed, 29 Jul 2020 21:24:28 -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=j185VTUFZ41i9WM2XBIVFWtbx8oMO8YqCKB3shMba21ff1s6XQjVxodYZwUhYiw8ce Pvau0/QRMBnWdP+9Cc37FQk8TtSO4O8hOoYHWOL8kxymYYh32Pnon1Mwln/1ey1JdYh5 4lP9cA4QucS82JtCyci3GddCYZACc4a0s4wOdsByM07z8UGd5NxV/JxooIfmXDloAnId RvDssFzUfNw/LC1Fe/CIDgX0oBjtfTqzIpNR2FqmNXsbO1dLyFwpzP3gEYrfBnGnDxB2 BROG56clSuS62DwLTxzbumSe68PA7ezTkDPxdh6ATNOrSSnWhDKM6Xb/vG3N2zB7bx5v S6kA== X-Gm-Message-State: AOAM531T+ZdwmNwwL9EAGzQi/jPwX+I19KR/KZrPC/jDx97Zp7M0/rcC iJMbEL4ibTTKGnFgq8AFVPnuhA== X-Google-Smtp-Source: ABdhPJx1DHAbdahx3DDZViUcA0KPnnf1c9a/fhDZ4VrpcnC85CChhioBJu+ODR5uSLaHF1eR5NILUA== 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 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-Disposition: inline In-Reply-To: <20200722093732.14297-4-ionela.voinescu@arm.com> User-Agent: NeoMutt/20170609 (1.8.3) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200730_002430_364471_A781EA2B X-CRM114-Status: GOOD ( 13.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pm@vger.kernel.org, peterz@infradead.org, catalin.marinas@arm.com, rjw@rjwysocki.net, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, mingo@redhat.com, sudeep.holla@arm.com, will@kernel.org, dietmar.eggemann@arm.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel