From patchwork Wed Jul 19 10:12:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 108264 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp664952obm; Wed, 19 Jul 2017 03:13:51 -0700 (PDT) X-Received: by 10.99.112.3 with SMTP id l3mr2200851pgc.143.1500459231610; Wed, 19 Jul 2017 03:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500459231; cv=none; d=google.com; s=arc-20160816; b=nJAmexiA+pq4Qk9DB7/ztB8zTsNd3oabDulVmRwms3OCyuuojVQ6z0pPnvDIgHL5ea CSSE7P3Pugb0nIDMx3HhMGPIzQ/GhS2sQPcqJfWwJKpZV75UzSCJDIqZTRDqAC5DpfcJ BGWprnQ86piTBGh3CDFYrYOyuo9xUDhTUd57VGwnxJWrCA4nxKJqpXSsLkWL353QbS8x Fcjez3DsXRG7xbz31ecO4VAtGBcBb4dcIfT6hH8JYouxUZ/bhGCskXkHTc4KwIY3VdkJ xxFgWJ3SmLol8L/ct94Lkmd7sLeVexCXvkp1VDyNnN9GPvSV7/nNWwkC5jpY58AC2u8F x9Bg== 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:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=XwdCaH1/ceKa/aCZxa2glEli7oiuyYcxOYy5YfigPtQ=; b=WCcIeQcpeX1vXV7uR8NNk99KD0mJiyDr4OXGCcwJ8fPk3AmIqIBHx/uDHRHkp0xhIR Yiv4BsMKn6zupotPBs86cQNAKN2peSzrzsJ0H3ShfJumMGMwF/6ZpO0hC9+LOccM1Duz 8DR1gryaQqq1a3xGmV/+2WrePGKtq7XqSleaU96PotFI3/o+al+YR+Pi4949muQ+QmuN D+G8wTDIYEfWseqM7yVMo/v8/2DgLcDOKTAR8Cv2xJYe+mncPVy89lvk+YlUiwN9R5rt zXczLqfBxR6HvltuzofdMVfXWadvsckC3vwwVn7f4LmWrvczsRENk6gjTfM8QDKY7XZ3 3Gww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=HqI8ECNF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y38si3889880plh.438.2017.07.19.03.13.51; Wed, 19 Jul 2017 03:13:51 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.b=HqI8ECNF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932345AbdGSKNs (ORCPT + 25 others); Wed, 19 Jul 2017 06:13:48 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:36510 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932317AbdGSKNj (ORCPT ); Wed, 19 Jul 2017 06:13:39 -0400 Received: by mail-pf0-f179.google.com with SMTP id o88so18904467pfk.3 for ; Wed, 19 Jul 2017 03:13:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=XwdCaH1/ceKa/aCZxa2glEli7oiuyYcxOYy5YfigPtQ=; b=HqI8ECNFfyWV+d46bZA03Z9GY/DSmqOwwm+zdmcOI2I3wIpC6rvLCK10hqmtcWFhyl JN3UEgK6EH0gXXPS1TRQRiZDWklrtmZOKHv7u+vdhSKmB8XlVb+qM1dkqTlaety9+EJ0 ko8nnZRJTB6GaEZ0cb8L37/HuPxmJ79GTEruM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=XwdCaH1/ceKa/aCZxa2glEli7oiuyYcxOYy5YfigPtQ=; b=gWurKX/ZKsXNFlxlZLBaxxJJk553nKsqmZt+K8MLZDA6s28QH8z8coRxkKy05/wFEF ml94JfMn3gXQ1dqo7zWis5TojKS67jDh2IoTbYNuVcLQen0G+APNkfniNQsVjsK6+MG9 DFXgwbc++RBTGH4DVb6o9z8pGdR5hDaujT0uv0U2/jaS9BmVs3zadShEja5uGBK4zIu3 thY9pBPAHRVeiUY0LMGgzdh0i6Krg0ZsMAvtFHHYwvZtrOYR0pzhIUHPg6fDTKePkcBW v49kvlbdhqDBgRA2Etf7sauxJOAvqnDJgAiwwAnCtL5OLBbYHT/Il3HAyQwT4nYxB0Qk lxCw== X-Gm-Message-State: AIVw1123nceXC7hpnaISXoau/GO97tf3x/PgNJe6paCwft2yyLuICYLy dJw0PQjk2l5NoKC3 X-Received: by 10.84.149.139 with SMTP id m11mr2425372pla.266.1500459218457; Wed, 19 Jul 2017 03:13:38 -0700 (PDT) Received: from localhost ([122.167.171.93]) by smtp.gmail.com with ESMTPSA id k19sm12221554pfk.16.2017.07.19.03.13.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Jul 2017 03:13:37 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , linux@dominikbrodowski.net, linux-kernel@vger.kernel.org Subject: [PATCH V3 9/9] cpufreq: Allow dynamic switching with CPUFREQ_ETERNAL latency Date: Wed, 19 Jul 2017 15:42:49 +0530 Message-Id: X-Mailer: git-send-email 2.13.0.71.gd7076ec9c9cb In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With the recent updates, CPUFREQ_ETERNAL is only used by the drivers which don't know their transition latency but want to use dynamic switching. Anyway, the routine cpufreq_policy_transition_delay_us() caps the value of transition latency to 10 ms now and that can be used safely with such platforms. Remove the check from cpufreq_init_governor() and allow dynamic switching for such configurations as well. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.13.0.71.gd7076ec9c9cb diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index a4d9b47c4af4..c7ae67d6886d 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2016,8 +2016,7 @@ static int cpufreq_init_governor(struct cpufreq_policy *policy) /* Platform doesn't want dynamic frequency switching ? */ if (policy->governor->dynamic_switching && - (cpufreq_driver->flags & CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING || - policy->cpuinfo.transition_latency == CPUFREQ_ETERNAL)) { + cpufreq_driver->flags & CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING) { struct cpufreq_governor *gov = cpufreq_fallback_governor(); if (gov) {