* Re: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
[not found] <20231120215945.52027-3-pstanner@redhat.com>
@ 2023-11-21 6:48 ` kernel test robot
2023-11-21 7:22 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-11-21 6:48 UTC (permalink / raw)
To: Philipp Stanner, Bjorn Helgaas, Arnd Bergmann, Andrew Morton,
Randy Dunlap, Jason Gunthorpe, Eric Auger, Kent Overstreet,
Niklas Schnelle, NeilBrown, John Sanpe, Dave Jiang, Yury Norov,
Kees Cook, Masami Hiramatsu (Google), David Gow, Herbert Xu,
Thomas Gleixner, wuqiang.matt, Jason Baron, Ben Dooks,
Danilo Krummrich
Cc: llvm, oe-kbuild-all, Linux Memory Management List, linux-kernel,
linux-pci
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
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
2023-11-21 6:48 ` [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/ kernel test robot
@ 2023-11-21 7:22 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2023-11-21 7:22 UTC (permalink / raw)
To: kernel test robot, Philipp Stanner, Bjorn Helgaas, Andrew Morton,
Randy Dunlap, Jason Gunthorpe, Eric Auger, Kent Overstreet,
Niklas Schnelle, Neil Brown, John Sanpe, Dave Jiang, Yury Norov,
Kees Cook, Masami Hiramatsu, David Gow, Herbert Xu,
Thomas Gleixner, wuqiang.matt, Jason Baron, Ben Dooks,
Danilo Krummrich
Cc: llvm, oe-kbuild-all, Linux Memory Management List, linux-kernel,
linux-pci
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-21 7:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20231120215945.52027-3-pstanner@redhat.com>
2023-11-21 6:48 ` [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/ kernel test robot
2023-11-21 7:22 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox