From patchwork Sat Dec 23 03:25:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "David E. Box" X-Patchwork-Id: 182903 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1467910dyi; Fri, 22 Dec 2023 19:27:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6A3NhJp5mFAW7TqIJhNPZADHYn+sTUEsfeSGnfQHQp5CdhcEDq7FDEqjLU1YCDGZf+fA2 X-Received: by 2002:a05:6808:1508:b0:3b8:b063:6ba7 with SMTP id u8-20020a056808150800b003b8b0636ba7mr2680570oiw.86.1703302025797; Fri, 22 Dec 2023 19:27:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703302025; cv=none; d=google.com; s=arc-20160816; b=XlnMX+r+AxlwYvjOE0W/ztv8VrPKukOQlY5E34ficGENn53dYkEQzePrFnhXPFXCJM RY4V0K7NYDTeggPKutodcgEk71zcNCVamkJXnYWWbe2LPfZqjvxpzpoE83bZ8luFUHid JeE+0wZalLnoOTI38hbccdWkicIAfvBT7feShRSt66irDCSBOPs5zAAwB1w+CvZnCGzB V50R7FcS6U/GRKxBRrjoealfKUDg1e07hEI0MTIwqfT9pKqLnfeg9BxIVR8XcLGfpZqH uCZtSGmXOFaZ5iT29gg9wiPnthCuTrsN5I40ACepJIqqe3FOcCLgNqw8mzNpBxvYclVI oSvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=86Zy5RIvFaifT3tCj7VoeCyC4im1x8sJDjHVjsMx6mM=; fh=yyAGbTikx/RHwePVMTF7XiY858Fr2O1Lml8NjpI1ECE=; b=zyBr64/hK63hzH341fHCqGzqz4A48tG+fGFu7Pt1PfFurl79jQMHru7KHingCLYRwR HxpVqJBAHCf5AeGtZXFdAu2HXfRB99PWLm1vIsFZVaXUptbyQLCGRC9BzEG0bsEnjlIs WqxnPJn/BcKXXs3DtK8INa/OdVaJVnt+7sZNNETauNNWYZM2c0YlndiWWwGQ7qORE7JN lacBAbEanjdbzKqTmERK9oJ1/vZy/mkuIW6P8syZCkdfHsJimGryYJScCNLwyH0sEv4j vt2DK3/TImv1nNehWhbyve/lI2J0IGB2DNuj0jNtOmald7uMXGNjfTtkxZ7WhP2ixxX7 h4rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GCMzG6dp; spf=pass (google.com: domain of linux-kernel+bounces-10260-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10260-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ck3-20020a056a00328300b006d28dec60cbsi214238pfb.251.2023.12.22.19.27.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 19:27:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10260-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GCMzG6dp; spf=pass (google.com: domain of linux-kernel+bounces-10260-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10260-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B68E7B237AB for ; Sat, 23 Dec 2023 03:27:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79FCECA62; Sat, 23 Dec 2023 03:25:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GCMzG6dp" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DDE0EC2; Sat, 23 Dec 2023 03:25:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703301953; x=1734837953; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=4ou10im8zAAuh8Osc8zLhJTnU2+5FYfBMeulq5VgZUo=; b=GCMzG6dpvHW426LwhY71d6mRoDR4BQA7FSL6VR5tBOHkD5TQh9r7mEOy Gf0HqZtY8QNcznMYYCccVhxigGZ1hvEoVRvVCZCdowAkXUoDfjWRNpK41 L6heJc2tU2BMxxUw0vSH7mic0Mh4Q3sGz2MNcjogRzbBilkR+lR0r8Uyd GYCGKJgEEvhenNVuO6ADvm3Xr72qZB/+gmeyOrZcRiAFEdzMV/O+CaUNj BpaKbLtcFNVDosMUFNxtZANSaNXYukW42FvHHFbWsWpYHKCOObvy0qjvD Ctab8wGHWgnMhNbq5mNqTyPydzH6ozRZhh6VIwwQ/EZPQ6pzl22f1eBcA g==; X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="462619290" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="462619290" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="811534574" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="811534574" Received: from linux.intel.com ([10.54.29.200]) by orsmga001.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:51 -0800 Received: from debox1-desk4.intel.com (unknown [10.209.86.110]) by linux.intel.com (Postfix) with ESMTP id 48125580DB9; Fri, 22 Dec 2023 19:25:51 -0800 (PST) From: "David E. Box" To: david.e.box@linux.intel.com, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, rajvi.jingar@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/8] platform/x86/intel/pmc/arl.c: Remove probe time LTR ignore Date: Fri, 22 Dec 2023 19:25:41 -0800 Message-Id: <20231223032548.1680738-2-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231223032548.1680738-1-david.e.box@linux.intel.com> References: <20231223032548.1680738-1-david.e.box@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786041625335968437 X-GMAIL-MSGID: 1786041625335968437 Remove the probe time LTR ignore for Arrow Lake. Fixes: f34dcf397286 ("platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver") Signed-off-by: David E. Box --- drivers/platform/x86/intel/pmc/arl.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/platform/x86/intel/pmc/arl.c b/drivers/platform/x86/intel/pmc/arl.c index c20506a9f4a6..31e1fa538e32 100644 --- a/drivers/platform/x86/intel/pmc/arl.c +++ b/drivers/platform/x86/intel/pmc/arl.c @@ -716,12 +716,6 @@ int arl_core_init(struct pmc_dev *pmcdev) pmc_core_get_low_power_modes(pmcdev); pmc_core_punit_pmt_init(pmcdev, ARL_PMT_DMU_GUID); - /* Due to a hardware limitation, the GBE LTR blocks PC10 - * when a cable is attached. Tell the PMC to ignore it. - */ - dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n"); - pmc_core_send_ltr_ignore(pmcdev, 3); - if (ssram_init) { ret = pmc_core_ssram_get_lpm_reqs(pmcdev); if (ret) From patchwork Sat Dec 23 03:25:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "David E. Box" X-Patchwork-Id: 182902 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1467861dyi; Fri, 22 Dec 2023 19:26:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2xyns1SMoo6UC1NJXlUFw1PNm6siAeFN52LfxhJldup/5VtBm7JFcrM5T6DIj4NzGYozJ X-Received: by 2002:ac8:7f8c:0:b0:41c:cd2a:f066 with SMTP id z12-20020ac87f8c000000b0041ccd2af066mr3466669qtj.34.1703302015105; Fri, 22 Dec 2023 19:26:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703302015; cv=none; d=google.com; s=arc-20160816; b=ylznUsxvp7v5rjhcWAtRn168JzDZGqHsdoOdQXcifcpNtGKA8lM7aTWCLsLHcxZIRS 45oYPMmvHfPEx2eBjioNbDwO6ukaWWBfBwVwFRBGRvdQP9eN36beTfLyjJXilkde6TLH 3eS8aNF/zu7vApIo0idMcZDcClsluUCUGAFMxki7SmlddB4M5xWTniWDWsS5/C6WtULF NgL7E+ExO1M45myFz+BQW+SLXjkKdQg2gnvAwLPLlhtfvUJ0vsFu7UW8UIm7OCPuZnuv xWRP0hvz0U5n7V+7UpJm9PUnR9gMJb1E1V1XDiqEWpjacb/WLviFj81eaN4LJt1yibBJ 9Ydg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=AO+uivSOMERcdMcBqG/HvHc6wxW1NyRF98P14HfLhvQ=; fh=yyAGbTikx/RHwePVMTF7XiY858Fr2O1Lml8NjpI1ECE=; b=MwL1+WBXgc1ULfl27v5fcOTHH79nPNaijbh3ne07eZSVEBi2vW2LOH5o8dsRtpUG6d XEp9TZOnFQP79/7xZKmQb5R2GYXEyno4B6chQ6QfhDwlI/WjFaFmo1UnTFMVa3ufJqmB Jh+/NP8Vx7rWmC3Q+R/u9wOWE3MFR6skR4Vv6lPbPmfrmlnyp0VaBKSC3hC81Lbc9ZY2 zN8xNJdrIV6GgahNp5tEqbMPvuGqCe+5pGpqNiowUiC0pwX+o26hNdgN304I5oPdCQEh CdGSvcz9+zjf8vzpjB5LdQ0EM9j33PL3jHd6TytTn+agSB4TUbBixtJGuNtVJgzbAiHb 42NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QkEgz0I4; spf=pass (google.com: domain of linux-kernel+bounces-10259-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10259-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 19-20020ac85753000000b0042543e14e9csi5980253qtx.773.2023.12.22.19.26.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 19:26:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10259-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QkEgz0I4; spf=pass (google.com: domain of linux-kernel+bounces-10259-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10259-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E0D921C22D1D for ; Sat, 23 Dec 2023 03:26:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C109C146; Sat, 23 Dec 2023 03:25:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QkEgz0I4" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C22A8A5D; Sat, 23 Dec 2023 03:25:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703301952; x=1734837952; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=jkEFHjFRPU7A7ZnDq0tXdEmYBD2JEFf7YtIg/EJSCYE=; b=QkEgz0I4w8g5WJ/ZySSOFMJTZwYApiamzUt1Sb0659ARCJCZniiM6J34 dhrtVSmTkEurVry1qo2XzFO12pZ5ZTpgxrIv4gLQix+L0DhPPonKCLWh4 vsxYfldO4RoRTGFUezabiIpB+GZ9PbdyMkwYLmD4xPmj4d89F/cG4D/v4 QXouEjAp0jS0abDuvMKZvzBH34qWOkg3MdYCVC3sNUr8QX3/mpWc4+thT cMrK6702ytDinjGbSx4In+tk65LXnMJV3Xfacwpn4i2E8I3KJsnFB171s LKbYB5QZwRRPGblSzQrudjXAectmPUMpxnwvU/HMjjObYd5yw/IhZD1OD A==; X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="395922869" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="395922869" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="1024436817" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="1024436817" Received: from linux.intel.com ([10.54.29.200]) by fmsmga006.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:51 -0800 Received: from debox1-desk4.intel.com (unknown [10.209.86.110]) by linux.intel.com (Postfix) with ESMTP id 81455580C4B; Fri, 22 Dec 2023 19:25:51 -0800 (PST) From: "David E. Box" To: david.e.box@linux.intel.com, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, rajvi.jingar@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/8] platform/x86/intel/pmc/lnl.c: Remove probe time LTR ignore Date: Fri, 22 Dec 2023 19:25:42 -0800 Message-Id: <20231223032548.1680738-3-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231223032548.1680738-1-david.e.box@linux.intel.com> References: <20231223032548.1680738-1-david.e.box@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786041613967345526 X-GMAIL-MSGID: 1786041613967345526 Remove the probe time LTR ignore for Lunar Lake. Fixes: 119652b855e6 ("platform/x86/intel/pmc: Add Lunar Lake M support to intel_pmc_core driver") Signed-off-by: David E. Box --- drivers/platform/x86/intel/pmc/lnl.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/platform/x86/intel/pmc/lnl.c b/drivers/platform/x86/intel/pmc/lnl.c index 88b35931f5df..fe97ad09a1a6 100644 --- a/drivers/platform/x86/intel/pmc/lnl.c +++ b/drivers/platform/x86/intel/pmc/lnl.c @@ -536,12 +536,6 @@ int lnl_core_init(struct pmc_dev *pmcdev) pmc_core_get_low_power_modes(pmcdev); - /* Due to a hardware limitation, the GBE LTR blocks PC10 - * when a cable is attached. Tell the PMC to ignore it. - */ - dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n"); - pmc_core_send_ltr_ignore(pmcdev, 3); - if (ssram_init) { ret = pmc_core_ssram_get_lpm_reqs(pmcdev); if (ret) From patchwork Sat Dec 23 03:25:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "David E. Box" X-Patchwork-Id: 182909 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1468121dyi; Fri, 22 Dec 2023 19:27:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IHjDB7MoL69QnJK4nXPXQ0OdLOubKJZ3pg6R1oRacuv2/aGfI35/ivbypYrS5y1ddP4Yz6x X-Received: by 2002:a50:d55a:0:b0:54c:5e18:50e6 with SMTP id f26-20020a50d55a000000b0054c5e1850e6mr1180272edj.42.1703302079542; Fri, 22 Dec 2023 19:27:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703302079; cv=none; d=google.com; s=arc-20160816; b=UXU/bB4jjmPvJHo0EwZmeSrsEXmx+joOI0FmCJLmEHuflab/7bBVxfNUkjrhHwFc1y zLyRnacoY5JYB8NeUjsVhFL18nLB3uEhwPGQYZp762oV/5J5y2D3XH3Z3KqgZRUD9Ta1 +p67AP0PPPiRnR9Alw1mCglIMrCBmKAUufIiwOaKrlrkMh01cszEW5g6JgRwXepnICDp 3eLAfKHjPx/q7FReQWVqbnktKzT9ryHQwgfy54iLylgoHqHXT9/s32DYkrhzC/Wl1tVU URl6V1KhdzuqIxMTD/TolvOWWw8oHae9UIElSQksJcah05u1dnifdNb2yHoaRS9nRjfT lV7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=HcCn4aeXp4wyxYi2ITZxR7YHHHDDkglEQ7SbYywoxZM=; fh=yyAGbTikx/RHwePVMTF7XiY858Fr2O1Lml8NjpI1ECE=; b=ygopNTJwCnGjOCn12Q/4+5e1ku/w6/90Za5VUEDEsxENLglNfzCrafxRXNg5FX5m4l V21QsAVMpYAkXH5ML98+ALjqN1dmoSjcqWrI0a5JFaETI07IXbyi9Wn2iOsndDKb4Hbx VIh18bvlqLh49Y1uEcCE8Hhu6kLyIkn/txqVdIqF00h9k46cadciZMnHSEYdaD2GP9zF cymrd01V5Mp5URO5532WsKTUY/KyUs1jrTzwqCO/NurL/fVbYUaK1bDyTOuxtRSVBZaO v32qwrPHRg7nL4lg2xdnuBeq8EEu4IyqcaNBAMD4lj0ETRvNJCZvz+MFCfei18k9cQWe LUig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Et1q5zCF; spf=pass (google.com: domain of linux-kernel+bounces-10266-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10266-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dc19-20020a056402311300b005547dbb74desi440835edb.226.2023.12.22.19.27.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 19:27:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10266-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Et1q5zCF; spf=pass (google.com: domain of linux-kernel+bounces-10266-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10266-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0670B1F24588 for ; Sat, 23 Dec 2023 03:27:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E616EAF6; Sat, 23 Dec 2023 03:26:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Et1q5zCF" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5461B79F2; Sat, 23 Dec 2023 03:25:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703301956; x=1734837956; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=ejKM6Nv6PFWughHe2wl2ebjlYx53nsbMF+dHQa95DuA=; b=Et1q5zCFBn422eTLZeiIeSFsavJl0RRJlwRJiniYisjn9xdeYSQB48xu hnqKTH6EYFG4s5p688p/gVxDmhyoMzzTjq9R2qPcJLXOa3fRugQXevnKJ y97I4/E1/gc1P4daZpT3RfAhEvX7tuxvzcVlI3BIT2wK37nEpgI6toUXK 0canW1Cnbm81de6a0Q97UH+TSIUgWj4Yx4oA7HUtb7QYt4s9JphQhD/Q1 FKieVxNnOjjw/S4PmY7a9qP9wrnYyEsz7jSr2mm775hTmGOu6dat1pA6w EJiYUfXHIY2zBB03dE7muW6V7iCAIlIRc+vNAP8DvxRgQLO3u/EWDjV+8 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="395922871" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="395922871" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="1024436818" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="1024436818" Received: from linux.intel.com ([10.54.29.200]) by fmsmga006.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:52 -0800 Received: from debox1-desk4.intel.com (unknown [10.209.86.110]) by linux.intel.com (Postfix) with ESMTP id B6F88580DB9; Fri, 22 Dec 2023 19:25:51 -0800 (PST) From: "David E. Box" To: david.e.box@linux.intel.com, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, rajvi.jingar@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/8] platform/x86/intel/pmc: Add suspend callback Date: Fri, 22 Dec 2023 19:25:43 -0800 Message-Id: <20231223032548.1680738-4-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231223032548.1680738-1-david.e.box@linux.intel.com> References: <20231223032548.1680738-1-david.e.box@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786041681825745470 X-GMAIL-MSGID: 1786041681825745470 Add a suspend callback to struct pmc for performing platform specific tasks before device suspend. This is needed in order to perform GBE LTR ignore on certain platforms at suspend-time instead of at probe-time and replace the GBE LTR ignore removal that was done in order to fix a bug introduced by commit 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()"). Fixes: 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()") Signed-off-by: David E. Box --- drivers/platform/x86/intel/pmc/core.c | 3 +++ drivers/platform/x86/intel/pmc/core.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c index cdaab728e942..31905003bb05 100644 --- a/drivers/platform/x86/intel/pmc/core.c +++ b/drivers/platform/x86/intel/pmc/core.c @@ -1430,6 +1430,9 @@ static __maybe_unused int pmc_core_suspend(struct device *dev) struct pmc_dev *pmcdev = dev_get_drvdata(dev); struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN]; + if (pmcdev->suspend) + pmcdev->suspend(pmcdev); + /* Check if the syspend will actually use S0ix */ if (pm_suspend_via_firmware()) return 0; diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h index 2891d8d04fad..ce9b9efc9790 100644 --- a/drivers/platform/x86/intel/pmc/core.h +++ b/drivers/platform/x86/intel/pmc/core.h @@ -389,6 +389,7 @@ struct pmc { * @s0ix_counter: S0ix residency (step adjusted) * @num_lpm_modes: Count of enabled modes * @lpm_en_modes: Array of enabled modes from lowest to highest priority + * @suspend: Function to perform platform specific suspend * @resume: Function to perform platform specific resume * * pmc_dev contains info about power management controller device. @@ -406,6 +407,7 @@ struct pmc_dev { u64 s0ix_counter; int num_lpm_modes; int lpm_en_modes[LPM_MAX_NUM_MODES]; + void (*suspend)(struct pmc_dev *pmcdev); int (*resume)(struct pmc_dev *pmcdev); bool has_die_c6; From patchwork Sat Dec 23 03:25:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "David E. Box" X-Patchwork-Id: 182908 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1468092dyi; Fri, 22 Dec 2023 19:27:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGEAeQHc/fuICrhe7QbytL9XjqG1O3DnhqjNyBjU9ShIYPM+C3Qbk3houwwkRLyajZvAPAt X-Received: by 2002:a17:907:7649:b0:a23:4abd:95ee with SMTP id kj9-20020a170907764900b00a234abd95eemr702859ejc.105.1703302071272; Fri, 22 Dec 2023 19:27:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703302071; cv=none; d=google.com; s=arc-20160816; b=VKueNPM8VSSRFa/wA2ogilimX6POquNn4yfUVC1RCMx10jaDrda2wqIuL0GK3G/btd 82FcTRQgfaDuUbde+Ztcinvg2UJLhRg0UG12ysd/EWFk5pX5NGLflrCKoBE/RwBdWfzE 7bXQbPv1v8nOpFaKJUxdBCMjdKjpNDHe6KDJo+wdyNzTyu/5BrtPhibE6wJ60b4RhOGL bl8T8JXfxIm+GJzbsrXGbouv0k1j+NiZwpXvE/mHr961S/GEjg/5lKSPclT1buxhtd/q Fl3SmrGqXOisflg4noFgdL2HOgQvO3py4eZerQNJeaHfFBBa0G11XRue//W/Ilgl/9mn RWjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=5sL26La99o6Kp1r7Kv3A5v9BmJ8xMgwC0TmMR3kJevM=; fh=yyAGbTikx/RHwePVMTF7XiY858Fr2O1Lml8NjpI1ECE=; b=k+FnrH37NvIJokMg2F54H+798i3Inn9b73eC8zL6Vf/YNp+OOqhduYZYvcqkuAaw5q ydQU5bSTaCUzQOggetZD+m7hpBhzmNjbsbnttfOLChsCXmYZN/wyBIB0BD63dvQkuibQ PPzdTn4ciTEnT4MWm8p3jN3/a3CXzX7GhEJTcFP7WvpexyZJBWPOwQHvUEOkVvpkGNg7 jmX2wy2hT2mXUKmrbdBK5KlP32PDF3KEWFJRrcEh7dpTCNDmx+dTV6JgoRu4W3y92cW2 HkYK1mmECh+UNrF0o/9Scs3iv8/XLq+ncHL9T1MVVGizPHoDVdsDHY6943244Jbiooco Q7pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gKpdjXBB; spf=pass (google.com: domain of linux-kernel+bounces-10265-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10265-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id i26-20020a1709061cda00b00a234963fc8csi2451809ejh.691.2023.12.22.19.27.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 19:27:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10265-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gKpdjXBB; spf=pass (google.com: domain of linux-kernel+bounces-10265-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10265-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B671A1F243B9 for ; Sat, 23 Dec 2023 03:27:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56D60DF6B; Sat, 23 Dec 2023 03:25:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gKpdjXBB" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28EA24433; Sat, 23 Dec 2023 03:25:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703301955; x=1734837955; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=Y+fquDIVwAXRVSyA/bkxUrrh3S3GNQuoNqunFaD+RiA=; b=gKpdjXBBonHZNDxEzaPSwMB3zLZ4+4tmUKZ7Y+PJiFpGCJAyVE0J1AJ4 B4eDA3LRAurYI4SRzxheUYrdu48QQlzxutFBhtb4cOWsmp8+GsGsxjT8C +lKm/N7VA3HEUxou2UTWv7+4z5M10hCVv9IDoeZpfloQiptp73RQQcS5J HcbzRI+oFh/kf6KckBO2p/AC19X20UyBWq2kwtoXjmEHLIkYSoEXsjA0n Jw1RWkz37qF9WBFnitTyNHsWC4DpH7ruafc6xSKRBdPOhWSZRQoIgilRV XyVmRYGNpl76vm8ra83XzwYcK5dzLhYGF3Gqxoq11g4T9MU9tcHly/g7q w==; X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="395922875" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="395922875" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="1024436819" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="1024436819" Received: from linux.intel.com ([10.54.29.200]) by fmsmga006.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:52 -0800 Received: from debox1-desk4.intel.com (unknown [10.209.86.110]) by linux.intel.com (Postfix) with ESMTP id E98CD580CC6; Fri, 22 Dec 2023 19:25:51 -0800 (PST) From: "David E. Box" To: david.e.box@linux.intel.com, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, rajvi.jingar@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/8] platform/x86/intel/pmc: Allow reenabling LTRs Date: Fri, 22 Dec 2023 19:25:44 -0800 Message-Id: <20231223032548.1680738-5-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231223032548.1680738-1-david.e.box@linux.intel.com> References: <20231223032548.1680738-1-david.e.box@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786041672576065394 X-GMAIL-MSGID: 1786041672576065394 Commit 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()") caused a network performance regression due to the GBE LTR ignore that it added during probe. The fix will move the ignore to occur at suspend-time (so as to not affect suspend power). This will require the ability to enable the LTR again on resume. Modify pmc_core_send_ltr_ignore() to allow enabling an LTR. Fixes: 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()") Signed-off-by: David E. Box --- drivers/platform/x86/intel/pmc/adl.c | 2 +- drivers/platform/x86/intel/pmc/cnp.c | 2 +- drivers/platform/x86/intel/pmc/core.c | 9 ++++++--- drivers/platform/x86/intel/pmc/core.h | 3 ++- drivers/platform/x86/intel/pmc/mtl.c | 2 +- drivers/platform/x86/intel/pmc/tgl.c | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/platform/x86/intel/pmc/adl.c b/drivers/platform/x86/intel/pmc/adl.c index 882f2d5d8937..fbe0678f766c 100644 --- a/drivers/platform/x86/intel/pmc/adl.c +++ b/drivers/platform/x86/intel/pmc/adl.c @@ -327,7 +327,7 @@ int adl_core_init(struct pmc_dev *pmcdev) * when a cable is attached. Tell the PMC to ignore it. */ dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n"); - pmc_core_send_ltr_ignore(pmcdev, 3); + pmc_core_send_ltr_ignore(pmcdev, 3, 1); return 0; } diff --git a/drivers/platform/x86/intel/pmc/cnp.c b/drivers/platform/x86/intel/pmc/cnp.c index 59298f184d0e..80f73242f9dd 100644 --- a/drivers/platform/x86/intel/pmc/cnp.c +++ b/drivers/platform/x86/intel/pmc/cnp.c @@ -220,7 +220,7 @@ int cnp_core_init(struct pmc_dev *pmcdev) * when a cable is attached. Tell the PMC to ignore it. */ dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n"); - pmc_core_send_ltr_ignore(pmcdev, 3); + pmc_core_send_ltr_ignore(pmcdev, 3, 1); return 0; } diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c index 31905003bb05..aa44c6612af9 100644 --- a/drivers/platform/x86/intel/pmc/core.c +++ b/drivers/platform/x86/intel/pmc/core.c @@ -476,7 +476,7 @@ static int pmc_core_pll_show(struct seq_file *s, void *unused) } DEFINE_SHOW_ATTRIBUTE(pmc_core_pll); -int pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value) +int pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value, int ignore) { struct pmc *pmc; const struct pmc_reg_map *map; @@ -514,7 +514,10 @@ int pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value) mutex_lock(&pmcdev->lock); reg = pmc_core_reg_read(pmc, map->ltr_ignore_offset); - reg |= BIT(ltr_index); + if (ignore) + reg |= BIT(ltr_index); + else + reg &= ~BIT(ltr_index); pmc_core_reg_write(pmc, map->ltr_ignore_offset, reg); mutex_unlock(&pmcdev->lock); @@ -537,7 +540,7 @@ static ssize_t pmc_core_ltr_ignore_write(struct file *file, if (err) return err; - err = pmc_core_send_ltr_ignore(pmcdev, value); + err = pmc_core_send_ltr_ignore(pmcdev, value, 1); return err == 0 ? count : err; } diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h index ce9b9efc9790..90f2dbc4df72 100644 --- a/drivers/platform/x86/intel/pmc/core.h +++ b/drivers/platform/x86/intel/pmc/core.h @@ -567,7 +567,8 @@ extern const struct pmc_reg_map arl_pchs_reg_map; extern void pmc_core_get_tgl_lpm_reqs(struct platform_device *pdev); extern int pmc_core_ssram_get_lpm_reqs(struct pmc_dev *pmcdev); -extern int pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value); +extern int +pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value, int ignore); int pmc_core_resume_common(struct pmc_dev *pmcdev); int get_primary_reg_base(struct pmc *pmc); diff --git a/drivers/platform/x86/intel/pmc/mtl.c b/drivers/platform/x86/intel/pmc/mtl.c index e75431325dda..ef78d14fc27f 100644 --- a/drivers/platform/x86/intel/pmc/mtl.c +++ b/drivers/platform/x86/intel/pmc/mtl.c @@ -1023,7 +1023,7 @@ int mtl_core_init(struct pmc_dev *pmcdev) * when a cable is attached. Tell the PMC to ignore it. */ dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n"); - pmc_core_send_ltr_ignore(pmcdev, 3); + pmc_core_send_ltr_ignore(pmcdev, 3, 1); if (ssram_init) return pmc_core_ssram_get_lpm_reqs(pmcdev); diff --git a/drivers/platform/x86/intel/pmc/tgl.c b/drivers/platform/x86/intel/pmc/tgl.c index 91fd725951e5..8213961975fc 100644 --- a/drivers/platform/x86/intel/pmc/tgl.c +++ b/drivers/platform/x86/intel/pmc/tgl.c @@ -315,7 +315,7 @@ int tgl_core_generic_init(struct pmc_dev *pmcdev, int pch_tp) * when a cable is attached. Tell the PMC to ignore it. */ dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n"); - pmc_core_send_ltr_ignore(pmcdev, 3); + pmc_core_send_ltr_ignore(pmcdev, 3, 1); return 0; } From patchwork Sat Dec 23 03:25:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "David E. Box" X-Patchwork-Id: 182906 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1468047dyi; Fri, 22 Dec 2023 19:27:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRG5OEzreIOxncNI3iBsCI+wg4gjNdbE8taglYt96HZ58W19mY9z9adMc0TwKb5TCh83U/ X-Received: by 2002:a05:6e02:330a:b0:35f:b0dc:ea33 with SMTP id bm10-20020a056e02330a00b0035fb0dcea33mr3266128ilb.16.1703302058832; Fri, 22 Dec 2023 19:27:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703302058; cv=none; d=google.com; s=arc-20160816; b=KeYjvVjg5B7PcplQMUn5BcBqu820E6hHCvhgFgf0KfpmZGD+P3BZp+hEwI5E6mjiUq 1hpJyxM3bGlFzH+ytYwDkCLG1KoePfkSs46ec9GLLoCV86tT/JgSNUFXA88Wvv5+uC4l 3CQUHoRbT2aSmBvgQuZIlb1ldOJUx1Ou4rVYSOJavCnomEQKk+x3MVcK3i6VmmNqy3T7 1UaItcvmfPxrvYEqBUzN/qr0O7tjcTVDnVV/ZawmmWY/HPxGdXSwoTCbOjUqOJEPQZHt ph9Z+3D4gnAL7jmUSxulbdw5pRyNBLu3PnzVZlV5Rw8bm98mvKN4G3weMthHnCAMU7cd TUaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=sxr4Q37h0vsQA0o9Bm2gdDGCG+1xcKaih3EH8x1GCX0=; fh=yyAGbTikx/RHwePVMTF7XiY858Fr2O1Lml8NjpI1ECE=; b=bzGU43biNXj9OOw8cw/wEKBrSO6IEhrLerB42HEAtF5uyT1DPhz4gGC6n27dkbQKBh fNtOoxIi43L6luwWhV7C+lDOHzFW96V18AT5G/v4hlM0VZqoWP1qhaxms/tSn5Xy6awG LiywSx4CYQF0NI6ZwSfT1wRN/WVYbDsZj9IeWzxI2r3EAr4s+AQzmJtKlLUXOtuGAvm5 nVyiyh5cp/e5pir4ua7JjwiNsLLMS53d30q+s03P8FtUEfHfMmZLwAiuWdXgccinNnG1 G3XzMoaEYOVINlMd3eNwJ7px7/gdrwHD9j2y8S9mJjD2B2lOhhF3L+FYZQV8fPmzkbXY 4lTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jblK7pU5; spf=pass (google.com: domain of linux-kernel+bounces-10263-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10263-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e15-20020a170902ed8f00b001cc692bf120si4057912plj.61.2023.12.22.19.27.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 19:27:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10263-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jblK7pU5; spf=pass (google.com: domain of linux-kernel+bounces-10263-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10263-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 92A1E286546 for ; Sat, 23 Dec 2023 03:27:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3BA1DDC2; Sat, 23 Dec 2023 03:25:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jblK7pU5" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A540F15D1; Sat, 23 Dec 2023 03:25:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703301954; x=1734837954; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=KTLQW3bIzICXGmk2rNHHL9SlhBkrC3fIYxcE4SasHFg=; b=jblK7pU5kfRqYnHGKajog4QddWWAEtpPZStmfbN6OWoPBCTdlHyqnoE1 Ilf9PYQv/4y6Ja1qukaB/0ed7d0pwbV6b++XKM4y2p2ZQUCpwZA1urhz7 XifO0qZEdKdVtV9XBcxx06gFzWkdtu5lc9H61DHU+HZTKbZIPf079ISSv 6sy+0RLtB0l4m9NrodBBvDdhZunIPNn/YApTP+2mzBC3AggVXo6XuIbXJ I8H4/VxcTFcqLXc/MHfZ2jNvK+r4PhqdI4Sod1ryjcVblvvNTzsuG4n0Z CGmJdDS/z97hyCywhHbBBN37UWRQQCrANHfMhPfHQ00e3Abyryafvn3Jn w==; X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="395922873" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="395922873" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="1024436820" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="1024436820" Received: from linux.intel.com ([10.54.29.200]) by fmsmga006.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:52 -0800 Received: from debox1-desk4.intel.com (unknown [10.209.86.110]) by linux.intel.com (Postfix) with ESMTP id 2470E580C4B; Fri, 22 Dec 2023 19:25:52 -0800 (PST) From: "David E. Box" To: david.e.box@linux.intel.com, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, rajvi.jingar@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/8] platform/x86/intel/pmc: Move GBE LTR ignore to suspend callback Date: Fri, 22 Dec 2023 19:25:45 -0800 Message-Id: <20231223032548.1680738-6-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231223032548.1680738-1-david.e.box@linux.intel.com> References: <20231223032548.1680738-1-david.e.box@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786041659708646162 X-GMAIL-MSGID: 1786041659708646162 Commit 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()") caused a network performance regression due to the GBE LTR ignore that it added at probe. This was needed in order to allow the SoC to enter the deepest Package C state. To fix the regression and at least support PC10 during suspend, move the LTR ignore from probe to the suspend callback, and enable it again on resume. This solution will allow PC10 during suspend but restrict Package C entry at runtime to no deeper than PC8/9 while a network cable it attach to the PCH LAN. Fixes: 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()") Signed-off-by: David E. Box --- drivers/platform/x86/intel/pmc/adl.c | 9 +++------ drivers/platform/x86/intel/pmc/cnp.c | 26 ++++++++++++++++++++------ drivers/platform/x86/intel/pmc/core.h | 3 +++ drivers/platform/x86/intel/pmc/mtl.c | 9 +++------ drivers/platform/x86/intel/pmc/tgl.c | 8 +++----- 5 files changed, 32 insertions(+), 23 deletions(-) diff --git a/drivers/platform/x86/intel/pmc/adl.c b/drivers/platform/x86/intel/pmc/adl.c index fbe0678f766c..e7878558fd90 100644 --- a/drivers/platform/x86/intel/pmc/adl.c +++ b/drivers/platform/x86/intel/pmc/adl.c @@ -316,6 +316,9 @@ int adl_core_init(struct pmc_dev *pmcdev) struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN]; int ret; + pmcdev->suspend = cnl_suspend; + pmcdev->resume = cnl_resume; + pmc->map = &adl_reg_map; ret = get_primary_reg_base(pmc); if (ret) @@ -323,11 +326,5 @@ int adl_core_init(struct pmc_dev *pmcdev) pmc_core_get_low_power_modes(pmcdev); - /* Due to a hardware limitation, the GBE LTR blocks PC10 - * when a cable is attached. Tell the PMC to ignore it. - */ - dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n"); - pmc_core_send_ltr_ignore(pmcdev, 3, 1); - return 0; } diff --git a/drivers/platform/x86/intel/pmc/cnp.c b/drivers/platform/x86/intel/pmc/cnp.c index 80f73242f9dd..dd72974bf71e 100644 --- a/drivers/platform/x86/intel/pmc/cnp.c +++ b/drivers/platform/x86/intel/pmc/cnp.c @@ -204,11 +204,31 @@ const struct pmc_reg_map cnp_reg_map = { .etr3_offset = ETR3_OFFSET, }; +void cnl_suspend(struct pmc_dev *pmcdev) +{ + /* + * Due to a hardware limitation, the GBE LTR blocks PC10 + * when a cable is attached. To unblock PC10 during suspend, + * tell the PMC to ignore it. + */ + pmc_core_send_ltr_ignore(pmcdev, 3, 1); +} + +int cnl_resume(struct pmc_dev *pmcdev) +{ + pmc_core_send_ltr_ignore(pmcdev, 3, 0); + + return pmc_core_resume_common(pmcdev); +} + int cnp_core_init(struct pmc_dev *pmcdev) { struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN]; int ret; + pmcdev->suspend = cnl_suspend; + pmcdev->resume = cnl_resume; + pmc->map = &cnp_reg_map; ret = get_primary_reg_base(pmc); if (ret) @@ -216,11 +236,5 @@ int cnp_core_init(struct pmc_dev *pmcdev) pmc_core_get_low_power_modes(pmcdev); - /* Due to a hardware limitation, the GBE LTR blocks PC10 - * when a cable is attached. Tell the PMC to ignore it. - */ - dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n"); - pmc_core_send_ltr_ignore(pmcdev, 3, 1); - return 0; } diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h index 90f2dbc4df72..ce7b1cd2b194 100644 --- a/drivers/platform/x86/intel/pmc/core.h +++ b/drivers/platform/x86/intel/pmc/core.h @@ -589,6 +589,9 @@ int mtl_core_init(struct pmc_dev *pmcdev); int arl_core_init(struct pmc_dev *pmcdev); int lnl_core_init(struct pmc_dev *pmcdev); +void cnl_suspend(struct pmc_dev *pmcdev); +int cnl_resume(struct pmc_dev *pmcdev); + #define pmc_for_each_mode(i, mode, pmcdev) \ for (i = 0, mode = pmcdev->lpm_en_modes[i]; \ i < pmcdev->num_lpm_modes; \ diff --git a/drivers/platform/x86/intel/pmc/mtl.c b/drivers/platform/x86/intel/pmc/mtl.c index ef78d14fc27f..c7d15d864039 100644 --- a/drivers/platform/x86/intel/pmc/mtl.c +++ b/drivers/platform/x86/intel/pmc/mtl.c @@ -986,6 +986,8 @@ static void mtl_d3_fixup(void) static int mtl_resume(struct pmc_dev *pmcdev) { mtl_d3_fixup(); + pmc_core_send_ltr_ignore(pmcdev, 3, 0); + return pmc_core_resume_common(pmcdev); } @@ -998,6 +1000,7 @@ int mtl_core_init(struct pmc_dev *pmcdev) mtl_d3_fixup(); + pmcdev->suspend = cnl_suspend; pmcdev->resume = mtl_resume; pmcdev->regmap_list = mtl_pmc_info_list; @@ -1019,12 +1022,6 @@ int mtl_core_init(struct pmc_dev *pmcdev) pmc_core_get_low_power_modes(pmcdev); pmc_core_punit_pmt_init(pmcdev, MTL_PMT_DMU_GUID); - /* Due to a hardware limitation, the GBE LTR blocks PC10 - * when a cable is attached. Tell the PMC to ignore it. - */ - dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n"); - pmc_core_send_ltr_ignore(pmcdev, 3, 1); - if (ssram_init) return pmc_core_ssram_get_lpm_reqs(pmcdev); diff --git a/drivers/platform/x86/intel/pmc/tgl.c b/drivers/platform/x86/intel/pmc/tgl.c index 8213961975fc..e0580de18077 100644 --- a/drivers/platform/x86/intel/pmc/tgl.c +++ b/drivers/platform/x86/intel/pmc/tgl.c @@ -305,17 +305,15 @@ int tgl_core_generic_init(struct pmc_dev *pmcdev, int pch_tp) else pmc->map = &tgl_reg_map; + pmcdev->suspend = cnl_suspend; + pmcdev->resume = cnl_resume; + ret = get_primary_reg_base(pmc); if (ret) return ret; pmc_core_get_low_power_modes(pmcdev); pmc_core_get_tgl_lpm_reqs(pmcdev->pdev); - /* Due to a hardware limitation, the GBE LTR blocks PC10 - * when a cable is attached. Tell the PMC to ignore it. - */ - dev_dbg(&pmcdev->pdev->dev, "ignoring GBE LTR\n"); - pmc_core_send_ltr_ignore(pmcdev, 3, 1); return 0; } From patchwork Sat Dec 23 03:25:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "David E. Box" X-Patchwork-Id: 182904 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1467928dyi; Fri, 22 Dec 2023 19:27:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IFdwKe2LECtnU1LEnAlBjncJypm6WCXO93jbbovsz8WCbOgYnHqTLngPK55M/HU2xQNRFuO X-Received: by 2002:a05:622a:114:b0:425:8c93:9997 with SMTP id u20-20020a05622a011400b004258c939997mr2917526qtw.25.1703302030780; Fri, 22 Dec 2023 19:27:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703302030; cv=none; d=google.com; s=arc-20160816; b=tr5IjDCpECGbVdHt2DixqOFzytdgWcYxpB4dyNdgSrsTsY2yYEA4bI0Al/GhZEKNW6 Rw0awNgdxroju9nl28xvqeCK+MNCY99ADrbl8CbKs7LMg3EIxtpm8C/ao1NvJbP/DL5P VqSLfJirHZPhHoTeLduHmP7KGZvztVBZy2UbbPe+iBwUd5kagZax3jnlXzcETvgf8Dod i5SI9XJ/ex+pSr4M5GPo6v7C6QlLQE8qGpLHg4RBSJdZcNb21Mq1+0Yg7QyWFzR09Fqx 0yTmJN/EHLRvwSoSeFf/W0fcTJ8JEobCGOCSFa+d/FkCafkityPFvH7QGMM2byWYOkCO EJWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=XN7tuZgxLPRKrQJZ7MfCCDzQkkaMfn2v8u4ZqztSHb4=; fh=yyAGbTikx/RHwePVMTF7XiY858Fr2O1Lml8NjpI1ECE=; b=CA2FZPbQtcePgS3yqg3Eyw9qMWuhkqsLulcpsnwbSKFoEB3HQqu9pfIga8q5yGWa43 dfWlPoevsFbvlXnreG+f3Jn0b+3j1ZL+I77B0ckfFAlmCfW8gyIwh1AP9oTPzxkJs6X2 49f+ugpdjmcCEqzhXJwkKJ/fVWz1U1R8RGF/8ovUzkn28043xN3J5LvOt99HgoXckhTz 7/U3Y5NnbcVS8KYH2di7pw0sUKaRNFAQ3Y2cShsuV49IETkuG6yiI4/Dj6YKgCQ+YvN1 5vGl+qQu83hrg+A+5NVD+cyOvS5j8EojFzzhMzHPSI3qFhBK3i+YLI2War/ehpYn/w92 T8Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nBb3nfU4; spf=pass (google.com: domain of linux-kernel+bounces-10261-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10261-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a9-20020ac85b89000000b004237f54a7f2si6012393qta.191.2023.12.22.19.27.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 19:27:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10261-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nBb3nfU4; spf=pass (google.com: domain of linux-kernel+bounces-10261-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10261-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 905FF1C22D31 for ; Sat, 23 Dec 2023 03:27:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B27EED26C; Sat, 23 Dec 2023 03:25:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nBb3nfU4" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC7DA1110; Sat, 23 Dec 2023 03:25:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703301953; x=1734837953; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=ncqZrSwEdBCXtxvWbb1V+l2i5EjB3nBI2XKvixmXGNI=; b=nBb3nfU4uNCELjgufIi6VlJokgtguxc46sJskJty0mwJS3e4r4J17emJ 1bYXY94XeNg74NO9+WAxEpIHDJN4sZ2ui92Ms3slU+PBjvot8PjMq/yv7 S4GlZH/LL1uANKgzarxsEw1iVb0kRMgtYXLXnhPt1268XiaoV917vwWlL S/VYBXE4Yx1SdbyxkOMLMO5lbB0A8SK7GgJL/eAKfP1BnYtWmeVL75vct 3KZ3/+VAV32aas07B2jj4OPQEcAdlkgB/PYfgsEHTZfptGAd2mWdrjS5x neTp8BqmZsYxNwSnc2kDHb8OQlmWZCZ6vzdmxHliINhdqiSWExpY71TOI g==; X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="462619292" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="462619292" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="811534582" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="811534582" Received: from linux.intel.com ([10.54.29.200]) by orsmga001.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:52 -0800 Received: from debox1-desk4.intel.com (unknown [10.209.86.110]) by linux.intel.com (Postfix) with ESMTP id 5726F580DDD; Fri, 22 Dec 2023 19:25:52 -0800 (PST) From: "David E. Box" To: david.e.box@linux.intel.com, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, rajvi.jingar@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/8] platform/x86/intel/pmc/arl: Add GBE LTR ignore during suspend Date: Fri, 22 Dec 2023 19:25:46 -0800 Message-Id: <20231223032548.1680738-7-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231223032548.1680738-1-david.e.box@linux.intel.com> References: <20231223032548.1680738-1-david.e.box@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786041630113962111 X-GMAIL-MSGID: 1786041630113962111 Add the GBE LTR ignore suspend time fix for Arrow Lake. Fixes: f34dcf397286 ("platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver") Signed-off-by: David E. Box --- drivers/platform/x86/intel/pmc/arl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/intel/pmc/arl.c b/drivers/platform/x86/intel/pmc/arl.c index 31e1fa538e32..ae3a9a96f845 100644 --- a/drivers/platform/x86/intel/pmc/arl.c +++ b/drivers/platform/x86/intel/pmc/arl.c @@ -685,6 +685,8 @@ void arl_d3_fixup(void) int arl_resume(struct pmc_dev *pmcdev) { arl_d3_fixup(); + pmc_core_send_ltr_ignore(pmcdev, 3, 0); + return pmc_core_resume_common(pmcdev); } @@ -696,6 +698,7 @@ int arl_core_init(struct pmc_dev *pmcdev) bool ssram_init = true; arl_d3_fixup(); + pmcdev->suspend = cnl_suspend; pmcdev->resume = arl_resume; pmcdev->regmap_list = arl_pmc_info_list; From patchwork Sat Dec 23 03:25:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "David E. Box" X-Patchwork-Id: 182905 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1468042dyi; Fri, 22 Dec 2023 19:27:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+kVeDazavSS3bJh1uCTzl4HMGUDZY+YY6j8Njr+d8F5btnnvKvMF2iiT5Xs4gGVZxjR8x X-Received: by 2002:a17:90a:784a:b0:28c:2a3:1f08 with SMTP id y10-20020a17090a784a00b0028c02a31f08mr1566855pjl.56.1703302057331; Fri, 22 Dec 2023 19:27:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703302057; cv=none; d=google.com; s=arc-20160816; b=QMqpGgw0c5QKahIONTtjgykR0n4uy43+wHDtrPnjciqoaVRcTpQ5WH481ad9zqGwqt P3CANjGb+O77kHS/x2xTxA2LP6Wf7v81Zb68pSRarfgkFjpulbHxQeTkwOzwnOd/waUO s7f1EgLJgMYtcjXDQO4frhIU5G6JOp/3nisCl1NPWjLM9awVxfw/jrNC3PqqK7ZVPJxQ dQfPuhFSJxbLNtOctwWcQp0kxNxq6bn8oHuCGckWdkZzcHQRCIbPpkAEdqqQl1jgu2lc TxY1NB1DG1JWHjPx+MMc/G6LgRoJdGQuEqLWguOpGvN/a7jkmq7n/aS7txnaWFhtdPSa UWCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=wATVTQT+DuMaUbx9mU+T7jyw3nCE9Ud9p8ms8JDyEJ4=; fh=yyAGbTikx/RHwePVMTF7XiY858Fr2O1Lml8NjpI1ECE=; b=DsIQyEyWCuEeFqNyfZ2j0lBw1cevKjhUb0Eghp2kQz9BsT1cguKwoHpR4SMhUs9YN9 JmICCL71y6mREMmxvwlNKdx5sGSyV1bAc2dz/dKBoXZkyV1UPkymY4DjPzrZ4UzVJjTU WiI8CFegXupQkfcERJ6ryPx6p5L07NdimOlKnfY3ssfmZl3s57nMmdUEjnumGUzcosat s3yEnLH+I9R64ADhxXp+gq3P81fxAMTACz2mvil/2SkW3V1rYU/j96HAIDgDmbs+Czkz ypL+hbkmMYu8ylJKR91iM5skY8Pju7yrqxyqpn5cUcZgdk5E3dqq+TiA0YnZpo8kvPq7 35Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lxCyXO03; spf=pass (google.com: domain of linux-kernel+bounces-10262-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10262-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o10-20020a17090ac70a00b0028bd815859dsi5593608pjt.136.2023.12.22.19.27.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 19:27:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10262-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lxCyXO03; spf=pass (google.com: domain of linux-kernel+bounces-10262-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10262-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1DEAB286513 for ; Sat, 23 Dec 2023 03:27:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB441DDB6; Sat, 23 Dec 2023 03:25:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lxCyXO03" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1DC81866; Sat, 23 Dec 2023 03:25:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703301954; x=1734837954; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=alzPQBYryrPFIZRzgl+PRORM4Cg1XASznG83KJNWqwg=; b=lxCyXO0355d6cuBDNBjg0W1gXlJQtPk6xvYuKayMTKH3jggiGEK4CgN5 XdfjSLKLq8Na1OlHU3e6ckZTtsWObqUwYGif28UdOUb0DudJkmET36ghk 5QBn8z7VqrWgJiQeA84nuNQYJWp75tcB9aOW+L8MDvWAbOhPEYwGvrgYF YKwTT1Q6at9r9/rT6a9R7IXoVxEv2qDXK30RfNrKP82/glIqJJJbsuTyA CQZZYW701kz6Ix2jm2qdUzLpHVkTgIA1W2ZsJgIWiI9OoXHA+pX/kj8bq QK25di0MUa6vczvvbd41gTf8GUBFFMHpvVBSmJ+OXxcdRYATXjvpbhOd+ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="462619294" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="462619294" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="811534585" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="811534585" Received: from linux.intel.com ([10.54.29.200]) by orsmga001.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:52 -0800 Received: from debox1-desk4.intel.com (unknown [10.209.86.110]) by linux.intel.com (Postfix) with ESMTP id 8FFAF580DCE; Fri, 22 Dec 2023 19:25:52 -0800 (PST) From: "David E. Box" To: david.e.box@linux.intel.com, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, rajvi.jingar@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/8] platform/x86/intel/pmc/lnl: Add GBE LTR ignore during suspend Date: Fri, 22 Dec 2023 19:25:47 -0800 Message-Id: <20231223032548.1680738-8-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231223032548.1680738-1-david.e.box@linux.intel.com> References: <20231223032548.1680738-1-david.e.box@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786041657776170978 X-GMAIL-MSGID: 1786041657776170978 Add the GBE LTR ignore suspend time fix for Lunar Lake. Fixes: 119652b855e6 ("platform/x86/intel/pmc: Add Lunar Lake M support to intel_pmc_core driver") Signed-off-by: David E. Box --- drivers/platform/x86/intel/pmc/lnl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/intel/pmc/lnl.c b/drivers/platform/x86/intel/pmc/lnl.c index fe97ad09a1a6..eb350d64efdf 100644 --- a/drivers/platform/x86/intel/pmc/lnl.c +++ b/drivers/platform/x86/intel/pmc/lnl.c @@ -509,6 +509,8 @@ void lnl_d3_fixup(void) int lnl_resume(struct pmc_dev *pmcdev) { lnl_d3_fixup(); + pmc_core_send_ltr_ignore(pmcdev, 3, 0); + return pmc_core_resume_common(pmcdev); } @@ -521,6 +523,7 @@ int lnl_core_init(struct pmc_dev *pmcdev) lnl_d3_fixup(); + pmcdev->suspend = cnl_suspend; pmcdev->resume = lnl_resume; pmcdev->regmap_list = lnl_pmc_info_list; ret = pmc_core_ssram_init(pmcdev, func); From patchwork Sat Dec 23 03:25:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "David E. Box" X-Patchwork-Id: 182907 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1468076dyi; Fri, 22 Dec 2023 19:27:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHLwNSxRifUJ2EepFqaO46O5Bv/AUc2dWl2Dw0ofkv8KL+870IpaN1QZvSojBH5DviiI0Uh X-Received: by 2002:a17:906:d18f:b0:a23:2a67:bf73 with SMTP id c15-20020a170906d18f00b00a232a67bf73mr1221546ejz.87.1703302067054; Fri, 22 Dec 2023 19:27:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703302067; cv=none; d=google.com; s=arc-20160816; b=KjG7UX/JhrBFw/Pt6JSmxGb2kvEBaGtw9IbfiTTQX7/9b05UBGaAAg9D20Gqp7/lzq 1knnzwCThFiIpkeE81Y+W/Ic4uiaXTCnQuPhhQHWnGyOipuHqmG3t90KQi3QD4Vj+gbT EQ+w7NZ43136xbmXcLNDjySXNyqF/reqCFxbyob8iYX/eka5t4XlKZjmT2i7pi+Fey5b syjWwhzrFomuEDajA8xgLpiH6qfWxaLZWrb+qOWD7ThZbmDyrD3AumA7VytAaRMWQVlq UosoC0H73Kift+99RD1vk2QqgdVgdG+f0KsR/9vSuru4M0gZTTxNvwxtMwNxlLOiK5+R 5WEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=LUsZZlLxNNowevVY9Bhjv9elaOD+ObVt7O5s3QingdQ=; fh=yyAGbTikx/RHwePVMTF7XiY858Fr2O1Lml8NjpI1ECE=; b=q8Dr8mJFAORv4dWuoV7et9kwSlJwIHDanWRexSLwIp8r4moNkBPnCL3G87DAWhSnae CU8ktPjLZk4fZXqEzmfuZau6l/JTgujaxNQN5AJ6z81ttSkEMUCZxeQZnHibOrgFDl0K Ue6AEMKYOc7iLDsHlfVHhk2kpXlQfLgZTtKYCqiudVnS2c/oOc6bjQiLvbqNBn0Dk94f P52izVfhbAnK0Km2HhD5WRH1yg/baYmqgq9cgfKaA4mLHo0h77afULWAocYtSQ8Azn8z 4aXHK4/QqJLXLNXRywas9+ZSWU4O2K/pefc3DKYm+kUgv9wyQJdAmplfO6fzrhdc3uEQ SiqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="fxdFA/Vt"; spf=pass (google.com: domain of linux-kernel+bounces-10264-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10264-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w9-20020a17090652c900b00a232a66ec5esi2392682ejn.350.2023.12.22.19.27.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 19:27:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10264-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="fxdFA/Vt"; spf=pass (google.com: domain of linux-kernel+bounces-10264-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10264-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id ABDD11F24257 for ; Sat, 23 Dec 2023 03:27:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F71FDF4E; Sat, 23 Dec 2023 03:25:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fxdFA/Vt" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 292CC4437; Sat, 23 Dec 2023 03:25:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703301955; x=1734837955; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=f+dh5rZALXl/p24n8Vz32jakt6X6ur63JdX+9WjZny0=; b=fxdFA/VtFi3pjv5hWWtRlVFdPPZWpIzJ+eD+ugyaax44SIE0pkUyJ4RS 4a5owJLBWuHxkaA8PvBjjEiDHfFNnX3q+S9VUnUAashhOkMAMzu1/+pBM NQpwFRA5UErRjT1IyUI+LDLvEiC333erHXX85pHDOOvtNv5IkfwRSnTaE 4SqavUxZyEd2/w8Zu0Zw91q+LHVvkdyIBF5cOgKYOnq4I/pDcye/oM5yg iIMWHvcsepLJBBXx9ppe1E8uqGM0RPb2rv4mnLmVS1sm4zf3d97JgfdJi 5JnomIi/PpYIAi1Q4W4Z4o5X6NK35N7xH6uRy/HhrrbZ5h0UmyF3alPGC Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="462619296" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="462619296" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="811534587" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="811534587" Received: from linux.intel.com ([10.54.29.200]) by orsmga001.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 19:25:53 -0800 Received: from debox1-desk4.intel.com (unknown [10.209.86.110]) by linux.intel.com (Postfix) with ESMTP id C84C3580CC6; Fri, 22 Dec 2023 19:25:52 -0800 (PST) From: "David E. Box" To: david.e.box@linux.intel.com, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, rajvi.jingar@linux.intel.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/8] platform/x86/intel/pmc: Add missing extern Date: Fri, 22 Dec 2023 19:25:48 -0800 Message-Id: <20231223032548.1680738-9-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231223032548.1680738-1-david.e.box@linux.intel.com> References: <20231223032548.1680738-1-david.e.box@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786041668369762958 X-GMAIL-MSGID: 1786041668369762958 Add missing extern for tgl_h_reg_map. Fixes sparse warning: drivers/platform/x86/intel/pmc/tgl.c:213:26: warning: symbol 'tgl_h_reg_map' was not declared. Should it be static? Fixes: 544f7b7f651c ("platform/x86/intel/pmc: Add regmap for Tiger Lake H PCH") Signed-off-by: David E. Box --- drivers/platform/x86/intel/pmc/core.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h index ce7b1cd2b194..2a797fccf5e6 100644 --- a/drivers/platform/x86/intel/pmc/core.h +++ b/drivers/platform/x86/intel/pmc/core.h @@ -452,6 +452,7 @@ extern const struct pmc_bit_map tgl_vnn_misc_status_map[]; extern const struct pmc_bit_map tgl_signal_status_map[]; extern const struct pmc_bit_map *tgl_lpm_maps[]; extern const struct pmc_reg_map tgl_reg_map; +extern const struct pmc_reg_map tgl_h_reg_map; extern const struct pmc_bit_map adl_pfear_map[]; extern const struct pmc_bit_map *ext_adl_pfear_map[]; extern const struct pmc_bit_map adl_ltr_show_map[];