[PATCH v4 22/41] PCI: Make quirk using inw() depend on HAS_IOPORT

From: Niklas Schnelle
Date: Tue May 16 2023 - 07:02:57 EST


In the future inw() and friends will not be compiled on architectures
without I/O port support.

Acked-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
Co-developed-by: Arnd Bergmann <arnd@xxxxxxxxxx>
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxxxx>
Signed-off-by: Niklas Schnelle <schnelle@xxxxxxxxxxxxx>
---
Note: The HAS_IOPORT Kconfig option was added in v6.4-rc1 so
per-subsystem patches may be applied independently

drivers/pci/quirks.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index f4e2a88729fd..81fb75f128f7 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -268,6 +268,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_2, quirk_isa_d
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs);
#endif

+#ifdef CONFIG_HAS_IOPORT
/*
* Intel NM10 "TigerPoint" LPC PM1a_STS.BM_STS must be clear
* for some HT machines to use C4 w/o hanging.
@@ -287,6 +288,7 @@ static void quirk_tigerpoint_bm_sts(struct pci_dev *dev)
}
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGP_LPC, quirk_tigerpoint_bm_sts);
+#endif

/* Chipsets where PCI->PCI transfers vanish or hang */
static void quirk_nopcipci(struct pci_dev *dev)
--
2.39.2