public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: linux-pci@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"David E . Box" <david.e.box@linux.intel.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	"Tasev Nikola" <tasev.stefanoska@skynet.be>,
	"Mark Enriquez" <enriquezmark36@gmail.com>,
	"Thomas Witt" <kernel@witt.link>,
	"Werner Sembach" <wse@tuxedocomputers.com>,
	"Vidya Sagar" <vidyas@nvidia.com>,
	"Kai-Heng Feng" <kai.heng.feng@canonical.com>,
	"Kuppuswamy Sathyanarayanan"
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	"Ricky Wu" <ricky_wu@realtek.com>,
	"Mario Limonciello" <mario.limonciello@amd.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>
Subject: [PATCH v7 2/5] PCI/ASPM: Always build aspm.c
Date: Fri, 23 Feb 2024 14:58:48 -0600	[thread overview]
Message-ID: <20240223205851.114931-3-helgaas@kernel.org> (raw)
In-Reply-To: <20240223205851.114931-1-helgaas@kernel.org>

From: "David E. Box" <david.e.box@linux.intel.com>

Some ASPM-related tasks, such as save and restore of LTR and L1SS
capabilities, still need to be performed when CONFIG_PCIEASPM is not
enabled. To prepare for these changes, wrap the current code in aspm.c
with an #ifdef and always build the file.

Link: https://lore.kernel.org/r/20240128233212.1139663-2-david.e.box@linux.intel.com
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
[bhelgaas: split build change from function moves]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/pcie/Makefile | 2 +-
 drivers/pci/pcie/aspm.c   | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/Makefile b/drivers/pci/pcie/Makefile
index 8de4ed5f98f1..6461aa93fe76 100644
--- a/drivers/pci/pcie/Makefile
+++ b/drivers/pci/pcie/Makefile
@@ -6,7 +6,7 @@ pcieportdrv-y			:= portdrv.o rcec.o
 
 obj-$(CONFIG_PCIEPORTBUS)	+= pcieportdrv.o
 
-obj-$(CONFIG_PCIEASPM)		+= aspm.o
+obj-y				+= aspm.o
 obj-$(CONFIG_PCIEAER)		+= aer.o err.o
 obj-$(CONFIG_PCIEAER_INJECT)	+= aer_inject.o
 obj-$(CONFIG_PCIE_PME)		+= pme.o
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
index d1538f73f2f9..d50c0f83430f 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -24,6 +24,8 @@
 
 #include "../pci.h"
 
+#ifdef CONFIG_PCIEASPM
+
 #ifdef MODULE_PARAM_PREFIX
 #undef MODULE_PARAM_PREFIX
 #endif
@@ -1517,3 +1519,5 @@ bool pcie_aspm_support_enabled(void)
 {
 	return aspm_support_enabled;
 }
+
+#endif /* CONFIG_PCIEASPM */
-- 
2.34.1


  parent reply	other threads:[~2024-02-23 20:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23 20:58 [PATCH v7 0/5] PCI/ASPM: Save/restore L1 PM Substates for suspend/resume Bjorn Helgaas
2024-02-23 20:58 ` [PATCH v7 1/5] PCI/ASPM: Move pci_configure_ltr() to aspm.c Bjorn Helgaas
2024-02-23 20:58 ` Bjorn Helgaas [this message]
2024-02-26  6:44   ` [PATCH v7 2/5] PCI/ASPM: Always build aspm.c Kuppuswamy Sathyanarayanan
2024-02-26 21:04     ` Bjorn Helgaas
2024-02-23 20:58 ` [PATCH v7 3/5] PCI/ASPM: Move pci_save_ltr_state() to aspm.c Bjorn Helgaas
2024-02-23 20:58 ` [PATCH v7 4/5] PCI/ASPM: Save L1 PM Substates Capability for suspend/resume Bjorn Helgaas
2024-02-23 21:37   ` Bjorn Helgaas
2024-02-23 20:58 ` [PATCH v7 5/5] PCI/ASPM: Call pci_save_ltr_state() from pci_save_pcie_state() Bjorn Helgaas
2024-03-05 21:46 ` [PATCH v7 0/5] PCI/ASPM: Save/restore L1 PM Substates for suspend/resume Bjorn Helgaas
2024-03-07 22:25   ` Bjorn Helgaas
2024-03-12 17:03     ` tasev.stefanoska
2024-03-12 17:09       ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240223205851.114931-3-helgaas@kernel.org \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=david.e.box@linux.intel.com \
    --cc=enriquezmark36@gmail.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=kernel@witt.link \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rafael@kernel.org \
    --cc=ricky_wu@realtek.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=tasev.stefanoska@skynet.be \
    --cc=vidyas@nvidia.com \
    --cc=wse@tuxedocomputers.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox