Content-Type: multipart/mixed; boundary="===============4865558053950003021==" MIME-Version: 1.0 From: Jisheng Zhang To: kbuild-all@lists.01.org Subject: Re: [PATCH 1/2] riscv: consolidate __ex_table construction Date: Wed, 20 Oct 2021 22:03:19 +0800 Message-ID: <20211020220319.41ad167f@xhacker> In-Reply-To: <202110180820.HH9NB6vw-lkp@intel.com> List-Id: --===============4865558053950003021== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Mon, 18 Oct 2021 08:14:28 +0800 kernel test robot wrote: > Hi Jisheng, > = > I love your patch! Yet something to improve: > = > [auto build test ERROR on linus/master] > [also build test ERROR on v5.15-rc5 next-20211015] > [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] > = > url: https://github.com/0day-ci/linux/commits/Jisheng-Zhang/riscv-swit= ch-to-relative-extable/20211017-001318 > base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.gi= t 8fe31e0995f048d16b378b90926793a0aa4af1e5 > config: riscv-randconfig-r032-20211017 (attached as .config) > compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 746d= d6a700931988dd9021d3d04718f1929885a5) > reproduce (this is a W=3D1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbi= n/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # install riscv cross compiling tool for clang build > # apt-get install binutils-riscv64-linux-gnu > # https://github.com/0day-ci/linux/commit/23c273bf6ec4ca672a21dba= 701725087208dc784 > git remote add linux-review https://github.com/0day-ci/linux > git fetch --no-tags linux-review Jisheng-Zhang/riscv-switch-to-re= lative-extable/20211017-001318 > git checkout 23c273bf6ec4ca672a21dba701725087208dc784 > # save the attached .config to linux build tree > mkdir build_dir > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W= =3D1 O=3Dbuild_dir ARCH=3Driscv SHELL=3D/bin/bash > = > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > = > All errors (new ones prefixed by >>): > = > In file included from kernel/futex.c:36: > In file included from include/linux/pagemap.h:11: > In file included from include/linux/highmem.h:10: > In file included from include/linux/hardirq.h:11: > In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/riscv/include/asm/io.h:136: > include/asm-generic/io.h:464:31: warning: performing pointer arithmeti= c on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val =3D __raw_readb(PCI_IOBASE + addr); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:477:61: warning: performing pointer arithmeti= c on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val =3D __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE += addr)); > ~~~~~~~~~~ ^ > include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded fro= m macro '__le16_to_cpu' > #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) > ^ > In file included from kernel/futex.c:36: > In file included from include/linux/pagemap.h:11: > In file included from include/linux/highmem.h:10: > In file included from include/linux/hardirq.h:11: > In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/riscv/include/asm/io.h:136: > include/asm-generic/io.h:490:61: warning: performing pointer arithmeti= c on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > val =3D __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE += addr)); > ~~~~~~~~~~ ^ > include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded fro= m macro '__le32_to_cpu' > #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) > ^ > In file included from kernel/futex.c:36: > In file included from include/linux/pagemap.h:11: > In file included from include/linux/highmem.h:10: > In file included from include/linux/hardirq.h:11: > In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/riscv/include/asm/io.h:136: > include/asm-generic/io.h:501:33: warning: performing pointer arithmeti= c on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writeb(value, PCI_IOBASE + addr); > ~~~~~~~~~~ ^ The warnings like this are not caused by this patch, they existed for a long time since NOMMU is supported. But no good solution so far. > include/asm-generic/io.h:511:59: warning: performing pointer arithmeti= c on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + add= r); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:521:59: warning: performing pointer arithmeti= c on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + add= r); > ~~~~~~~~~~ ^ > include/asm-generic/io.h:1024:55: warning: performing pointer arithmet= ic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port; > ~~~~~~~~~~ ^ > In file included from kernel/futex.c:43: > >> arch/riscv/include/asm/futex.h:51:3: error: expected ')' = > __futex_atomic_op("amoswap.w.aqrl %[ov],%z[op],%[u]", > ^ > arch/riscv/include/asm/futex.h:33:3: note: expanded from macro '__fute= x_atomic_op' > _ASM_EXTABLE(1b, 3b) \ > ^ Errors like this are caused by my patch, I missed NOMMU. Fixed in V2. Thanks --===============4865558053950003021==--