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=-6.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 BC532C433DF for ; Thu, 30 Jul 2020 10:31:55 +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 8CA3C2075F for ; Thu, 30 Jul 2020 10:31:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gSA7SpZa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8CA3C2075F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com 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: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=SSigbyQV+8JgYfVGOAACVOUumCn+aWijqM+hniVovlw=; b=gSA7SpZa0SGpescaiM6S6klhs 8XynRFS7nDtwTjD9P2zkB8e2GhLpR6hldZ083YvG1cAoHJE9XysL3A8L5De8GjhXNFWoMPSjsEH9I JOt2EG8FxkeDFpzhQWvf+a81Jm6BSHYQmgfN6/fgsCrKC5f2N9QLtTSwJq7Cmzvt4U2UIRDW38444 reBFRNdE4c6yFIWLuas4am6QrONx77VbLdnKfb+KGxkNJUpPxuGTSYQPOJs6WAcgJ+43BObUKIfcF Z1bLiIr//TT9H0VB+Qn/add7X+2BqtkZ1Hw6AiHv0AVXL9FO5SAQTgLmQll+zmMjHzKFQT3gHfmfS 8lGpIldbw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k15pE-0006Bu-7v; Thu, 30 Jul 2020 10:30:12 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k15pB-0006AK-Mq for linux-arm-kernel@lists.infradead.org; Thu, 30 Jul 2020 10:30:10 +0000 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 578A130E; Thu, 30 Jul 2020 03:30:03 -0700 (PDT) Received: from [192.168.178.2] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C14CB3F66E; Thu, 30 Jul 2020 03:29:55 -0700 (PDT) Subject: Re: [PATCH v2 3/7] arch_topology: disable frequency invariance for CONFIG_BL_SWITCHER To: Viresh Kumar , Ionela Voinescu References: <20200722093732.14297-1-ionela.voinescu@arm.com> <20200722093732.14297-4-ionela.voinescu@arm.com> <20200730042423.4j22udejluis7blw@vireshk-mac-ubuntu> From: Dietmar Eggemann Message-ID: <1db4317a-0018-1590-f0ae-ed5e235b174f@arm.com> Date: Thu, 30 Jul 2020 12:29:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200730042423.4j22udejluis7blw@vireshk-mac-ubuntu> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200730_063009_839835_DFBA1EFF X-CRM114-Status: GOOD ( 19.48 ) 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, 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 30/07/2020 06:24, Viresh Kumar wrote: > 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. I agree it's not nice but IMHO the cpufreq flag is worse since we would introduce new infrastructure only for a deprecated feature. I'm assuming that BL SWITCHER is the only feature needing this CPUfreq flag extension. #ifdef CONFIG_BL_SWITCHER is already in drivers/irqchip/irq-gic.c so it's ugly already. Runtime detecting (via bL_switching_enabled) of BL SWITCHER is right now also only handled inside vexpress-spc-cpufreq.c via a bL_switcher_notifier. A mechanism which also sits behind a #ifdef CONFIG_BL_SWITCHER. So IMHO, the additional #ifdef CONFIG_BL_SWITCHER in drivers/base/arch_topology.c it's a small price to pay. Are there still any users of CONFIG_BL_SWITCHER? I guess it's only limited to A15/A7 systems w/ vexpress-spc-cpufreq.c ... so probably only TC2? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel