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: 9851245 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 58ED560388 for ; Wed, 19 Jul 2017 10:14:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B3E42811E for ; Wed, 19 Jul 2017 10:14:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3FD3728607; Wed, 19 Jul 2017 10:14:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA30B2811E for ; Wed, 19 Jul 2017 10:14:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753189AbdGSKOI (ORCPT ); Wed, 19 Jul 2017 06:14:08 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:33657 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932316AbdGSKNi (ORCPT ); Wed, 19 Jul 2017 06:13:38 -0400 Received: by mail-pf0-f171.google.com with SMTP id s70so16179511pfs.0 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=QDrcljgEEgNDPFI8fkDuKnjoxbCf2vUf3OgWjA8ROZdb6I8u+UOar6dIpEc7B37kyv MX3ds+CAICo2zmEx03eV+b7V4K3HaEkcrTyljlnEIPQ1bgbmKCRl6u3QNZbvkgwbwQ2g YNQcGNrWJc32l16dpNmOVj37PK7p9qz2VZrFNXPKOP+Zps8c6er/xhYNUpJ4FdoWuCdH E832Rikir+OOiYhUjBi+Uqje+RiIvzxqEPNjTnfH8kDyFG3dipUIiNmkJcv5N8WTyhOd PCFEGyQnRNy/8n0a4B2rGLoyuX/a2A4Ic0+tXmfppU3mJPHs8O+X//lQWrJNtwQeyMLk K75Q== X-Gm-Message-State: AIVw112sZIm2K5P81YKAWJdVhRxnJQcDI5/c2xr5WVaAsyWjXICIucci GIVasTfKGUGF5LC+ 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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) {