From patchwork Mon Dec 5 17:57:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stuart hayes X-Patchwork-Id: 29819 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2401189wrr; Mon, 5 Dec 2022 10:10:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf6jcg8YGFF5EGARB9CkW3c8e3tZihM0k6uYCJ8Sy1yorYF3cxy5kuYG6E129Ix7bUHXgnFb X-Received: by 2002:a65:5aca:0:b0:478:b2d5:d843 with SMTP id d10-20020a655aca000000b00478b2d5d843mr6676291pgt.415.1670263846827; Mon, 05 Dec 2022 10:10:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670263846; cv=none; d=google.com; s=arc-20160816; b=sEvJ9MBhKrFbLJkZitKYnSjRpjj4YHuGvJU+wYgSmvXP1EJKw5ZkVesNtj1L4HpwBB n11YgwIPY0r4gt0Lt0nfDWyg8nVsIg8NPjolFJEKvyoroVsvCIQtVp/nwkPuftClVFFM 0bnN83OZ7SyU3kD2YlhxN66Cy02erer05S79CAh031UxTZ7Seq9BqNYVEo4kS46Ko2JV CqIAN8BpW+ilDm20h1oBGz3eDlXkxW4Utr/S1F0ddszjwUvYUCkZ1DSs7ckx5ixW3+Vj XeZqCZl63vMdeRKSnc8vF0weiVzCycpLeFGmTUbsTXefk4Qy+F0dofJYb/tm4WtgTV9z VwUw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=7F0TLMUFiwR3iCnsvoeF7vGdv4a+JS2sxocOvhZdEjg=; b=kpTDprcefkJ/uw0XfywcuL7A0mFxA/ip6/pwNjwwJijytWTzjowSKtFyxD5xYz10Tb 8XWDQSsnATi0QIDdU1sCCP+xiQFX0H8JYAvjOyKK0r6d0BIX5y2c/ucvGRwaak/B/IZ0 8HbWFDzXVFIQK6wlngaCp2DHg1JBjXoeg2JAOnO1wA/0XDuqXPtXC/vrjyXLZRti1Iu1 v1ppVT4VSlrT1sJMKRucvJDoahqYeLvLJeGQv19JvOV8cKZbLnca8/9k5I7Chz1Y5h7u 0nIpKuJbnh4BKLXfdoR+N4q+UGUsGtsdA7SK772WGL7Ot4/Z9L4g+5Cg9x7rznoMnVUV /4eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ni9TZbp6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f124-20020a636a82000000b00478496a1373si14895006pgc.382.2022.12.05.10.10.33; Mon, 05 Dec 2022 10:10:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ni9TZbp6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231232AbiLER5y (ORCPT + 99 others); Mon, 5 Dec 2022 12:57:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229999AbiLER5x (ORCPT ); Mon, 5 Dec 2022 12:57:53 -0500 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE71D12ABA; Mon, 5 Dec 2022 09:57:51 -0800 (PST) Received: by mail-qk1-x734.google.com with SMTP id p18so5620633qkg.2; Mon, 05 Dec 2022 09:57:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7F0TLMUFiwR3iCnsvoeF7vGdv4a+JS2sxocOvhZdEjg=; b=Ni9TZbp61wZ/nJkqkWBATXcK110ZcuHrNa4AJ5A9L7yz/6gyxhIN500aDkuwRyRY9z Qz+UZguYSPmUxhqWHPG34lGIvHVN51Ss9wTTycAUVPUTEgTyF0lmjO2x+9JDHNriMKjp qgzOnylRG8MyJ2YyCKEujtHMu6LaEczexztyawRsl/nCMjmOnVS3+qWbNWLRoHbavZx/ fsDpeRPW3bDhkfFDx2wwOcGKAYA7k2L8TJ1Qri37w31RlFmakw6BTPlYBpOMmgmlIJG8 BtTNhDGTFDitf0277pxO8NwtHl8S3luOd5ry5w4RrfAuwB7+8K3QQtxMsDgpBPxc6gwB 9hVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7F0TLMUFiwR3iCnsvoeF7vGdv4a+JS2sxocOvhZdEjg=; b=3E7hpaXjmhEhRtyTSOAjrJChYz6JJgADzvlqiZA3Zzw/y/HBM967ok2q4zbqS3V9an J5XpjKFumXkUJ4bDUJrVp8FjtcArUE5QkGMl5XOpUHHkgNGf0RjJOoOpY4EuJHsU8+AQ W0o0Gg0a+cnSoqCnC+62lM2ivkLpKZbrTRgs+RAKWefrpAqEMTDc6OE5JAgWanUmzQyv pG0IArMXmr8+Bw78xS1MXR4iNPiqriflJnwWd0WxS75ESW+brUgmYf/vfm/v2KJ65rDO XtH55Qslrvi2CwNS8OWSy0b4ESrf4Et8kNiBYcNkYiyXAPiABCdWM3z9kwR7zeEiW3DH zA8A== X-Gm-Message-State: ANoB5pkLm5ekPmokRXz9qrXUsHbsO/lbKSKmbvUFrMDEekquAJQsVnPh 2UEAxJv39xi8y9tCwtSEgABGHzvvmns= X-Received: by 2002:a05:620a:13ab:b0:6fe:b81b:b34d with SMTP id m11-20020a05620a13ab00b006feb81bb34dmr5232347qki.670.1670263070796; Mon, 05 Dec 2022 09:57:50 -0800 (PST) Received: from localhost.localdomain ([143.166.81.254]) by smtp.gmail.com with ESMTPSA id u6-20020a05620a430600b006fc5a1d9cd4sm12903721qko.34.2022.12.05.09.57.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 09:57:50 -0800 (PST) From: Stuart Hayes To: "Rafael J . Wysocki" , Viresh Kumar , Kyle Meyer Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Stuart Hayes Subject: [PATCH] cpufreq: acpi: Only set boost MSRs on supported CPUs Date: Mon, 5 Dec 2022 11:57:44 -0600 Message-Id: <20221205175744.9746-1-stuart.w.hayes@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751398583534883934?= X-GMAIL-MSGID: =?utf-8?q?1751398583534883934?= Stop trying to set boost MSRs on CPUs that don't support boost. This corrects a bug in the recent patch "Defer setting boost MSRs". Signed-off-by: Stuart Hayes Reported-by: Borislav Petkov (AMD) Tested-by: Borislav Petkov (AMD) --- drivers/cpufreq/acpi-cpufreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index bb58175a8d40..a7c5e312340e 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c @@ -888,7 +888,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) if (perf->states[0].core_frequency * 1000 != freq_table[0].frequency) pr_warn(FW_WARN "P-state 0 is not max freq\n"); - set_boost(policy, acpi_cpufreq_driver.boost_enabled); + if (acpi_cpufreq_driver.set_boost) + set_boost(policy, acpi_cpufreq_driver.boost_enabled); return result;