Message ID | 20231120215945.52027-3-pstanner@redhat.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Regather scattered PCI-Code | expand |
Hi Philipp, kernel test robot noticed the following build errors: [auto build test ERROR on pci/next] [also build test ERROR on pci/for-linus linus/master v6.7-rc2 next-20231120] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258 base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/ config: openrisc-allnoconfig (https://download.01.org/0day-ci/archive/20231121/202311211216.KqPYvOCI-lkp@intel.com/config) compiler: or1k-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231121/202311211216.KqPYvOCI-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202311211216.KqPYvOCI-lkp@intel.com/ All error/warnings (new ones prefixed by >>): >> drivers/pci/iomap.c:27:15: error: redefinition of 'pci_iomap_range' 27 | void __iomem *pci_iomap_range(struct pci_dev *dev, | ^~~~~~~~~~~~~~~ In file included from include/asm-generic/io.h:20, from arch/openrisc/include/asm/io.h:37, from include/linux/io.h:13, from include/linux/irq.h:20, from include/asm-generic/hardirq.h:17, from ./arch/openrisc/include/generated/asm/hardirq.h:1, from include/linux/hardirq.h:11, from include/linux/interrupt.h:11, from include/linux/pci.h:38, from drivers/pci/iomap.c:7: include/asm-generic/pci_iomap.h:44:29: note: previous definition of 'pci_iomap_range' with type 'void *(struct pci_dev *, int, long unsigned int, long unsigned int)' 44 | static inline void __iomem *pci_iomap_range(struct pci_dev *dev, int bar, | ^~~~~~~~~~~~~~~ drivers/pci/iomap.c: In function 'pci_iomap_range': >> drivers/pci/iomap.c:43:24: error: implicit declaration of function '__pci_ioport_map'; did you mean 'devm_ioport_map'? [-Werror=implicit-function-declaration] 43 | return __pci_ioport_map(dev, start, len); | ^~~~~~~~~~~~~~~~ | devm_ioport_map >> drivers/pci/iomap.c:43:24: warning: returning 'int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion] 43 | return __pci_ioport_map(dev, start, len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pci/iomap.c: At top level: >> drivers/pci/iomap.c:67:15: error: redefinition of 'pci_iomap_wc_range' 67 | void __iomem *pci_iomap_wc_range(struct pci_dev *dev, | ^~~~~~~~~~~~~~~~~~ include/asm-generic/pci_iomap.h:50:29: note: previous definition of 'pci_iomap_wc_range' with type 'void *(struct pci_dev *, int, long unsigned int, long unsigned int)' 50 | static inline void __iomem *pci_iomap_wc_range(struct pci_dev *dev, int bar, | ^~~~~~~~~~~~~~~~~~ >> drivers/pci/iomap.c:110:15: error: redefinition of 'pci_iomap' 110 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | ^~~~~~~~~ include/asm-generic/pci_iomap.h:35:29: note: previous definition of 'pci_iomap' with type 'void *(struct pci_dev *, int, long unsigned int)' 35 | static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) | ^~~~~~~~~ >> drivers/pci/iomap.c:131:15: error: redefinition of 'pci_iomap_wc' 131 | void __iomem *pci_iomap_wc(struct pci_dev *dev, int bar, unsigned long maxlen) | ^~~~~~~~~~~~ include/asm-generic/pci_iomap.h:40:29: note: previous definition of 'pci_iomap_wc' with type 'void *(struct pci_dev *, int, long unsigned int)' 40 | static inline void __iomem *pci_iomap_wc(struct pci_dev *dev, int bar, unsigned long max) | ^~~~~~~~~~~~ >> drivers/pci/iomap.c:164:6: error: redefinition of 'pci_iounmap' 164 | void pci_iounmap(struct pci_dev *dev, void __iomem *p) | ^~~~~~~~~~~ include/asm-generic/pci_iomap.h:56:20: note: previous definition of 'pci_iounmap' with type 'void(struct pci_dev *, void *)' 56 | static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) | ^~~~~~~~~~~ cc1: some warnings being treated as errors Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP Depends on [n]: PCI [=n] Selected by [y]: - OPENRISC [=y] vim +/pci_iomap_range +27 drivers/pci/iomap.c 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 11 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 12 /** eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 13 * pci_iomap_range - create a virtual mapping cookie for a PCI BAR 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 14 * @dev: PCI device that owns the BAR 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 15 * @bar: BAR number eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 16 * @offset: map memory at the given offset in BAR eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 17 * @maxlen: max length of the memory to map 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 18 * 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 19 * Using this function you will get a __iomem address to your device BAR. 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 20 * You can access it using ioread*() and iowrite*(). These functions hide 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 21 * the details if this is a MMIO or PIO address space and will just do what 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 22 * you expect from them in the correct way. 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 23 * 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 24 * @maxlen specifies the maximum length to map. If you want to get access to eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 25 * the complete BAR from offset to the end, pass %0 here. 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 26 * */ eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 @27 void __iomem *pci_iomap_range(struct pci_dev *dev, eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 28 int bar, eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 29 unsigned long offset, eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 30 unsigned long maxlen) 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 31 { 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 32 resource_size_t start = pci_resource_start(dev, bar); 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 33 resource_size_t len = pci_resource_len(dev, bar); 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 34 unsigned long flags = pci_resource_flags(dev, bar); 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 35 eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 36 if (len <= offset || !start) 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 37 return NULL; eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 38 len -= offset; eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 39 start += offset; 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 40 if (maxlen && len > maxlen) 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 41 len = maxlen; 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 42 if (flags & IORESOURCE_IO) b923650b84068b lib/pci_iomap.c Michael S. Tsirkin 2012-01-30 @43 return __pci_ioport_map(dev, start, len); 92b19ff50e8f24 lib/pci_iomap.c Dan Williams 2015-08-10 44 if (flags & IORESOURCE_MEM) 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 45 return ioremap(start, len); 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 46 /* What? */ 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 47 return NULL; 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 48 } eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 49 EXPORT_SYMBOL(pci_iomap_range); 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 50 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 51 /** 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 52 * pci_iomap_wc_range - create a virtual WC mapping cookie for a PCI BAR 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 53 * @dev: PCI device that owns the BAR 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 54 * @bar: BAR number 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 55 * @offset: map memory at the given offset in BAR 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 56 * @maxlen: max length of the memory to map 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 57 * 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 58 * Using this function you will get a __iomem address to your device BAR. 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 59 * You can access it using ioread*() and iowrite*(). These functions hide 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 60 * the details if this is a MMIO or PIO address space and will just do what 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 61 * you expect from them in the correct way. When possible write combining 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 62 * is used. 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 63 * 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 64 * @maxlen specifies the maximum length to map. If you want to get access to 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 65 * the complete BAR from offset to the end, pass %0 here. 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 66 * */ 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 @67 void __iomem *pci_iomap_wc_range(struct pci_dev *dev, 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 68 int bar, 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 69 unsigned long offset, 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 70 unsigned long maxlen) 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 71 { 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 72 resource_size_t start = pci_resource_start(dev, bar); 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 73 resource_size_t len = pci_resource_len(dev, bar); 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 74 unsigned long flags = pci_resource_flags(dev, bar); 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 75 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 76 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 77 if (flags & IORESOURCE_IO) 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 78 return NULL; 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 79 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 80 if (len <= offset || !start) 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 81 return NULL; 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 82 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 83 len -= offset; 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 84 start += offset; 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 85 if (maxlen && len > maxlen) 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 86 len = maxlen; 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 87 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 88 if (flags & IORESOURCE_MEM) 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 89 return ioremap_wc(start, len); 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 90 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 91 /* What? */ 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 92 return NULL; 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 93 } 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 94 EXPORT_SYMBOL_GPL(pci_iomap_wc_range); 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 95 eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 96 /** eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 97 * pci_iomap - create a virtual mapping cookie for a PCI BAR eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 98 * @dev: PCI device that owns the BAR eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 99 * @bar: BAR number eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 100 * @maxlen: length of the memory to map eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 101 * eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 102 * Using this function you will get a __iomem address to your device BAR. eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 103 * You can access it using ioread*() and iowrite*(). These functions hide eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 104 * the details if this is a MMIO or PIO address space and will just do what eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 105 * you expect from them in the correct way. eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 106 * eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 107 * @maxlen specifies the maximum length to map. If you want to get access to eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 108 * the complete BAR without checking for its length first, pass %0 here. eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 109 * */ eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 @110 void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 111 { eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 112 return pci_iomap_range(dev, bar, 0, maxlen); eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 113 } 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 114 EXPORT_SYMBOL(pci_iomap); 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 115 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 116 /** 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 117 * pci_iomap_wc - create a virtual WC mapping cookie for a PCI BAR 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 118 * @dev: PCI device that owns the BAR 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 119 * @bar: BAR number 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 120 * @maxlen: length of the memory to map 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 121 * 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 122 * Using this function you will get a __iomem address to your device BAR. 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 123 * You can access it using ioread*() and iowrite*(). These functions hide 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 124 * the details if this is a MMIO or PIO address space and will just do what 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 125 * you expect from them in the correct way. When possible write combining 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 126 * is used. 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 127 * 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 128 * @maxlen specifies the maximum length to map. If you want to get access to 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 129 * the complete BAR without checking for its length first, pass %0 here. 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 130 * */ 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 @131 void __iomem *pci_iomap_wc(struct pci_dev *dev, int bar, unsigned long maxlen) 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 132 { 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 133 return pci_iomap_wc_range(dev, bar, 0, maxlen); 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 134 } 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 135 EXPORT_SYMBOL_GPL(pci_iomap_wc); 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 136 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 137 /* 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 138 * pci_iounmap() somewhat illogically comes from lib/iomap.c for the 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 139 * CONFIG_GENERIC_IOMAP case, because that's the code that knows about 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 140 * the different IOMAP ranges. 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 141 * 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 142 * But if the architecture does not use the generic iomap code, and if 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 143 * it has _not_ defined it's own private pci_iounmap function, we define 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 144 * it here. 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 145 * 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 146 * NOTE! This default implementation assumes that if the architecture 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 147 * support ioport mapping (HAS_IOPORT_MAP), the ioport mapping will 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 148 * be fixed to the range [ PCI_IOBASE, PCI_IOBASE+IO_SPACE_LIMIT [, 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 149 * and does not need unmapping with 'ioport_unmap()'. 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 150 * 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 151 * If you have different rules for your architecture, you need to 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 152 * implement your own pci_iounmap() that knows the rules for where 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 153 * and how IO vs MEM get mapped. 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 154 * 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 155 * This code is odd, and the ARCH_HAS/ARCH_WANTS #define logic comes 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 156 * from legacy <asm-generic/io.h> header file behavior. In particular, 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 157 * it would seem to make sense to do the iounmap(p) for the non-IO-space 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 158 * case here regardless, but that's not what the old header file code 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 159 * did. Probably incorrectly, but this is meant to be bug-for-bug 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 160 * compatible. 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 161 */ 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 162 #if defined(ARCH_WANTS_GENERIC_PCI_IOUNMAP) 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 163 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 @164 void pci_iounmap(struct pci_dev *dev, void __iomem *p) 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 165 { 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 166 #ifdef ARCH_HAS_GENERIC_IOPORT_MAP 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 167 uintptr_t start = (uintptr_t) PCI_IOBASE; 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 168 uintptr_t addr = (uintptr_t) p; 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 169 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 170 if (addr >= start && addr < start + IO_SPACE_LIMIT) 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 171 return; 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 172 iounmap(p); 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 173 #endif 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 174 } 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 175 EXPORT_SYMBOL(pci_iounmap); 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 176
Hi Philipp, kernel test robot noticed the following build errors: [auto build test ERROR on pci/next] [also build test ERROR on pci/for-linus linus/master v6.7-rc2 next-20231120] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258 base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/ config: arm-spear3xx_defconfig (https://download.01.org/0day-ci/archive/20231121/202311211441.4LgOiu32-lkp@intel.com/config) compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231121/202311211441.4LgOiu32-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202311211441.4LgOiu32-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/pci/iomap.c:27:15: error: redefinition of 'pci_iomap_range' void __iomem *pci_iomap_range(struct pci_dev *dev, ^ include/asm-generic/pci_iomap.h:44:29: note: previous definition is here static inline void __iomem *pci_iomap_range(struct pci_dev *dev, int bar, ^ >> drivers/pci/iomap.c:43:10: error: call to undeclared function '__pci_ioport_map'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] return __pci_ioport_map(dev, start, len); ^ drivers/pci/iomap.c:43:10: note: did you mean 'devm_ioport_map'? include/linux/io.h:38:16: note: 'devm_ioport_map' declared here void __iomem * devm_ioport_map(struct device *dev, unsigned long port, ^ >> drivers/pci/iomap.c:43:10: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'void *' [-Wint-conversion] return __pci_ioport_map(dev, start, len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pci/iomap.c:67:15: error: redefinition of 'pci_iomap_wc_range' void __iomem *pci_iomap_wc_range(struct pci_dev *dev, ^ include/asm-generic/pci_iomap.h:50:29: note: previous definition is here static inline void __iomem *pci_iomap_wc_range(struct pci_dev *dev, int bar, ^ drivers/pci/iomap.c:110:15: error: redefinition of 'pci_iomap' void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) ^ include/asm-generic/pci_iomap.h:35:29: note: previous definition is here static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) ^ drivers/pci/iomap.c:131:15: error: redefinition of 'pci_iomap_wc' void __iomem *pci_iomap_wc(struct pci_dev *dev, int bar, unsigned long maxlen) ^ include/asm-generic/pci_iomap.h:40:29: note: previous definition is here static inline void __iomem *pci_iomap_wc(struct pci_dev *dev, int bar, unsigned long max) ^ 6 errors generated. Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP Depends on [n]: PCI [=n] Selected by [y]: - ARM [=y] vim +/__pci_ioport_map +43 drivers/pci/iomap.c 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 11 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 12 /** eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 13 * pci_iomap_range - create a virtual mapping cookie for a PCI BAR 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 14 * @dev: PCI device that owns the BAR 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 15 * @bar: BAR number eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 16 * @offset: map memory at the given offset in BAR eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 17 * @maxlen: max length of the memory to map 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 18 * 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 19 * Using this function you will get a __iomem address to your device BAR. 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 20 * You can access it using ioread*() and iowrite*(). These functions hide 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 21 * the details if this is a MMIO or PIO address space and will just do what 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 22 * you expect from them in the correct way. 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 23 * 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 24 * @maxlen specifies the maximum length to map. If you want to get access to eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 25 * the complete BAR from offset to the end, pass %0 here. 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 26 * */ eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 27 void __iomem *pci_iomap_range(struct pci_dev *dev, eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 28 int bar, eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 29 unsigned long offset, eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 30 unsigned long maxlen) 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 31 { 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 32 resource_size_t start = pci_resource_start(dev, bar); 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 33 resource_size_t len = pci_resource_len(dev, bar); 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 34 unsigned long flags = pci_resource_flags(dev, bar); 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 35 eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 36 if (len <= offset || !start) 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 37 return NULL; eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 38 len -= offset; eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 39 start += offset; 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 40 if (maxlen && len > maxlen) 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 41 len = maxlen; 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 42 if (flags & IORESOURCE_IO) b923650b84068b lib/pci_iomap.c Michael S. Tsirkin 2012-01-30 @43 return __pci_ioport_map(dev, start, len); 92b19ff50e8f24 lib/pci_iomap.c Dan Williams 2015-08-10 44 if (flags & IORESOURCE_MEM) 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 45 return ioremap(start, len); 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 46 /* What? */ 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 47 return NULL; 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 48 } eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 49 EXPORT_SYMBOL(pci_iomap_range); 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 50
Hi Philipp,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.7-rc2 next-20231121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com
patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
config: alpha-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_ALPHA-0-0 (https://download.01.org/0day-ci/archive/20231121/202311211558.cMYA5imi-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20231121/202311211558.cMYA5imi-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311211558.cMYA5imi-lkp@intel.com/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP when selected by ALPHA
WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP
Depends on [n]: PCI [=n]
Selected by [y]:
- ALPHA [=y]
On Tue, Nov 21, 2023, at 07:48, kernel test robot wrote: > > If you fix the issue in a separate patch/commit (i.e. not just a new > version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot <lkp@intel.com> > | Closes: > https://lore.kernel.org/oe-kbuild-all/202311211441.4LgOiu32-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > drivers/pci/iomap.c:27:15: error: redefinition of 'pci_iomap_range' > void __iomem *pci_iomap_range(struct pci_dev *dev, > ^ > include/asm-generic/pci_iomap.h:44:29: note: previous definition is here > static inline void __iomem *pci_iomap_range(struct pci_dev *dev, int bar, > ^ >>> drivers/pci/iomap.c:43:10: error: call to undeclared function '__pci_ioport_map'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > return __pci_ioport_map(dev, start, len); From what I can tell looking at the header, I think we can just remove the "#elif defined(CONFIG_GENERIC_PCI_IOMAP)" bit entirely, as it no longer serves the purpose it originally had. It also looks like s390 is the only architecture that actually uses a custom implementation of pci_iomap*(), and this already has #define pci_iomap pci_iomap #define pci_iomap_range pci_iomap_range #define pci_iounmap pci_iounmap #define pci_iomap_wc pci_iomap_wc #define pci_iomap_wc_range pci_iomap_wc_range so the entire CONFIG_GENERIC_PCI_IOMAP symbol can probably be replaced with individual checks here, using CONFIG_PCI as the conditional in the Makefile. Arnd
Hi Philipp,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.7-rc2 next-20231121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com
patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
config: x86_64-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_GENERIC_IOMAP-0-0 (https://download.01.org/0day-ci/archive/20231121/202311211555.O02z7zPf-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20231121/202311211555.O02z7zPf-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311211555.O02z7zPf-lkp@intel.com/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP when selected by GENERIC_IOMAP
WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP
Depends on [n]: PCI [=n]
Selected by [y]:
- GENERIC_IOMAP [=y]
Hi Philipp,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.7-rc2 next-20231121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com
patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
config: arc-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_ARC-0-0 (https://download.01.org/0day-ci/archive/20231121/202311211517.A890KomU-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20231121/202311211517.A890KomU-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311211517.A890KomU-lkp@intel.com/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP when selected by ARC
WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP
Depends on [n]: PCI [=n]
Selected by [y]:
- ARC [=y]
Hi Philipp,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.7-rc2 next-20231121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com
patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
config: x86_64-buildonly-randconfig-004-20231121 (https://download.01.org/0day-ci/archive/20231121/202311211641.ThSnuFs7-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231121/202311211641.ThSnuFs7-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311211641.ThSnuFs7-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/pci/iomap.c:27:15: error: redefinition of 'pci_iomap_range'
void __iomem *pci_iomap_range(struct pci_dev *dev,
^~~~~~~~~~~~~~~
In file included from include/asm-generic/iomap.h:113:0,
from include/asm-generic/io.h:16,
from arch/x86/include/asm/io.h:327,
from include/linux/io.h:13,
from include/linux/pci.h:39,
from drivers/pci/iomap.c:7:
include/asm-generic/pci_iomap.h:44:29: note: previous definition of 'pci_iomap_range' was here
static inline void __iomem *pci_iomap_range(struct pci_dev *dev, int bar,
^~~~~~~~~~~~~~~
drivers/pci/iomap.c: In function 'pci_iomap_range':
drivers/pci/iomap.c:43:10: error: implicit declaration of function '__pci_ioport_map'; did you mean 'devm_ioport_map'? [-Werror=implicit-function-declaration]
return __pci_ioport_map(dev, start, len);
^~~~~~~~~~~~~~~~
devm_ioport_map
>> drivers/pci/iomap.c:43:10: warning: return makes pointer from integer without a cast [-Wint-conversion]
return __pci_ioport_map(dev, start, len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pci/iomap.c: At top level:
drivers/pci/iomap.c:67:15: error: redefinition of 'pci_iomap_wc_range'
void __iomem *pci_iomap_wc_range(struct pci_dev *dev,
^~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/iomap.h:113:0,
from include/asm-generic/io.h:16,
from arch/x86/include/asm/io.h:327,
from include/linux/io.h:13,
from include/linux/pci.h:39,
from drivers/pci/iomap.c:7:
include/asm-generic/pci_iomap.h:50:29: note: previous definition of 'pci_iomap_wc_range' was here
static inline void __iomem *pci_iomap_wc_range(struct pci_dev *dev, int bar,
^~~~~~~~~~~~~~~~~~
drivers/pci/iomap.c:110:15: error: redefinition of 'pci_iomap'
void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
^~~~~~~~~
In file included from include/asm-generic/iomap.h:113:0,
from include/asm-generic/io.h:16,
from arch/x86/include/asm/io.h:327,
from include/linux/io.h:13,
from include/linux/pci.h:39,
from drivers/pci/iomap.c:7:
include/asm-generic/pci_iomap.h:35:29: note: previous definition of 'pci_iomap' was here
static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)
^~~~~~~~~
drivers/pci/iomap.c:131:15: error: redefinition of 'pci_iomap_wc'
void __iomem *pci_iomap_wc(struct pci_dev *dev, int bar, unsigned long maxlen)
^~~~~~~~~~~~
In file included from include/asm-generic/iomap.h:113:0,
from include/asm-generic/io.h:16,
from arch/x86/include/asm/io.h:327,
from include/linux/io.h:13,
from include/linux/pci.h:39,
from drivers/pci/iomap.c:7:
include/asm-generic/pci_iomap.h:40:29: note: previous definition of 'pci_iomap_wc' was here
static inline void __iomem *pci_iomap_wc(struct pci_dev *dev, int bar, unsigned long max)
^~~~~~~~~~~~
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP
Depends on [n]: PCI [=n]
Selected by [y]:
- GENERIC_IOMAP [=y]
vim +43 drivers/pci/iomap.c
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 11
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 12 /**
eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 13 * pci_iomap_range - create a virtual mapping cookie for a PCI BAR
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 14 * @dev: PCI device that owns the BAR
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 15 * @bar: BAR number
eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 16 * @offset: map memory at the given offset in BAR
eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 17 * @maxlen: max length of the memory to map
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 18 *
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 19 * Using this function you will get a __iomem address to your device BAR.
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 20 * You can access it using ioread*() and iowrite*(). These functions hide
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 21 * the details if this is a MMIO or PIO address space and will just do what
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 22 * you expect from them in the correct way.
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 23 *
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 24 * @maxlen specifies the maximum length to map. If you want to get access to
eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 25 * the complete BAR from offset to the end, pass %0 here.
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 26 * */
eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 27 void __iomem *pci_iomap_range(struct pci_dev *dev,
eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 28 int bar,
eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 29 unsigned long offset,
eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 30 unsigned long maxlen)
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 31 {
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 32 resource_size_t start = pci_resource_start(dev, bar);
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 33 resource_size_t len = pci_resource_len(dev, bar);
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 34 unsigned long flags = pci_resource_flags(dev, bar);
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 35
eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 36 if (len <= offset || !start)
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 37 return NULL;
eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 38 len -= offset;
eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 39 start += offset;
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 40 if (maxlen && len > maxlen)
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 41 len = maxlen;
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 42 if (flags & IORESOURCE_IO)
b923650b84068b lib/pci_iomap.c Michael S. Tsirkin 2012-01-30 @43 return __pci_ioport_map(dev, start, len);
92b19ff50e8f24 lib/pci_iomap.c Dan Williams 2015-08-10 44 if (flags & IORESOURCE_MEM)
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 45 return ioremap(start, len);
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 46 /* What? */
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 47 return NULL;
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 48 }
eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 49 EXPORT_SYMBOL(pci_iomap_range);
66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 50
Hi Philipp,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.7-rc2 next-20231121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com
patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
config: arm-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_ARM-0-0 (https://download.01.org/0day-ci/archive/20231121/202311211816.wS7kAE5o-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20231121/202311211816.wS7kAE5o-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311211816.wS7kAE5o-lkp@intel.com/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP when selected by ARM
WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP
Depends on [n]: PCI [=n]
Selected by [y]:
- ARM [=y]
Hi Philipp,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.7-rc2 next-20231121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com
patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
config: arm64-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_ARM64-0-0 (https://download.01.org/0day-ci/archive/20231121/202311211833.tfTYR1cP-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20231121/202311211833.tfTYR1cP-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311211833.tfTYR1cP-lkp@intel.com/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP when selected by ARM64
WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP
Depends on [n]: PCI [=n]
Selected by [y]:
- ARM64 [=y]
On Tue, 2023-11-21 at 12:20 +0800, kernel test robot wrote: > Hi Philipp, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on pci/next] > [also build test ERROR on pci/for-linus linus/master v6.7-rc2 next- > 20231120] > [If your patch is applied to the wrong git tree, kindly drop us a > note. > And when submitting patch, we suggest to use '--base' as documented > in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: > https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258 > base: > https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next > patch link: > https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com > patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/ > config: openrisc-allnoconfig > (https://download.01.org/0day-ci/archive/20231121/202311211216.KqPYvO > CI-lkp@intel.com/config) > compiler: or1k-linux-gcc (GCC) 13.2.0 > reproduce (this is a W=1 build): > (https://download.01.org/0day-ci/archive/20231121/202311211216.KqPYvO > CI-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new > version of > the same patch/commit), kindly add following tags > > Reported-by: kernel test robot <lkp@intel.com> > > Closes: > > https://lore.kernel.org/oe-kbuild-all/202311211216.KqPYvOCI-lkp@intel.com/ > > All error/warnings (new ones prefixed by >>): > > > > drivers/pci/iomap.c:27:15: error: redefinition of > > > 'pci_iomap_range' > 27 | void __iomem *pci_iomap_range(struct pci_dev *dev, > | ^~~~~~~~~~~~~~~ > In file included from include/asm-generic/io.h:20, > from arch/openrisc/include/asm/io.h:37, > from include/linux/io.h:13, > from include/linux/irq.h:20, > from include/asm-generic/hardirq.h:17, > from > ./arch/openrisc/include/generated/asm/hardirq.h:1, > from include/linux/hardirq.h:11, > from include/linux/interrupt.h:11, > from include/linux/pci.h:38, > from drivers/pci/iomap.c:7: > include/asm-generic/pci_iomap.h:44:29: note: previous definition > of 'pci_iomap_range' with type 'void *(struct pci_dev *, int, long > unsigned int, long unsigned int)' > 44 | static inline void __iomem *pci_iomap_range(struct pci_dev > *dev, int bar, > | ^~~~~~~~~~~~~~~ > drivers/pci/iomap.c: In function 'pci_iomap_range': > > > drivers/pci/iomap.c:43:24: error: implicit declaration of > > > function '__pci_ioport_map'; did you mean 'devm_ioport_map'? [- > > > Werror=implicit-function-declaration] > 43 | return __pci_ioport_map(dev, start, len); > | ^~~~~~~~~~~~~~~~ > | devm_ioport_map > > > drivers/pci/iomap.c:43:24: warning: returning 'int' from a > > > function with return type 'void *' makes pointer from integer > > > without a cast [-Wint-conversion] > 43 | return __pci_ioport_map(dev, start, len); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > drivers/pci/iomap.c: At top level: > > > drivers/pci/iomap.c:67:15: error: redefinition of > > > 'pci_iomap_wc_range' > 67 | void __iomem *pci_iomap_wc_range(struct pci_dev *dev, > | ^~~~~~~~~~~~~~~~~~ > include/asm-generic/pci_iomap.h:50:29: note: previous definition > of 'pci_iomap_wc_range' with type 'void *(struct pci_dev *, int, > long unsigned int, long unsigned int)' > 50 | static inline void __iomem *pci_iomap_wc_range(struct > pci_dev *dev, int bar, > | ^~~~~~~~~~~~~~~~~~ > > > drivers/pci/iomap.c:110:15: error: redefinition of 'pci_iomap' > 110 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, > unsigned long maxlen) > | ^~~~~~~~~ > include/asm-generic/pci_iomap.h:35:29: note: previous definition > of 'pci_iomap' with type 'void *(struct pci_dev *, int, long > unsigned int)' > 35 | static inline void __iomem *pci_iomap(struct pci_dev *dev, > int bar, unsigned long max) > | ^~~~~~~~~ > > > drivers/pci/iomap.c:131:15: error: redefinition of 'pci_iomap_wc' > 131 | void __iomem *pci_iomap_wc(struct pci_dev *dev, int bar, > unsigned long maxlen) > | ^~~~~~~~~~~~ > include/asm-generic/pci_iomap.h:40:29: note: previous definition > of 'pci_iomap_wc' with type 'void *(struct pci_dev *, int, long > unsigned int)' > 40 | static inline void __iomem *pci_iomap_wc(struct pci_dev > *dev, int bar, unsigned long max) > | ^~~~~~~~~~~~ > > > drivers/pci/iomap.c:164:6: error: redefinition of 'pci_iounmap' > 164 | void pci_iounmap(struct pci_dev *dev, void __iomem *p) > | ^~~~~~~~~~~ > include/asm-generic/pci_iomap.h:56:20: note: previous definition > of 'pci_iounmap' with type 'void(struct pci_dev *, void *)' > 56 | static inline void pci_iounmap(struct pci_dev *dev, void > __iomem *addr) > | ^~~~~~~~~~~ > cc1: some warnings being treated as errors > > Kconfig warnings: (for reference only) > WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP > Depends on [n]: PCI [=n] > Selected by [y]: > - OPENRISC [=y] OK, so the issue here seems to be that you can not have GENERIC_PCI_IOMAP depend on PCI. Previously, #ifdef CONFIG_PCI made the (in this case) redundant function definitions disappear, which is not the case anymore for configs that want GENERIC_PCI_IOMAP but not PCI. My bad. I'll address that in the next version. P. > > > vim +/pci_iomap_range +27 drivers/pci/iomap.c > > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 11 > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 12 > /** > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 13 * > pci_iomap_range - create a virtual mapping cookie for a PCI BAR > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 14 * > @dev: PCI device that owns the BAR > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 15 * > @bar: BAR number > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 16 * > @offset: map memory at the given offset in BAR > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 17 * > @maxlen: max length of the memory to map > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 18 * > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 19 * > Using this function you will get a __iomem address to your device > BAR. > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 20 * > You can access it using ioread*() and iowrite*(). These functions > hide > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 21 * > the details if this is a MMIO or PIO address space and will just do > what > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 22 * > you expect from them in the correct way. > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 23 * > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 24 * > @maxlen specifies the maximum length to map. If you want to get > access to > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 25 * > the complete BAR from offset to the end, pass %0 here. > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 26 * > */ > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 @27 > void __iomem *pci_iomap_range(struct pci_dev *dev, > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 > 28 int bar, > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 > 29 unsigned long offset, > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 > 30 unsigned long maxlen) > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 31 { > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 > 32 resource_size_t start = pci_resource_start(dev, bar); > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 > 33 resource_size_t len = pci_resource_len(dev, bar); > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 > 34 unsigned long flags = pci_resource_flags(dev, bar); > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 35 > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 > 36 if (len <= offset || !start) > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 > 37 return NULL; > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 > 38 len -= offset; > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 > 39 start += offset; > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 > 40 if (maxlen && len > maxlen) > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 > 41 len = maxlen; > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 > 42 if (flags & IORESOURCE_IO) > b923650b84068b lib/pci_iomap.c Michael S. Tsirkin 2012-01-30 > @43 return __pci_ioport_map(dev, start, len); > 92b19ff50e8f24 lib/pci_iomap.c Dan Williams 2015-08-10 > 44 if (flags & IORESOURCE_MEM) > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 > 45 return ioremap(start, len); > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 > 46 /* What? */ > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 > 47 return NULL; > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 48 } > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 49 > EXPORT_SYMBOL(pci_iomap_range); > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 50 > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 51 > /** > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 52 * > pci_iomap_wc_range - create a virtual WC mapping cookie for a PCI BAR > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 53 * > @dev: PCI device that owns the BAR > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 54 * > @bar: BAR number > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 55 * > @offset: map memory at the given offset in BAR > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 56 * > @maxlen: max length of the memory to map > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 57 * > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 58 * > Using this function you will get a __iomem address to your device > BAR. > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 59 * > You can access it using ioread*() and iowrite*(). These functions > hide > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 60 * > the details if this is a MMIO or PIO address space and will just do > what > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 61 * > you expect from them in the correct way. When possible write > combining > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 62 * > is used. > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 63 * > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 64 * > @maxlen specifies the maximum length to map. If you want to get > access to > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 65 * > the complete BAR from offset to the end, pass %0 here. > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 66 * > */ > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 @67 > void __iomem *pci_iomap_wc_range(struct pci_dev *dev, > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 68 int bar, > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 69 unsigned long offset, > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 70 unsigned long maxlen) > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 71 { > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 72 resource_size_t start = pci_resource_start(dev, bar); > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 73 resource_size_t len = pci_resource_len(dev, bar); > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 74 unsigned long flags = pci_resource_flags(dev, bar); > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 75 > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 76 > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 77 if (flags & IORESOURCE_IO) > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 78 return NULL; > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 79 > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 80 if (len <= offset || !start) > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 81 return NULL; > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 82 > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 83 len -= offset; > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 84 start += offset; > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 85 if (maxlen && len > maxlen) > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 86 len = maxlen; > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 87 > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 88 if (flags & IORESOURCE_MEM) > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 89 return ioremap_wc(start, len); > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 90 > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 91 /* What? */ > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 92 return NULL; > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 93 } > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 94 > EXPORT_SYMBOL_GPL(pci_iomap_wc_range); > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 95 > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 96 > /** > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 97 * > pci_iomap - create a virtual mapping cookie for a PCI BAR > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 98 * > @dev: PCI device that owns the BAR > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 99 * > @bar: BAR number > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 100 * > @maxlen: length of the memory to map > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 101 * > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 102 * > Using this function you will get a __iomem address to your device > BAR. > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 103 * > You can access it using ioread*() and iowrite*(). These functions > hide > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 104 * > the details if this is a MMIO or PIO address space and will just do > what > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 105 * > you expect from them in the correct way. > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 106 * > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 107 * > @maxlen specifies the maximum length to map. If you want to get > access to > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 108 * > the complete BAR without checking for its length first, pass %0 here. > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 109 * > */ > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 @110 > void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long > maxlen) > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 111 { > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 > 112 return pci_iomap_range(dev, bar, 0, maxlen); > eb29d8d2aad706 lib/pci_iomap.c Michael S. Tsirkin 2013-05-29 113 } > 66eab4df288aae lib/pci_iomap.c Michael S. Tsirkin 2011-11-24 114 > EXPORT_SYMBOL(pci_iomap); > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 115 > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 116 > /** > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 117 * > pci_iomap_wc - create a virtual WC mapping cookie for a PCI BAR > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 118 * > @dev: PCI device that owns the BAR > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 119 * > @bar: BAR number > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 120 * > @maxlen: length of the memory to map > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 121 * > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 122 * > Using this function you will get a __iomem address to your device > BAR. > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 123 * > You can access it using ioread*() and iowrite*(). These functions > hide > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 124 * > the details if this is a MMIO or PIO address space and will just do > what > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 125 * > you expect from them in the correct way. When possible write > combining > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 126 * > is used. > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 127 * > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 128 * > @maxlen specifies the maximum length to map. If you want to get > access to > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 129 * > the complete BAR without checking for its length first, pass %0 here. > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 130 * > */ > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 @131 > void __iomem *pci_iomap_wc(struct pci_dev *dev, int bar, unsigned > long maxlen) > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 132 { > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 > 133 return pci_iomap_wc_range(dev, bar, 0, maxlen); > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 134 } > 1b3d4200c1e00a lib/pci_iomap.c Luis R. Rodriguez 2015-08-24 135 > EXPORT_SYMBOL_GPL(pci_iomap_wc); > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 136 > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 137 /* > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 138 * > pci_iounmap() somewhat illogically comes from lib/iomap.c for the > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 139 * > CONFIG_GENERIC_IOMAP case, because that's the code that knows about > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 140 * > the different IOMAP ranges. > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 141 * > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 142 * > But if the architecture does not use the generic iomap code, and if > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 143 * > it has _not_ defined it's own private pci_iounmap function, we define > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 144 * > it here. > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 145 * > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 146 * > NOTE! This default implementation assumes that if the architecture > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 147 * > support ioport mapping (HAS_IOPORT_MAP), the ioport mapping will > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 148 * > be fixed to the range [ PCI_IOBASE, PCI_IOBASE+IO_SPACE_LIMIT [, > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 149 * > and does not need unmapping with 'ioport_unmap()'. > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 150 * > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 151 * > If you have different rules for your architecture, you need to > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 152 * > implement your own pci_iounmap() that knows the rules for where > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 153 * > and how IO vs MEM get mapped. > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 154 * > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 155 * > This code is odd, and the ARCH_HAS/ARCH_WANTS #define logic comes > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 156 * > from legacy <asm-generic/io.h> header file behavior. In particular, > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 157 * > it would seem to make sense to do the iounmap(p) for the non-IO-space > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 158 * > case here regardless, but that's not what the old header file code > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 159 * > did. Probably incorrectly, but this is meant to be bug-for-bug > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 160 * > compatible. > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 161 > */ > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 162 > #if defined(ARCH_WANTS_GENERIC_PCI_IOUNMAP) > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 163 > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 @164 > void pci_iounmap(struct pci_dev *dev, void __iomem *p) > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 165 { > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 166 > #ifdef ARCH_HAS_GENERIC_IOPORT_MAP > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 > 167 uintptr_t start = (uintptr_t) PCI_IOBASE; > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 > 168 uintptr_t addr = (uintptr_t) p; > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 169 > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 > 170 if (addr >= start && addr < start + IO_SPACE_LIMIT) > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 > 171 return; > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 > 172 iounmap(p); > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 173 > #endif > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 174 } > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 175 > EXPORT_SYMBOL(pci_iounmap); > 316e8d79a0959c lib/pci_iomap.c Linus Torvalds 2021-09-19 176 >
Hi Philipp,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.7-rc2 next-20231121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com
patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
config: microblaze-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_MICROBLAZE-0-0 (https://download.01.org/0day-ci/archive/20231121/202311212127.jeMnVg3Y-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20231121/202311212127.jeMnVg3Y-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311212127.jeMnVg3Y-lkp@intel.com/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP when selected by MICROBLAZE
/usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory
{"timestamp":"2023-11-21 19:25:22 +0800", "level":"WARN", "event":"kbuild.sh:3942:in `add_etc_kcflags': grep exit 2 (ShellError)", "detail":"cmd: '/usr/bin/grep' '-v' '-e' '^#' '-e' '^$' '/db/releases/20231121182703/kernel-tests/etc/kcflags' \nstderr: /usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory\n\n", "hostname":"community-kbuild-consumer-171", "host_hostname":"lkp-worker56", "call_stack":"/zday/kernel-tests/lib/kbuild.sh:3942:in `add_etc_kcflags': /usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory (ShellError 2)\n from /zday/kernel-tests/lib/kbuild.sh:3971: setup_kcflags\n from /zday/kernel-tests/lib/kbuild.sh:4016: invoke_make\n from /zday/kernel-tests/lib/kbuild.sh:4122: make\n from /zday/kernel-tests/lib/kbuild.sh:5623: make_config_allyes\n from /zday/kernel-tests/common.sh:209: redirect_error_to_screen\n from /zday/kernel-tests/common.sh:217: redirect_command_errors\n from /zday/kernel-tests/lib/kbuild.sh:5630: make_config\n from /zday/kernel-tests/lib/builder/kismet.sh:156: generate_make_olddefconfig_warnings\n from /zday/kernel-tests/lib/builder/kismet.sh:297: builder_compile\n from /zday/kernel-tests/bisect-test-build-error.sh:94: main\n"}
WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP
Depends on [n]: PCI [=n]
Selected by [y]:
- MICROBLAZE [=y]
Hi Philipp,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.7-rc2 next-20231121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com
patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
config: openrisc-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_OPENRISC-0-0 (https://download.01.org/0day-ci/archive/20231121/202311212238.EIuwP56e-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20231121/202311212238.EIuwP56e-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311212238.EIuwP56e-lkp@intel.com/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP when selected by OPENRISC
/usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory
{"timestamp":"2023-11-21 20:53:27 +0800", "level":"WARN", "event":"kbuild.sh:3942:in `add_etc_kcflags': grep exit 2 (ShellError)", "detail":"cmd: '/usr/bin/grep' '-v' '-e' '^#' '-e' '^$' '/db/releases/20231121182703/kernel-tests/etc/kcflags' \nstderr: \n\n", "hostname":"community-kbuild-consumer-92", "host_hostname":"lkp-worker20", "call_stack":"/zday/kernel-tests/lib/kbuild.sh:3942:in `add_etc_kcflags': (ShellError 2)\n from /zday/kernel-tests/lib/kbuild.sh:3971: setup_kcflags\n from /zday/kernel-tests/lib/kbuild.sh:4016: invoke_make\n from /zday/kernel-tests/lib/kbuild.sh:4122: make\n from /zday/kernel-tests/lib/kbuild.sh:5623: make_config_allyes\n from /zday/kernel-tests/common.sh:209: redirect_error_to_screen\n from /zday/kernel-tests/common.sh:217: redirect_command_errors\n from /zday/kernel-tests/lib/kbuild.sh:5630: make_config\n from /zday/kernel-tests/lib/builder/kismet.sh:156: generate_make_olddefconfig_warnings\n from /zday/kernel-tests/lib/builder/kismet.sh:297: builder_compile\n from /zday/kernel-tests/bisect-test-build-error.sh:94: main\n"}
WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP
Depends on [n]: PCI [=n]
Selected by [y]:
- OPENRISC [=y]
Hi Philipp,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.7-rc2 next-20231121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com
patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
config: xtensa-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_XTENSA-0-0 (https://download.01.org/0day-ci/archive/20231121/202311212224.Qx83PUeQ-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20231121/202311212224.Qx83PUeQ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311212224.Qx83PUeQ-lkp@intel.com/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP when selected by XTENSA
/usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory
{"timestamp":"2023-11-21 22:03:27 +0800", "level":"WARN", "event":"kbuild.sh:3942:in `add_etc_kcflags': grep exit 2 (ShellError)", "detail":"cmd: '/usr/bin/grep' '-v' '-e' '^#' '-e' '^$' '/db/releases/20231121182703/kernel-tests/etc/kcflags' \nstderr: /usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory\n\n", "hostname":"community-kbuild-consumer-121", "host_hostname":"lkp-worker32", "call_stack":"/zday/kernel-tests/lib/kbuild.sh:3942:in `add_etc_kcflags': /usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory (ShellError 2)\n from /zday/kernel-tests/lib/kbuild.sh:3971: setup_kcflags\n from /zday/kernel-tests/lib/kbuild.sh:4016: invoke_make\n from /zday/kernel-tests/lib/kbuild.sh:4122: make\n from /zday/kernel-tests/lib/kbuild.sh:5623: make_config_allyes\n from /zday/kernel-tests/common.sh:209: redirect_error_to_screen\n from /zday/kernel-tests/common.sh:217: redirect_command_errors\n from /zday/kernel-tests/lib/kbuild.sh:5630: make_config\n from /zday/kernel-tests/lib/builder/kismet.sh:156: generate_make_olddefconfig_warnings\n from /zday/kernel-tests/lib/builder/kismet.sh:297: builder_compile\n from /zday/kernel-tests/bisect-test-build-error.sh:94: main\n"}
WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP
Depends on [n]: PCI [=n]
Selected by [y]:
- XTENSA [=y]
Hi Philipp,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.7-rc2 next-20231121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com
patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
config: parisc-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_PARISC-0-0 (https://download.01.org/0day-ci/archive/20231121/202311212322.TOIJ8Pcg-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20231121/202311212322.TOIJ8Pcg-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311212322.TOIJ8Pcg-lkp@intel.com/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP when selected by PARISC
/usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory
{"timestamp":"2023-11-21 21:16:41 +0800", "level":"WARN", "event":"kbuild.sh:3942:in `add_etc_kcflags': grep exit 2 (ShellError)", "detail":"cmd: '/usr/bin/grep' '-v' '-e' '^#' '-e' '^$' '/db/releases/20231121182703/kernel-tests/etc/kcflags' \nstderr: /usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory\n\n", "hostname":"community-kbuild-consumer-161", "host_hostname":"lkp-worker22", "call_stack":"/zday/kernel-tests/lib/kbuild.sh:3942:in `add_etc_kcflags': /usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory (ShellError 2)\n from /zday/kernel-tests/lib/kbuild.sh:3971: setup_kcflags\n from /zday/kernel-tests/lib/kbuild.sh:4016: invoke_make\n from /zday/kernel-tests/lib/kbuild.sh:4122: make\n from /zday/kernel-tests/lib/kbuild.sh:5623: make_config_allyes\n from /zday/kernel-tests/common.sh:209: redirect_error_to_screen\n from /zday/kernel-tests/common.sh:217: redirect_command_errors\n from /zday/kernel-tests/lib/kbuild.sh:5630: make_config\n from /zday/kernel-tests/lib/builder/kismet.sh:156: generate_make_olddefconfig_warnings\n from /zday/kernel-tests/lib/builder/kismet.sh:297: builder_compile\n from /zday/kernel-tests/bisect-test-build-error.sh:94: main\n"}
WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP
Depends on [n]: PCI [=n]
Selected by [y]:
- PARISC [=y]
Hi Philipp,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.7-rc2 next-20231121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com
patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
config: sparc64-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_SPARC-0-0 (https://download.01.org/0day-ci/archive/20231121/202311212316.a0awwkaE-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20231121/202311212316.a0awwkaE-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311212316.a0awwkaE-lkp@intel.com/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP when selected by SPARC
/usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory
{"timestamp":"2023-11-21 22:16:15 +0800", "level":"WARN", "event":"kbuild.sh:3942:in `add_etc_kcflags': grep exit 2 (ShellError)", "detail":"cmd: '/usr/bin/grep' '-v' '-e' '^#' '-e' '^$' '/db/releases/20231121182703/kernel-tests/etc/kcflags' \nstderr: /usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory\n\n", "hostname":"community-kbuild-consumer-123", "host_hostname":"lkp-worker50", "call_stack":"/zday/kernel-tests/lib/kbuild.sh:3942:in `add_etc_kcflags': /usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory (ShellError 2)\n from /zday/kernel-tests/lib/kbuild.sh:3971: setup_kcflags\n from /zday/kernel-tests/lib/kbuild.sh:4016: invoke_make\n from /zday/kernel-tests/lib/kbuild.sh:4122: make\n from /zday/kernel-tests/lib/kbuild.sh:5623: make_config_allyes\n from /zday/kernel-tests/common.sh:209: redirect_error_to_screen\n from /zday/kernel-tests/common.sh:217: redirect_command_errors\n from /zday/kernel-tests/lib/kbuild.sh:5630: make_config\n from /zday/kernel-tests/lib/builder/kismet.sh:156: generate_make_olddefconfig_warnings\n from /zday/kernel-tests/lib/builder/kismet.sh:297: builder_compile\n from /zday/kernel-tests/bisect-test-build-error.sh:94: main\n"}
WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP
Depends on [n]: PCI [=n]
Selected by [y]:
- SPARC [=y]
Please kindly ignore these duplicate reports. There seems to be a bug in the robot and we will fix this ASAP. Sorry for the noise. On Tue, 2023-11-21 at 23:56 +0800, kernel test robot wrote: > Hi Philipp, > > kernel test robot noticed the following build warnings: > > [auto build test WARNING on pci/next] > [also build test WARNING on pci/for-linus linus/master v6.7-rc2 next- > 20231121] > [If your patch is applied to the wrong git tree, kindly drop us a > note. > And when submitting patch, we suggest to use '--base' as documented > in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: > https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258 > base: > https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next > patch link: > https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com > patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/ > config: sparc64-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_SPARC-0-0 > (https://download.01.org/0day-ci/archive/20231121/202311212316.a0awwk > aE-lkp@intel.com/config) > reproduce: > (https://download.01.org/0day-ci/archive/20231121/202311212316.a0awwk > aE-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new > version of > the same patch/commit), kindly add following tags > > Reported-by: kernel test robot <lkp@intel.com> > > Closes: > > https://lore.kernel.org/oe-kbuild-all/202311212316.a0awwkaE-lkp@intel.com/ > > kismet warnings: (new ones prefixed by >>) > > > kismet: WARNING: unmet direct dependencies detected for > > > GENERIC_PCI_IOMAP when selected by SPARC > /usr/bin/grep: /db/releases/20231121182703/kernel- > tests/etc/kcflags: No such file or directory > {"timestamp":"2023-11-21 22:16:15 +0800", "level":"WARN", > "event":"kbuild.sh:3942:in `add_etc_kcflags': grep exit 2 > (ShellError)", "detail":"cmd: '/usr/bin/grep' '-v' '-e' '^#' '-e' > '^$' '/db/releases/20231121182703/kernel-tests/etc/kcflags' \nstderr: > /usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: > No such file or directory\n\n", "hostname":"community-kbuild- > consumer-123", "host_hostname":"lkp-worker50", > "call_stack":"/zday/kernel-tests/lib/kbuild.sh:3942:in > `add_etc_kcflags': /usr/bin/grep: /db/releases/20231121182703/kernel- > tests/etc/kcflags: No such file or directory (ShellError 2)\n from > /zday/kernel-tests/lib/kbuild.sh:3971: setup_kcflags\n from > /zday/kernel-tests/lib/kbuild.sh:4016: invoke_make\n from > /zday/kernel-tests/lib/kbuild.sh:4122: make\n from /zday/kernel- > tests/lib/kbuild.sh:5623: make_config_allyes\n from /zday/kernel- > tests/common.sh:209: redirect_error_to_screen\n from /zday/kernel- > tests/common.sh:217: redirect_command_errors\n from /zday/kernel- > tests/lib/kbuild.sh:5630: make_config\n from /zday/kernel- > tests/lib/builder/kismet.sh:156: > generate_make_olddefconfig_warnings\n from /zday/kernel- > tests/lib/builder/kismet.sh:297: builder_compile\n from > /zday/kernel-tests/bisect-test-build-error.sh:94: main\n"} > > WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP > Depends on [n]: PCI [=n] > Selected by [y]: > - SPARC [=y] >
On Wed, 2023-11-22 at 01:51 +0000, Liu, Yujie wrote: > Please kindly ignore these duplicate reports. There seems to be a bug > in the robot and we will fix this ASAP. Sorry for the noise. They are not exactly duplicates, I think. You notice that by the mails' bottoms: Mail N: WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP Depends on [n]: PCI [=n] Selected by [y]: - SPARC [=y] Mail N-1: WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP Depends on [n]: PCI [=n] Selected by [y]: - PARISC [=y] etc... So it seems to me that it's testing all the architectures and then sends an email for each one where the build fails. P. > > On Tue, 2023-11-21 at 23:56 +0800, kernel test robot wrote: > > Hi Philipp, > > > > kernel test robot noticed the following build warnings: > > > > [auto build test WARNING on pci/next] > > [also build test WARNING on pci/for-linus linus/master v6.7-rc2 > > next- > > 20231121] > > [If your patch is applied to the wrong git tree, kindly drop us a > > note. > > And when submitting patch, we suggest to use '--base' as documented > > in > > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > > > url: > > https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258 > > base: > > https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next > > patch link: > > https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com > > patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/ > > config: sparc64-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_SPARC-0-0 > > ( > > https://download.01.org/0day-ci/archive/20231121/202311212316.a0awwk > > aE-lkp@intel.com/config) > > reproduce: > > ( > > https://download.01.org/0day-ci/archive/20231121/202311212316.a0awwk > > aE-lkp@intel.com/reproduce) > > > > If you fix the issue in a separate patch/commit (i.e. not just a > > new > > version of > > the same patch/commit), kindly add following tags > > > Reported-by: kernel test robot <lkp@intel.com> > > > Closes: > > > https://lore.kernel.org/oe-kbuild-all/202311212316.a0awwkaE-lkp@intel.com/ > > > > kismet warnings: (new ones prefixed by >>) > > > > kismet: WARNING: unmet direct dependencies detected for > > > > GENERIC_PCI_IOMAP when selected by SPARC > > /usr/bin/grep: /db/releases/20231121182703/kernel- > > tests/etc/kcflags: No such file or directory > > {"timestamp":"2023-11-21 22:16:15 +0800", "level":"WARN", > > "event":"kbuild.sh:3942:in `add_etc_kcflags': grep exit 2 > > (ShellError)", "detail":"cmd: '/usr/bin/grep' '-v' '-e' '^#' '-e' > > '^$' '/db/releases/20231121182703/kernel-tests/etc/kcflags' > > \nstderr: > > /usr/bin/grep: /db/releases/20231121182703/kernel- > > tests/etc/kcflags: > > No such file or directory\n\n", "hostname":"community-kbuild- > > consumer-123", "host_hostname":"lkp-worker50", > > "call_stack":"/zday/kernel-tests/lib/kbuild.sh:3942:in > > `add_etc_kcflags': /usr/bin/grep: > > /db/releases/20231121182703/kernel- > > tests/etc/kcflags: No such file or directory (ShellError 2)\n from > > /zday/kernel-tests/lib/kbuild.sh:3971: setup_kcflags\n from > > /zday/kernel-tests/lib/kbuild.sh:4016: invoke_make\n from > > /zday/kernel-tests/lib/kbuild.sh:4122: make\n from /zday/kernel- > > tests/lib/kbuild.sh:5623: make_config_allyes\n from /zday/kernel- > > tests/common.sh:209: redirect_error_to_screen\n from /zday/kernel- > > tests/common.sh:217: redirect_command_errors\n from /zday/kernel- > > tests/lib/kbuild.sh:5630: make_config\n from /zday/kernel- > > tests/lib/builder/kismet.sh:156: > > generate_make_olddefconfig_warnings\n from /zday/kernel- > > tests/lib/builder/kismet.sh:297: builder_compile\n from > > /zday/kernel-tests/bisect-test-build-error.sh:94: main\n"} > > > > WARNING: unmet direct dependencies detected for > > GENERIC_PCI_IOMAP > > Depends on [n]: PCI [=n] > > Selected by [y]: > > - SPARC [=y] > > >
Hi Philipp,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pci/next]
[also build test WARNING on pci/for-linus linus/master v6.7-rc2 next-20231122]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com
patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
config: csky-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_CSKY-0-0 (https://download.01.org/0day-ci/archive/20231122/202311222251.miLTgMyd-lkp@intel.com/config)
reproduce: (https://download.01.org/0day-ci/archive/20231122/202311222251.miLTgMyd-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311222251.miLTgMyd-lkp@intel.com/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP when selected by CSKY
/usr/bin/grep: /db/releases/20231122101355/kernel-tests/etc/kcflags: No such file or directory
{"timestamp":"2023-11-22 12:45:55 +0800", "level":"WARN", "event":"kbuild.sh:3942:in `add_etc_kcflags': grep exit 2 (ShellError)", "detail":"cmd: '/usr/bin/grep' '-v' '-e' '^#' '-e' '^$' '/db/releases/20231122101355/kernel-tests/etc/kcflags' \nstderr: /usr/bin/grep: /db/releases/20231122101355/kernel-tests/etc/kcflags: No such file or directory\n\n", "hostname":"community-kbuild-consumer-56", "host_hostname":"lkp-worker31", "call_stack":"/zday/kernel-tests/lib/kbuild.sh:3942:in `add_etc_kcflags': /usr/bin/grep: /db/releases/20231122101355/kernel-tests/etc/kcflags: No such file or directory (ShellError 2)\n from /zday/kernel-tests/lib/kbuild.sh:3971: setup_kcflags\n from /zday/kernel-tests/lib/kbuild.sh:4016: invoke_make\n from /zday/kernel-tests/lib/kbuild.sh:4122: make\n from /zday/kernel-tests/lib/kbuild.sh:5623: make_config_allyes\n from /zday/kernel-tests/common.sh:209: redirect_error_to_screen\n from /zday/kernel-tests/common.sh:217: redirect_command_errors\n from /zday/kernel-tests/lib/kbuild.sh:5630: make_config\n from /zday/kernel-tests/lib/builder/kismet.sh:156: generate_make_olddefconfig_warnings\n from /zday/kernel-tests/lib/builder/kismet.sh:297: builder_compile\n from /zday/kernel-tests/bisect-test-build-error.sh:94: main\n"}
WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP
Depends on [n]: PCI [=n]
Selected by [y]:
- CSKY [=y]
Hi Philipp, On Wed, Nov 22, 2023 at 09:15:52AM +0100, Philipp Stanner wrote: > On Wed, 2023-11-22 at 01:51 +0000, Liu, Yujie wrote: > > Please kindly ignore these duplicate reports. There seems to be a bug > > in the robot and we will fix this ASAP. Sorry for the noise. > > They are not exactly duplicates, I think. You notice that by the mails' > bottoms: > > Mail N: > WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP > Depends on [n]: PCI [=n] > Selected by [y]: > - SPARC [=y] > > Mail N-1: > WARNING: unmet direct dependencies detected for GENERIC_PCI_IOMAP > Depends on [n]: PCI [=n] > Selected by [y]: > - PARISC [=y] > > etc... > > So it seems to me that it's testing all the architectures and then > sends an email for each one where the build fails. Thanks for the feedback. Yes, it was testing on various architectures so they were considered as different unique issues, and a separate report was sent out for each of them. However, there is some noise info in the report as shown below, which indicates a bug in the bot. We will fix this ASAP. /usr/bin/grep: /db/releases/20231121182703/kernel-tests/etc/kcflags: No such file or directory {"timestamp":"2023-11-21 22:16:15 +0800", "level":"WARN", "event":"kbuild.sh:3942:in `add_etc_kcflags': grep exit 2 (ShellError)", Best Regards, Yujie > > P. > > > > > On Tue, 2023-11-21 at 23:56 +0800, kernel test robot wrote: > > > Hi Philipp, > > > > > > kernel test robot noticed the following build warnings: > > > > > > [auto build test WARNING on pci/next] > > > [also build test WARNING on pci/for-linus linus/master v6.7-rc2 > > > next- > > > 20231121] > > > [If your patch is applied to the wrong git tree, kindly drop us a > > > note. > > > And when submitting patch, we suggest to use '--base' as documented > > > in > > > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > > > > > url: > > > https://github.com/intel-lab-lkp/linux/commits/Philipp-Stanner/lib-move-pci_iomap-c-to-drivers-pci/20231121-060258 > > > base: > > > https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next > > > patch link: > > > https://lore.kernel.org/r/20231120215945.52027-3-pstanner%40redhat.com > > > patch subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/ > > > config: sparc64-kismet-CONFIG_GENERIC_PCI_IOMAP-CONFIG_SPARC-0-0 > > > ( > > > https://download.01.org/0day-ci/archive/20231121/202311212316.a0awwk > > > aE-lkp@intel.com/config) > > > reproduce: > > > ( > > > https://download.01.org/0day-ci/archive/20231121/202311212316.a0awwk > > > aE-lkp@intel.com/reproduce) > > > > > > If you fix the issue in a separate patch/commit (i.e. not just a > > > new > > > version of > > > the same patch/commit), kindly add following tags > > > > Reported-by: kernel test robot <lkp@intel.com> > > > > Closes: > > > > https://lore.kernel.org/oe-kbuild-all/202311212316.a0awwkaE-lkp@intel.com/ > > > > > > kismet warnings: (new ones prefixed by >>) > > > > > kismet: WARNING: unmet direct dependencies detected for > > > > > GENERIC_PCI_IOMAP when selected by SPARC > > > /usr/bin/grep: /db/releases/20231121182703/kernel- > > > tests/etc/kcflags: No such file or directory > > > {"timestamp":"2023-11-21 22:16:15 +0800", "level":"WARN", > > > "event":"kbuild.sh:3942:in `add_etc_kcflags': grep exit 2 > > > (ShellError)", "detail":"cmd: '/usr/bin/grep' '-v' '-e' '^#' '-e' > > > '^$' '/db/releases/20231121182703/kernel-tests/etc/kcflags' > > > \nstderr: > > > /usr/bin/grep: /db/releases/20231121182703/kernel- > > > tests/etc/kcflags: > > > No such file or directory\n\n", "hostname":"community-kbuild- > > > consumer-123", "host_hostname":"lkp-worker50", > > > "call_stack":"/zday/kernel-tests/lib/kbuild.sh:3942:in > > > `add_etc_kcflags': /usr/bin/grep: > > > /db/releases/20231121182703/kernel- > > > tests/etc/kcflags: No such file or directory (ShellError 2)\n from > > > /zday/kernel-tests/lib/kbuild.sh:3971: setup_kcflags\n from > > > /zday/kernel-tests/lib/kbuild.sh:4016: invoke_make\n from > > > /zday/kernel-tests/lib/kbuild.sh:4122: make\n from /zday/kernel- > > > tests/lib/kbuild.sh:5623: make_config_allyes\n from /zday/kernel- > > > tests/common.sh:209: redirect_error_to_screen\n from /zday/kernel- > > > tests/common.sh:217: redirect_command_errors\n from /zday/kernel- > > > tests/lib/kbuild.sh:5630: make_config\n from /zday/kernel- > > > tests/lib/builder/kismet.sh:156: > > > generate_make_olddefconfig_warnings\n from /zday/kernel- > > > tests/lib/builder/kismet.sh:297: builder_compile\n from > > > /zday/kernel-tests/bisect-test-build-error.sh:94: main\n"} > > > > > > WARNING: unmet direct dependencies detected for > > > GENERIC_PCI_IOMAP > > > Depends on [n]: PCI [=n] > > > Selected by [y]: > > > - SPARC [=y] > > > > > > >
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 74147262625b..b54cacbc1160 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -34,6 +34,9 @@ config PCI_DOMAINS_GENERIC config PCI_SYSCALL bool +config GENERIC_PCI_IOMAP + bool + source "drivers/pci/pcie/Kconfig" config PCI_MSI diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index cc8b4e01e29d..d6d0abfe59e2 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile @@ -33,6 +33,7 @@ obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += xen-pcifront.o obj-$(CONFIG_VGA_ARB) += vgaarb.o obj-$(CONFIG_PCI_DOE) += doe.o obj-$(CONFIG_PCI_DYNAMIC_OF_NODES) += of_property.o +obj-$(CONFIG_GENERIC_PCI_IOMAP) += iomap.o # Endpoint library must be initialized before its users obj-$(CONFIG_PCI_ENDPOINT) += endpoint/ diff --git a/lib/pci_iomap.c b/drivers/pci/iomap.c similarity index 99% rename from lib/pci_iomap.c rename to drivers/pci/iomap.c index ce39ce9f3526..0a9d503ba533 100644 --- a/lib/pci_iomap.c +++ b/drivers/pci/iomap.c @@ -9,7 +9,6 @@ #include <linux/export.h> -#ifdef CONFIG_PCI /** * pci_iomap_range - create a virtual mapping cookie for a PCI BAR * @dev: PCI device that owns the BAR @@ -176,5 +175,3 @@ void pci_iounmap(struct pci_dev *dev, void __iomem *p) EXPORT_SYMBOL(pci_iounmap); #endif /* ARCH_WANTS_GENERIC_PCI_IOUNMAP */ - -#endif /* CONFIG_PCI */ diff --git a/lib/Kconfig b/lib/Kconfig index 3ea1c830efab..1bf859166ac7 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -70,9 +70,6 @@ source "lib/math/Kconfig" config NO_GENERIC_PCI_IOPORT_MAP bool -config GENERIC_PCI_IOMAP - bool - config GENERIC_IOMAP bool select GENERIC_PCI_IOMAP diff --git a/lib/Makefile b/lib/Makefile index 6b09731d8e61..0800289ec6c5 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -153,7 +153,6 @@ CFLAGS_debug_info.o += $(call cc-option, -femit-struct-debug-detailed=any) obj-y += math/ crypto/ obj-$(CONFIG_GENERIC_IOMAP) += iomap.o -obj-$(CONFIG_GENERIC_PCI_IOMAP) += pci_iomap.o obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
This file is guarded by an #ifdef CONFIG_PCI. It, consequently, does not belong to lib/ because it is not generic infrastructure. Move the file to drivers/pci/ and implement the necessary changes to Makefiles and Kconfigs. Suggested-by: Danilo Krummrich <dakr@redhat.com> Signed-off-by: Philipp Stanner <pstanner@redhat.com> --- drivers/pci/Kconfig | 3 +++ drivers/pci/Makefile | 1 + lib/pci_iomap.c => drivers/pci/iomap.c | 3 --- lib/Kconfig | 3 --- lib/Makefile | 1 - 5 files changed, 4 insertions(+), 7 deletions(-) rename lib/pci_iomap.c => drivers/pci/iomap.c (99%)