Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp697057rdb; Mon, 29 Jan 2024 15:46:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IFx/Hjs7VudVaFOyRk6kPIRZHRrEb0SGBwHWKt8YOiv/d3m6ZMXpL8ISRAGQn/7Ln+gan/e X-Received: by 2002:a05:6a00:6807:b0:6db:e366:53a8 with SMTP id hq7-20020a056a00680700b006dbe36653a8mr5584091pfb.12.1706572007088; Mon, 29 Jan 2024 15:46:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706572007; cv=pass; d=google.com; s=arc-20160816; b=obDJpGDjHpCrhsNV4lBePebZzoRqaUX9i+5K33nhiOpQ9I8r+jNaMPPIJFJjC872AH jFnHzVzmqxV3WXMGa7DL0P9nYlz+vRAJeyF4cCKTWaw0QArsr2BK7+eLxqR/QfCB6vq1 0jCDiXjrNwHlverf0a8ZebmNkj5CRMIvce4LVidYeU+ZvklDSC4wXFmmC9ptUDHp8pVZ vY3ejxtJZNEBvqcuX50EqCwNMhS/8wYAQoyjVSTNMZddv0EQbHn7P6/SPArVizKbmshb KrXTOX8HyoSRyDjZnki0biu3TLWrdAGUB6moOplzIKjhwRT+ITxLOQzYwqanVUSWsETt zrnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=5iSMMOenO31JsZNGyifn2TlOQKoZs9JyaXW39ANYRaA=; fh=NjGHwgav3wDTdeXbiSoSpB5GduZRV68NasKEgpqITq0=; b=FrZ0gRQeBxGuC29SJI2SH2FTVFRz82SpKV3hP9j6hDcqSxaiHH57E7U44Iyv97jlGr kWEY9i9w61kPY4lfAgQeakDw9JRdLF0Ag/Hs1yBMQ5WZAGw6e6LiVr2jW7JKHtnXXc30 wOeHxeFJg+1lNqxx14dvr17fVcK4LgJmpqo3/xHw4XNhpI/vieKnCPn3HfSoVeRzuZa1 mp4GhCsVjDeMNcQanEv4Z6FaqWONqs0QkZ4n6L3wGdEZN0oc7DQyEgxY75Ue2eDrqRIN AnYRuo2DcI0YUvnqlYWToBKkTLOxAVi2ZPdykQT2h/5bbxdjLhM8UYS0hofzpMCLFWHi OWBg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NClr7Kfn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43642-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43642-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d16-20020a056a00199000b006dbafd2af90si6549545pfl.22.2024.01.29.15.46.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 15:46:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43642-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NClr7Kfn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-43642-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43642-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 B99D1281A1A for ; Mon, 29 Jan 2024 23:46:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17AF954665; Mon, 29 Jan 2024 23:46:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NClr7Kfn" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3869253E24; Mon, 29 Jan 2024 23:46:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706571989; cv=none; b=J9DA9mBEOZcCYokA2zzTBjl2L0LEW1leiM3jFR8QZSOp6GmeO4Vo9Zul2wmGVZzdZaTpaTp5LzlwZU8upkI2HmSgUrwriCA5hl3Kin12D4KNz1Fks4X/9XVxtwWWHxpDxLvlo/rWIEdspvsSOsLwgOiwFQc4f9whNWezqE746OY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706571989; c=relaxed/simple; bh=cpXCtIujLMZQdsxt28UBk2BvsjLuYdx+fvr2xcxohvw=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=jemYC7g4ii2tkG9sve5q8+FcVwaUnU+O2ofqF1a3dUbfgUp0ghLPN3Df2+VYC4hK6bZYUJTROgoj3YIOcEF/rL68tYr+BpJOAIXw7imgn+F1UQzw6NqLZ12+YbauRXSUf/V0rUzTz1Adqbz3mtw6Q4X095+RZgGl8shKCi8DAu8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NClr7Kfn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F366C43394; Mon, 29 Jan 2024 23:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706571988; bh=cpXCtIujLMZQdsxt28UBk2BvsjLuYdx+fvr2xcxohvw=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=NClr7Kfnhc8HKEZ7PRgBd01SHUvK/vdBeLPHv1PNjEQao4xcYyA15tk/CbD3jjxdb SFJTu1zvsz/9tNLPgnrcpX29SY5HN6ijYB0NlDcLrwNzsMvkE+0Vgg8j44GVQ/TiXP lRgcmtJ8s2M5LptuXveifrfAN71rpSzrj1ztFyvbig4APCt2K39d0R9KXNhH3BQUdY QRMY3Zipka53Ubk/Qe3lw6s1DhWXySI1t+s6FlGuVFOAHVYlH27yzYGMB8ykH1R5M2 t7AC1mLYr4VYeGMAKJYUgclaKqg6M/a7J+c+rgUVw8f/dn5uc7eOi5Wgt2t++X3p8D o9X72JDZg8dMg== Date: Mon, 29 Jan 2024 17:46:27 -0600 From: Bjorn Helgaas To: "David E. Box" Cc: mika.westerberg@linux.intel.com, ilpo.jarvinen@linux.intel.com, bhelgaas@google.com, rjw@rjwysocki.net, tasev.stefanoska@skynet.be, enriquezmark36@gmail.com, kernel@witt.link, wse@tuxedocomputers.com, vidyas@nvidia.com, kai.heng.feng@canonical.com, sathyanarayanan.kuppuswamy@linux.intel.com, ricky_wu@realtek.com, mario.limonciello@amd.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/5] Always build aspm.c Message-ID: <20240129234627.GA487749@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240128233212.1139663-1-david.e.box@linux.intel.com> On Sun, Jan 28, 2024 at 03:32:07PM -0800, David E. Box wrote: > Here is the series to always build aspm.c, add back L1SS save/restore, and > consolidate all ASPM related code in aspm.c. > > Patch 1 - Moves all PCI core functions running under CONFIG_PCIEASPM into > aspm.c and changes they Makefile to always build it. No functional changes. > > Patch 2 - Creates a separate function to save the L1SS offset and places it > outside of CONFIG_PCIEASPM in aspm.c so that the offset is available for > later use by the L1SS save/restore code which needs to run when > CONFIG_PCIEASPM=n. > > Patch 3 - Updated L1 Substate save/restore patch from previous V5 [1]. > > Patch 4 - Moves the LTR save/restore state functions into aspm.c outside of > CONFIG_PCIEASPM. > > Patch 5 - Moves the LTR save/restore state calls into > pci_save/restore_pcie_state(). > > The series does not continue any of the ASPM robustness changes proposed by > Ilpo [2]. But if we think it's worth combining with this series I can > add it and help continue the work. > > [1] https://lore.kernel.org/linux-pci/20231221011250.191599-1-david.e.box@linux.intel.com/ > [2] https://lore.kernel.org/linux-pci/20230918131103.24119-1-ilpo.jarvinen@linux.intel.com/ > > David E. Box (5): > PCI: Always build aspm.c > PCI: Create function to save L1SS offset > PCI/ASPM: Add back L1 PM Substate save and restore > PCI: Move pci_save/restore_ltr_state() to aspm.c > PCI: Call LTR save/restore state from PCIe save/restore > > drivers/pci/pci.c | 91 ++++---------- > drivers/pci/pci.h | 10 +- > drivers/pci/pcie/Makefile | 2 +- > drivers/pci/pcie/aspm.c | 257 ++++++++++++++++++++++++++++++++++++-- > drivers/pci/probe.c | 62 +-------- > include/linux/pci.h | 4 +- > 6 files changed, 283 insertions(+), 143 deletions(-) > > > base-commit: 0dd3ee31125508cd67f7e7172247f05b7fd1753a Rebased to v6.8-rc1 and applied to pci/aspm for v6.9, thanks!