arch/s390/include/asm/bitops.h:112:4: error: invalid operand in inline asm: 'xi $0,${1:b}'
From: kernel test robot
Date: Thu Jul 02 2020 - 11:30:40 EST
Hi Nikolay,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cd77006e01b3198c75fb7819b3d0ff89709539bb
commit: e0458d9a733ba71a2821d0c3fc0745baac697db0 net: bridge: fdb: convert is_sticky to bitops
date: 8 months ago
config: s390-randconfig-r036-20200701 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 003a086ffc0d1affbb8300b36225fb8150a2d40a)
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
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
git checkout e0458d9a733ba71a2821d0c3fc0745baac697db0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:118:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from net/bridge/br_fdb.c:15:
In file included from include/linux/netdevice.h:37:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:118:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from net/bridge/br_fdb.c:15:
In file included from include/linux/netdevice.h:37:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from net/bridge/br_fdb.c:15:
In file included from include/linux/netdevice.h:37:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:76:
include/asm-generic/io.h:503:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:513:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew(cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:523:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel(cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:585:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:593:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:601:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:610:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:619:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:628:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from net/bridge/br_fdb.c:10:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:26:
arch/s390/include/asm/bitops.h:69:4: error: invalid operand in inline asm: 'oi $0,${1:b}'
"oi %0,%b1\n"
^
arch/s390/include/asm/bitops.h:69:4: error: invalid operand in inline asm: 'oi $0,${1:b}'
error: invalid operand in inline asm: 'ni $0,${1:b}'
arch/s390/include/asm/bitops.h:69:4: error: invalid operand in inline asm: 'oi $0,${1:b}'
>> arch/s390/include/asm/bitops.h:112:4: error: invalid operand in inline asm: 'xi $0,${1:b}'
"xi %0,%b1\n"
^
arch/s390/include/asm/bitops.h:90:4: error: invalid operand in inline asm: 'ni $0,${1:b}'
"ni %0,%b1\n"
^
20 warnings and 6 errors generated.
vim +112 arch/s390/include/asm/bitops.h
370b0b5f7744d6 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-16 58
b4fd5a0a9295d8 arch/s390/include/asm/bitops.h Heiko Carstens 2019-10-04 59 static __always_inline void arch_set_bit(unsigned long nr, volatile unsigned long *ptr)
^1da177e4c3f41 include/asm-s390/bitops.h Linus Torvalds 2005-04-16 60 {
370b0b5f7744d6 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-16 61 unsigned long *addr = __bitops_word(nr, ptr);
370b0b5f7744d6 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-16 62 unsigned long mask;
^1da177e4c3f41 include/asm-s390/bitops.h Linus Torvalds 2005-04-16 63
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 64 #ifdef CONFIG_HAVE_MARCH_ZEC12_FEATURES
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 65 if (__builtin_constant_p(nr)) {
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 66 unsigned char *caddr = __bitops_byte(nr, ptr);
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 67
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 68 asm volatile(
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 @69 "oi %0,%b1\n"
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 70 : "+Q" (*caddr)
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 71 : "i" (1 << (nr & 7))
0ccc8b7ac86053 arch/s390/include/asm/bitops.h Heiko Carstens 2014-03-20 72 : "cc", "memory");
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 73 return;
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 74 }
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 75 #endif
01c2475f6d959e arch/s390/include/asm/bitops.h Akinobu Mita 2013-03-23 76 mask = 1UL << (nr & (BITS_PER_LONG - 1));
4ae987894c0605 arch/s390/include/asm/bitops.h Arnd Bergmann 2019-04-15 77 __atomic64_or(mask, (long *)addr);
^1da177e4c3f41 include/asm-s390/bitops.h Linus Torvalds 2005-04-16 78 }
^1da177e4c3f41 include/asm-s390/bitops.h Linus Torvalds 2005-04-16 79
b4fd5a0a9295d8 arch/s390/include/asm/bitops.h Heiko Carstens 2019-10-04 80 static __always_inline void arch_clear_bit(unsigned long nr, volatile unsigned long *ptr)
^1da177e4c3f41 include/asm-s390/bitops.h Linus Torvalds 2005-04-16 81 {
370b0b5f7744d6 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-16 82 unsigned long *addr = __bitops_word(nr, ptr);
370b0b5f7744d6 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-16 83 unsigned long mask;
^1da177e4c3f41 include/asm-s390/bitops.h Linus Torvalds 2005-04-16 84
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 85 #ifdef CONFIG_HAVE_MARCH_ZEC12_FEATURES
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 86 if (__builtin_constant_p(nr)) {
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 87 unsigned char *caddr = __bitops_byte(nr, ptr);
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 88
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 89 asm volatile(
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 90 "ni %0,%b1\n"
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 91 : "+Q" (*caddr)
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 92 : "i" (~(1 << (nr & 7)))
0ccc8b7ac86053 arch/s390/include/asm/bitops.h Heiko Carstens 2014-03-20 93 : "cc", "memory");
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 94 return;
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 95 }
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 96 #endif
01c2475f6d959e arch/s390/include/asm/bitops.h Akinobu Mita 2013-03-23 97 mask = ~(1UL << (nr & (BITS_PER_LONG - 1)));
4ae987894c0605 arch/s390/include/asm/bitops.h Arnd Bergmann 2019-04-15 98 __atomic64_and(mask, (long *)addr);
^1da177e4c3f41 include/asm-s390/bitops.h Linus Torvalds 2005-04-16 99 }
^1da177e4c3f41 include/asm-s390/bitops.h Linus Torvalds 2005-04-16 100
b4fd5a0a9295d8 arch/s390/include/asm/bitops.h Heiko Carstens 2019-10-04 101 static __always_inline void arch_change_bit(unsigned long nr,
9779048d71b18e arch/s390/include/asm/bitops.h Vasily Gorbik 2019-07-14 102 volatile unsigned long *ptr)
^1da177e4c3f41 include/asm-s390/bitops.h Linus Torvalds 2005-04-16 103 {
370b0b5f7744d6 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-16 104 unsigned long *addr = __bitops_word(nr, ptr);
370b0b5f7744d6 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-16 105 unsigned long mask;
^1da177e4c3f41 include/asm-s390/bitops.h Linus Torvalds 2005-04-16 106
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 107 #ifdef CONFIG_HAVE_MARCH_ZEC12_FEATURES
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 108 if (__builtin_constant_p(nr)) {
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 109 unsigned char *caddr = __bitops_byte(nr, ptr);
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 110
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 111 asm volatile(
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 @112 "xi %0,%b1\n"
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 113 : "+Q" (*caddr)
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 114 : "i" (1 << (nr & 7))
0ccc8b7ac86053 arch/s390/include/asm/bitops.h Heiko Carstens 2014-03-20 115 : "cc", "memory");
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 116 return;
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 117 }
4ae803253e4649 arch/s390/include/asm/bitops.h Heiko Carstens 2013-09-17 118 #endif
01c2475f6d959e arch/s390/include/asm/bitops.h Akinobu Mita 2013-03-23 119 mask = 1UL << (nr & (BITS_PER_LONG - 1));
4ae987894c0605 arch/s390/include/asm/bitops.h Arnd Bergmann 2019-04-15 120 __atomic64_xor(mask, (long *)addr);
^1da177e4c3f41 include/asm-s390/bitops.h Linus Torvalds 2005-04-16 121 }
^1da177e4c3f41 include/asm-s390/bitops.h Linus Torvalds 2005-04-16 122
:::::: The code at line 112 was first introduced by commit
:::::: 4ae803253e4649803dc6e972bb5e59fc107cf474 s390/bitops: optimize set_bit() for constant values
:::::: TO: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
:::::: CC: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip