Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4478023imw; Tue, 19 Jul 2022 07:21:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sFyg4JwQGClt0bihCZB2J/Np4IGKi3MZ1VD8Msu/hJD5Pd8bKhK6WYLssiAKBV2ODzhfgD X-Received: by 2002:a05:6870:f286:b0:10b:8bcc:880a with SMTP id u6-20020a056870f28600b0010b8bcc880amr20217459oap.299.1658240489066; Tue, 19 Jul 2022 07:21:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658240489; cv=none; d=google.com; s=arc-20160816; b=yVQMaGRp5EO2jacki5m7XMftaiEWmhdIh6DarRWwzqmyOy3MRaxy+Ea9r8Nj1GV0OC VVSmcXMy/lJvElccQEHtZiNjLQIi6z6uF15GhbVl6g3jGWPPB3qiVHlLCTSB1pjhEUk9 IolcSWt7C2YkN9hMjctGQ0xsCmFwMLri5LUbQDZjaD8HSV4f5cgidnTKEJv2TlFdkRjk zcb5z0vcYkZAUnlzFFGa3JCIbzrub0G+Yw4M3lPHc544MspBt4IPxa7Ukoe7LKmT2kiM JV1K0zs5UqprZPQygx2HnX+CccMyvVM2nvQiPVKDFCmxlAEz2R41Vmmnq/9xQjiy6tD+ R/uA== 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=tPYEFrf2E8Z+cyzMhKKOGP0X3dfOZvihRM/d0A6SOQs=; b=IyRHEueDf7pfV0YvgWGBWBFg8LpJ5UNnd2d1ag59/cf+tLGnkaozM70F9/EC1vmwem eTKpnJlsKVsK06yJgMeR8//6FYTmELcLtwIPRhqNyXLySqGnpgvlIY8kOw9n9w9AVNhx UqBxtEd1oiC5bGBLCRr004r4sgY4qUeEJQKvw/bL5uZ/BmG0fd3SHMbrkLnwlPsj3btk BdB4vLrJQhlkQ8a0k+rM+XAJt8RDBuzOF1NlbphCJpy7Wg7jDwdHQZCD5kMMt5OvYxk4 XARjaVF4UySFfM4Safnx4GCyMIT2JcEm6elrzESzbGIny9zo8L2WK8e6F9MujibM89xD tnIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="RP/EUcR4"; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ch12-20020a0568081c0c00b00337bfe0ba8bsi14073764oib.273.2022.07.19.07.21.14; Tue, 19 Jul 2022 07:21:29 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b="RP/EUcR4"; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242923AbiGSNFk (ORCPT + 99 others); Tue, 19 Jul 2022 09:05:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243078AbiGSNEj (ORCPT ); Tue, 19 Jul 2022 09:04:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87BA09DEC9; Tue, 19 Jul 2022 05:26:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2F84BB81B84; Tue, 19 Jul 2022 12:26:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A969C341C6; Tue, 19 Jul 2022 12:26:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658233589; bh=D6px515p4fHfGMRWHucS0aS5PelcoJ9T+x0su67Ml0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RP/EUcR4gID/Qz1kRVArBN//fG1XHTcSMh1Tfr6duaNeP8JTvJsA9RHCKmQhXbU4k uHVoOXxa8zHyhLs3sfisONzOPjBwQc1qmUUee/rUUqGle5Y2z0FAXAMl/b0u6V1tlr UE9NCyotM798o3iM07KfLczo0fCBcYb+OCanBpzM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Pearson , Hans de Goede , Sasha Levin Subject: [PATCH 5.18 173/231] platform/x86: thinkpad_acpi: do not use PSC mode on Intel platforms Date: Tue, 19 Jul 2022 13:54:18 +0200 Message-Id: <20220719114728.711222569@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114714.247441733@linuxfoundation.org> References: <20220719114714.247441733@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Mark Pearson [ Upstream commit bce6243f767f7da88aa4674d5d678f9f156eaba9 ] PSC platform profile mode is only supported on Linux for AMD platforms. Some older Intel platforms (e.g T490) are advertising it's capability as Windows uses it - but on Linux we should only be using MMC profile for Intel systems. Add a check to prevent it being enabled incorrectly. Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20220627181449.3537-1-markpearson@lenovo.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sasha Levin --- drivers/platform/x86/thinkpad_acpi.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -10541,6 +10541,11 @@ static int tpacpi_dytc_profile_init(stru dytc_mmc_get_available = true; } } else if (dytc_capabilities & BIT(DYTC_FC_PSC)) { /* PSC MODE */ + /* Support for this only works on AMD platforms */ + if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD) { + dbg_printk(TPACPI_DBG_INIT, "PSC not support on Intel platforms\n"); + return -ENODEV; + } pr_debug("PSC is supported\n"); } else { dbg_printk(TPACPI_DBG_INIT, "No DYTC support available\n");