tree:
https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git
testing/pci_iounmap-fix
head: 442fc3646b69a4da912452fd6b79a4615d47eb88
commit: 442fc3646b69a4da912452fd6b79a4615d47eb88 [1/1] asm-generic: Fix default
pci_iounmap() generic implementation
config: sparc64-randconfig-m031-20200911 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 442fc3646b69a4da912452fd6b79a4615d47eb88
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from arch/sparc/include/asm/io_32.h:14,
from arch/sparc/include/asm/io.h:7,
from arch/sparc/vdso/vdso32/../vclock_gettime.c:18,
from arch/sparc/vdso/vdso32/vclock_gettime.c:22:
include/asm-generic/io.h: In function '__pci_ioport_unmap':
include/asm-generic/io.h:1010:8: warning: ordered comparison of pointer with null
pointer [-Wextra]
1010 | if (p >= PCI_IOBASE && p < PCI_IOBASE + IO_SPACE_LIMIT)
| ^~
> include/asm-generic/io.h:1012:2: error: implicit declaration of
function 'iounmap'; did you mean 'vunmap'?
[-Werror=implicit-function-declaration]
1012 | iounmap(p);
| ^~~~~~~
| vunmap
In file included from arch/sparc/include/asm/io.h:7,
from arch/sparc/vdso/vdso32/../vclock_gettime.c:18,
from arch/sparc/vdso/vdso32/vclock_gettime.c:22:
arch/sparc/include/asm/io_32.h: At top level:
> arch/sparc/include/asm/io_32.h:131:6: warning: conflicting types
for 'iounmap'
131 | void iounmap(volatile void __iomem *addr);
| ^~~~~~~
In file included from arch/sparc/include/asm/io_32.h:14,
from arch/sparc/include/asm/io.h:7,
from arch/sparc/vdso/vdso32/../vclock_gettime.c:18,
from arch/sparc/vdso/vdso32/vclock_gettime.c:22:
include/asm-generic/io.h:1012:2: note: previous implicit declaration of
'iounmap' was here
1012 | iounmap(p);
| ^~~~~~~
In file included from arch/sparc/vdso/vdso32/vclock_gettime.c:22:
arch/sparc/vdso/vdso32/../vclock_gettime.c:254:1: warning: no previous prototype for
'__vdso_clock_gettime' [-Wmissing-prototypes]
254 | __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts)
| ^~~~~~~~~~~~~~~~~~~~
arch/sparc/vdso/vdso32/../vclock_gettime.c:282:1: warning: no previous prototype for
'__vdso_clock_gettime_stick' [-Wmissing-prototypes]
282 | __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/sparc/vdso/vdso32/../vclock_gettime.c:307:1: warning: no previous prototype for
'__vdso_gettimeofday' [-Wmissing-prototypes]
307 | __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
| ^~~~~~~~~~~~~~~~~~~
arch/sparc/vdso/vdso32/../vclock_gettime.c:343:1: warning: no previous prototype for
'__vdso_gettimeofday_stick' [-Wmissing-prototypes]
343 | __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone
*tz)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
#
https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git/comm...
git remote add lpieralisi
https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git
git fetch --no-tags lpieralisi testing/pci_iounmap-fix
git checkout 442fc3646b69a4da912452fd6b79a4615d47eb88
vim +1012 include/asm-generic/io.h
997
998 #ifdef CONFIG_HAS_IOPORT_MAP
999 #ifndef CONFIG_GENERIC_IOMAP
1000 #ifndef ioport_map
1001 #define ioport_map ioport_map
1002 static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
1003 {
1004 port &= IO_SPACE_LIMIT;
1005 return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
1006 }
1007 #define __pci_ioport_unmap __pci_ioport_unmap
1008 static inline void __pci_ioport_unmap(void __iomem *p)
1009 {
1010 if (p >= PCI_IOBASE && p < PCI_IOBASE + IO_SPACE_LIMIT)
1011 return;
1012 iounmap(p);
1013 }
1014 #endif
1015
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org