summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKrzysztof Wilczyński <kwilczynski@kernel.org>2026-05-08 04:35:38 +0000
committerBjorn Helgaas <bhelgaas@google.com>2026-06-23 15:19:09 -0500
commite52e497e3778c99c3fb26ef6a47af6a219133f8c (patch)
treeb5ca5b735733cbb587c2de195a42483d03d68e35 /include
parentb45bebbfa0be8b1c8be5d3c5946f8f04d556fdf0 (diff)
downloadlwn-e52e497e3778c99c3fb26ef6a47af6a219133f8c.tar.gz
lwn-e52e497e3778c99c3fb26ef6a47af6a219133f8c.zip
PCI: Add macros for legacy I/O and memory address space sizes
Add defines for the standard PCI legacy address space sizes, replacing the raw literals used by the legacy sysfs attributes. Then, replace open-coded values with the newly added macros. No functional changes intended. Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Shivaprasad G Bhat <sbhat@linux.ibm.com> Link: https://patch.msgid.link/20260508043543.217179-20-kwilczynski@kernel.org
Diffstat (limited to 'include')
-rw-r--r--include/linux/pci.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index c56f2cf0d2ab..e37677a8dd3c 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -27,6 +27,7 @@
#include <linux/mod_devicetable.h>
#include <linux/types.h>
+#include <linux/sizes.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/list.h>
@@ -1169,6 +1170,10 @@ enum {
/* These external functions are only available when PCI support is enabled */
#ifdef CONFIG_PCI
+/* PCI legacy I/O port and memory address space sizes. */
+#define PCI_LEGACY_IO_SIZE (SZ_64K - 1)
+#define PCI_LEGACY_MEM_SIZE SZ_1M
+
extern unsigned int pci_flags;
static inline void pci_set_flags(int flags) { pci_flags = flags; }