Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp393956pjb; Wed, 22 Jul 2020 02:39:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsoKsbpk7+WqoNWMHRmxX/E9SyvxjafxWQlFXhI8V7m5KV7x/ysodCFvSFyMGI2trVBfgG X-Received: by 2002:aa7:c90a:: with SMTP id b10mr30421892edt.71.1595410761953; Wed, 22 Jul 2020 02:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595410761; cv=none; d=google.com; s=arc-20160816; b=pUF373mn1U5ERe5TwVm9C/qNvVu2hj26KaYJ/BPtvTZ0bohkPxZAVwCc+serSrYFoY nyy1Ga+SZBfnqeXewWhWDi13t6pwRiZoC/wv1uqCQrwTEp07m4aeSk45xMiUiXUhEgD7 rIipXyf3Qw/hdGNtxC/k9SYg5aFio+RK2j0+xgjrKd6t1+C3UfOv2BxRp2X6wuFvbVTg otehb2D+jwUFnnfpY5B1zECszJ2PUUsSO9nPMOQD5t5Smaat9WiZTgocZtQ1buV3NHFo cw53m5ntp7QoOgk9cD5vju79outMJ7CH9JTZRPid4ZHRx1zRzJIH29/kmv235sqof0CC 5tCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=tqGaV7KMd3rvG1Pu2u9zuJ9A+HjVBUaFeLeODeM7NOg=; b=WmFKmbnVuP0AY4USsZaZKpT6EQVxI4xlqUkDORQ05lr9vYmFbmfaNnHEpYE2Zi5x13 uN9FRPzrkF03dCxdjo1aI5pTCsJSpQmmrbsvpU6fOGIp+Wt6Mk93UTCe1VcqTYBLdGG8 2quG/L7DzlHB2kqaF9oUsfAuyB0qnE1N6k0KIgv7G4idApHnuqsZqzpGa6Ai5iItfupL omJ5henCYfJej4BNg964kVZRXX+3+wmP0foYJbQWmVV1MBZ5efroPkZzWF404TiImyPS yXohb9x8Os42oLCvBmeJWvRzF70jjLKQV+fcuXOtcZ5XVowJWbHWft/AcO9pZsfzXNbY U2Sg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q26si13844866ejc.433.2020.07.22.02.38.58; Wed, 22 Jul 2020 02:39:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731609AbgGVJin (ORCPT + 99 others); Wed, 22 Jul 2020 05:38:43 -0400 Received: from foss.arm.com ([217.140.110.172]:53040 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726147AbgGVJim (ORCPT ); Wed, 22 Jul 2020 05:38: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 1F920106F; Wed, 22 Jul 2020 02:38:42 -0700 (PDT) Received: from e108754-lin.cambridge.arm.com (unknown [10.1.198.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 744AB3F66F; Wed, 22 Jul 2020 02:38:40 -0700 (PDT) From: Ionela Voinescu To: rjw@rjwysocki.net, viresh.kumar@linaro.org, dietmar.eggemann@arm.com, catalin.marinas@arm.com, sudeep.holla@arm.com, will@kernel.org, linux@armlinux.org.uk Cc: mingo@redhat.com, peterz@infradead.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ionela.voinescu@arm.com Subject: [PATCH v2 3/7] arch_topology: disable frequency invariance for CONFIG_BL_SWITCHER Date: Wed, 22 Jul 2020 10:37:28 +0100 Message-Id: <20200722093732.14297-4-ionela.voinescu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200722093732.14297-1-ionela.voinescu@arm.com> References: <20200722093732.14297-1-ionela.voinescu@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org big.LITTLE switching complicates the setting of a correct cpufreq-based frequency invariance scale factor due to (as observed in drivers/cpufreq/vexpress-spc-cpufreq.c): - Incorrect current and maximum frequencies as a result of the exposure of a virtual frequency table to the cpufreq core, - Missed updates as a result of asynchronous frequency adjustments caused by frequency changes in other CPU pairs. Given that its functionality is atypical in regards to frequency invariance and this is an old technology, disable frequency invariance for when big.LITTLE switching is configured in to prevent incorrect scale setting. Signed-off-by: Ionela Voinescu Suggested-by: Dietmar Eggemann Cc: Sudeep Holla Cc: Rafael J. Wysocki --- drivers/base/arch_topology.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index 4d0a0038b476..708768f528dc 100644 --- a/drivers/base/arch_topology.c +++ 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 DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE; -- 2.17.1