Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp883657pxb; Tue, 3 Nov 2020 15:29:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJybykeL6ch5X2yFFzTuxvrYPT9N8wBF0JRno4Ot1tc9PB7/fGGi7i3Jq4AvnVW9s9OeQeeX X-Received: by 2002:a50:eb87:: with SMTP id y7mr3013025edr.187.1604446146275; Tue, 03 Nov 2020 15:29:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604446146; cv=none; d=google.com; s=arc-20160816; b=X0aa3b8MJ4HbriAP3hkZafSljsf1U65zUXHw9V5OX3smYwTJ/mVYmBOlo2upBQpzve ng5KJfDu1ksgHXec4sj8HyRMjert36AtJI9wOabF2VCbM52G2oyMcjfsQty7nQl6ky1w QODLHfGinm/6WpdzCZBhOYzVOSDuNjb9Ak3OLBJr8g0SJdqC9au+fkQZ3A41I+HYj/4w 1Sxn5LTYLewSlym1FepEN1Z7WToRhX9XudDeygyLl+n3X3+/tiAghKEsiPOX6xsXez3c g74L7X0/i6HARrhTWaBqciLfI4TFdc5K9GKQLIY8Y1pwdjfMpqiKVjpf6M/fQfEOQuqx OmTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BSUa97FSiO+Du0LFdQmXg0sQNWAdaPo4YHBnSaXMgz8=; b=oQnf1l8LEi/7wCDx726rE8TCQ1b55nVeVyfQsH0DfsBQGSEdQ+ZBBDs88hhcjXfDWC w4ylsQbhVHEhgn5KqWkib1ntFk6mvt73nygmJZFU5htL8DtDPCORXxrsxQiJ17N1YOBy BWHYw69u0DmBtpOga3d6DeTMUiuQCer4MKa8Da5C9brmWLucoPT/Gg6uWFpwARXzyTsH jG1EfoidOKejxvcKSVw2s2jNQW22IOh1xEQ+0zjjxmd7rOJASMXCQ23I/uX0+FcHrkZq Lb8CtoKW+WhHYiC0lhHu947KVVWz080Y8chBgz0iNhBVGLs8pasLDgn0azPA6r7Oj2jn zi7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Eh2ivTT/"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i9si229566ejr.467.2020.11.03.15.28.43; Tue, 03 Nov 2020 15:29:06 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b="Eh2ivTT/"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731832AbgKCVtA (ORCPT + 99 others); Tue, 3 Nov 2020 16:49:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:44862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731836AbgKCUuh (ORCPT ); Tue, 3 Nov 2020 15:50:37 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0AB5E20719; Tue, 3 Nov 2020 20:50:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604436637; bh=/KoFndIGYJbuT51BEtg0sokPNs1B3QruXjEtVFtxWtw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Eh2ivTT/cYO2VT1bET/N4uG2lGJqxP3j7U+X7lpN0zqFp7yZ8igd9WE/sGuVgHmm9 3m3l3iN/8qQ0Pg5xzcFCyEVOLh17lv6JS5I39mHSzExsyut7y4cKWIw4XTyp6xoQE5 W2/lLzdiWisXLtazbZyxoHlJLubt/Me+i9kPNLPc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julia Lawall , "Rafael J. Wysocki" , Viresh Kumar Subject: [PATCH 5.9 336/391] cpufreq: Avoid configuring old governors as default with intel_pstate Date: Tue, 3 Nov 2020 21:36:27 +0100 Message-Id: <20201103203409.801555020@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203348.153465465@linuxfoundation.org> References: <20201103203348.153465465@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki commit db865272d9c4687520dc29f77e701a1b2669872f upstream. Commit 33aa46f252c7 ("cpufreq: intel_pstate: Use passive mode by default without HWP") was meant to cause intel_pstate to be used in the passive mode with the schedutil governor on top of it, but it missed the case in which either "ondemand" or "conservative" was selected as the default governor in the existing kernel config, in which case the previous old governor configuration would be used, causing the default legacy governor to be used on top of intel_pstate instead of schedutil. Address this by preventing "ondemand" and "conservative" from being configured as the default cpufreq governor in the case when schedutil is the default choice for the default governor setting. [Note that the default cpufreq governor can still be set via the kernel command line if need be and that choice is not limited, so if anyone really wants to use one of the legacy governors by default, it can be achieved this way.] Fixes: 33aa46f252c7 ("cpufreq: intel_pstate: Use passive mode by default without HWP") Reported-by: Julia Lawall Cc: 5.8+ # 5.8+ Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/cpufreq/Kconfig | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/cpufreq/Kconfig +++ b/drivers/cpufreq/Kconfig @@ -71,6 +71,7 @@ config CPU_FREQ_DEFAULT_GOV_USERSPACE config CPU_FREQ_DEFAULT_GOV_ONDEMAND bool "ondemand" + depends on !(X86_INTEL_PSTATE && SMP) select CPU_FREQ_GOV_ONDEMAND select CPU_FREQ_GOV_PERFORMANCE help @@ -83,6 +84,7 @@ config CPU_FREQ_DEFAULT_GOV_ONDEMAND config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE bool "conservative" + depends on !(X86_INTEL_PSTATE && SMP) select CPU_FREQ_GOV_CONSERVATIVE select CPU_FREQ_GOV_PERFORMANCE help