diff options
Diffstat (limited to 'include/linux/io.h')
-rw-r--r-- | include/linux/io.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/io.h b/include/linux/io.h index 82ef36eac8a1..2195d9ea4aaa 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
@@ -90,6 +90,27 @@ void devm_memunmap(struct device *dev, void *addr); | |||
90 | 90 | ||
91 | void *__devm_memremap_pages(struct device *dev, struct resource *res); | 91 | void *__devm_memremap_pages(struct device *dev, struct resource *res); |
92 | 92 | ||
93 | #ifdef CONFIG_PCI | ||
94 | /* | ||
95 | * The PCI specifications (Rev 3.0, 3.2.5 "Transaction Ordering and | ||
96 | * Posting") mandate non-posted configuration transactions. There is | ||
97 | * no ioremap API in the kernel that can guarantee non-posted write | ||
98 | * semantics across arches so provide a default implementation for | ||
99 | * mapping PCI config space that defaults to ioremap_nocache(); arches | ||
100 | * should override it if they have memory mapping implementations that | ||
101 | * guarantee non-posted writes semantics to make the memory mapping | ||
102 | * compliant with the PCI specification. | ||
103 | */ | ||
104 | #ifndef pci_remap_cfgspace | ||
105 | #define pci_remap_cfgspace pci_remap_cfgspace | ||
106 | static inline void __iomem *pci_remap_cfgspace(phys_addr_t offset, | ||
107 | size_t size) | ||
108 | { | ||
109 | return ioremap_nocache(offset, size); | ||
110 | } | ||
111 | #endif | ||
112 | #endif | ||
113 | |||
93 | /* | 114 | /* |
94 | * Some systems do not have legacy ISA devices. | 115 | * Some systems do not have legacy ISA devices. |
95 | * /dev/port is not a valid interface on these systems. | 116 | * /dev/port is not a valid interface on these systems. |