[PATCH v4 20/24] PCI: Add macros for legacy I/O and memory address space sizes
Krzysztof Wilczyński
kwilczynski at kernel.org
Sat Apr 11 18:01:44 AEST 2026
Add defines for the standard PCI legacy address space sizes,
replacing the raw literals used by the legacy sysfs attributes.
Suggested-by: Ilpo Järvinen <ilpo.jarvinen at linux.intel.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski at kernel.org>
---
include/linux/pci.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index f6f55005f82d..6b630bac8c08 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>
@@ -1167,6 +1168,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; }
--
2.53.0
More information about the Linuxppc-dev
mailing list