Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

parisc: Declare pci_iounmap() parisc version only when CONFIG_PCI enabled

Linus noticed odd declaration rules for pci_iounmap() in iomap.h and
pci_iomap.h, where it dependend on either NO_GENERIC_PCI_IOPORT_MAP or
GENERIC_IOMAP when CONFIG_PCI was disabled.

Testing on parisc seems to indicate that we need pci_iounmap() only when
CONFIG_PCI is enabled, so the declaration of pci_iounmap() can be moved
cleanly into pci_iomap.h in sync with the declarations of pci_iomap().

Link: https://lore.kernel.org/all/CAHk-=wjRrh98pZoQ+AzfWmsTZacWxTJKXZ9eKU2X_0+jM=O8nw@mail.gmail.com/
Signed-off-by: Helge Deller <deller@gmx.de>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Fixes: 97a29d59fc22 ("[PARISC] fix compile break caused by iomap: make IOPORT/PCI mapping functions conditional")
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Ulrich Teichert <krypton@ulrich-teichert.org>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Helge Deller and committed by
Linus Torvalds
9caea000 31ad37bd

+6 -11
+3 -1
arch/parisc/lib/iomap.c
··· 513 513 } 514 514 } 515 515 516 + #ifdef CONFIG_PCI 516 517 void pci_iounmap(struct pci_dev *dev, void __iomem * addr) 517 518 { 518 519 if (!INDIRECT_ADDR(addr)) { 519 520 iounmap(addr); 520 521 } 521 522 } 523 + EXPORT_SYMBOL(pci_iounmap); 524 + #endif 522 525 523 526 EXPORT_SYMBOL(ioread8); 524 527 EXPORT_SYMBOL(ioread16); ··· 547 544 EXPORT_SYMBOL(iowrite32_rep); 548 545 EXPORT_SYMBOL(ioport_map); 549 546 EXPORT_SYMBOL(ioport_unmap); 550 - EXPORT_SYMBOL(pci_iounmap);
-10
include/asm-generic/iomap.h
··· 110 110 } 111 111 #endif 112 112 113 - #ifdef CONFIG_PCI 114 - /* Destroy a virtual mapping cookie for a PCI BAR (memory or IO) */ 115 - struct pci_dev; 116 - extern void pci_iounmap(struct pci_dev *dev, void __iomem *); 117 - #elif defined(CONFIG_GENERIC_IOMAP) 118 - struct pci_dev; 119 - static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) 120 - { } 121 - #endif 122 - 123 113 #include <asm-generic/pci_iomap.h> 124 114 125 115 #endif
+3
include/asm-generic/pci_iomap.h
··· 18 18 extern void __iomem *pci_iomap_wc_range(struct pci_dev *dev, int bar, 19 19 unsigned long offset, 20 20 unsigned long maxlen); 21 + extern void pci_iounmap(struct pci_dev *dev, void __iomem *); 21 22 /* Create a virtual mapping cookie for a port on a given PCI device. 22 23 * Do not call this directly, it exists to make it easier for architectures 23 24 * to override */ ··· 51 50 { 52 51 return NULL; 53 52 } 53 + static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) 54 + { } 54 55 #endif 55 56 56 57 #endif /* __ASM_GENERIC_PCI_IOMAP_H */