Re: [PATCH V12 04/10] remoteproc: add is_iomem to da_to_va
by kernel test robot
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20210217]
[cannot apply to robh/for-next linus/master remoteproc/for-next rpmsg/for-next v5.11 v5.11-rc7 v5.11-rc6 v5.11]
[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/peng-fan-oss-nxp-com/remoteproc-...
base: cd560d8023bf73c94d755908c8d4a0994dd1ec34
config: mips-randconfig-s032-20210218 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://github.com/0day-ci/linux/commit/0ec66368df53f64194c8c97ecfb007584...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review peng-fan-oss-nxp-com/remoteproc-imx_rproc-support-iMX8MQ-M/20210218-094227
git checkout 0ec66368df53f64194c8c97ecfb007584ce0185f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
>> drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *src @@ got void *[assigned] ptr @@
drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: expected void const volatile [noderef] __iomem *src
drivers/remoteproc/remoteproc_coredump.c:169:53: sparse: got void *[assigned] ptr
vim +169 drivers/remoteproc/remoteproc_coredump.c
150
151 static void rproc_copy_segment(struct rproc *rproc, void *dest,
152 struct rproc_dump_segment *segment,
153 size_t offset, size_t size)
154 {
155 void *ptr;
156 bool is_iomem;
157
158 if (segment->dump) {
159 segment->dump(rproc, segment, dest, offset, size);
160 } else {
161 ptr = rproc_da_to_va(rproc, segment->da + offset, size, &is_iomem);
162 if (!ptr) {
163 dev_err(&rproc->dev,
164 "invalid copy request for segment %pad with offset %zu and size %zu)\n",
165 &segment->da, offset, size);
166 memset(dest, 0xff, size);
167 } else {
168 if (is_iomem)
> 169 memcpy_fromio(dest, ptr, size);
170 else
171 memcpy(dest, ptr, size);
172 }
173 }
174 }
175
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[intel-linux-intel-lts:5.4/yocto 6707/14610] drivers/misc/gna/gna_drv.c:270:6: error: no previous prototype for 'gna_dev_release'
by kernel test robot
Hi Seng,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: a649a51485b7fc810a15ae44a0b393d4e4b91392
commit: 2d2e3dc79dbf54b9905e4086db001a25047d8c0c [6707/14610] Enable support for GNA drivers based on GNA API specification 2.0
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/linux-intel-lts/commit/2d2e3dc79dbf54b9905e4086d...
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.4/yocto
git checkout 2d2e3dc79dbf54b9905e4086db001a25047d8c0c
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/misc/gna/gna_drv.c:270:6: error: no previous prototype for 'gna_dev_release' [-Werror=missing-prototypes]
270 | void gna_dev_release(struct device *dev)
| ^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
drivers/misc/gna/gna_ioctl.c: In function 'gna_ioctl':
>> drivers/misc/gna/gna_ioctl.c:251:6: error: variable 'size' set but not used [-Werror=unused-but-set-variable]
251 | u64 size;
| ^~~~
>> drivers/misc/gna/gna_ioctl.c:250:8: error: variable 'data' set but not used [-Werror=unused-but-set-variable]
250 | void *data;
| ^~~~
cc1: all warnings being treated as errors
--
drivers/misc/gna/gna_mem.c: In function 'gna_priv_userptr':
>> drivers/misc/gna/gna_mem.c:527:20: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
527 | if (mo->memory_id < 0) {
| ^
cc1: all warnings being treated as errors
--
>> drivers/misc/gna/gna_pci.c:37:21: error: initialized field overwritten [-Werror=override-init]
37 | .max_layer_count = 4096
| ^~~~
drivers/misc/gna/gna_pci.c:61:2: note: in expansion of macro 'GNA_GEN2_FEATURES'
61 | GNA_GEN2_FEATURES
| ^~~~~~~~~~~~~~~~~
drivers/misc/gna/gna_pci.c:37:21: note: (near initialization for 'jsl_drv_info.max_layer_count')
37 | .max_layer_count = 4096
| ^~~~
drivers/misc/gna/gna_pci.c:61:2: note: in expansion of macro 'GNA_GEN2_FEATURES'
61 | GNA_GEN2_FEATURES
| ^~~~~~~~~~~~~~~~~
>> drivers/misc/gna/gna_pci.c:37:21: error: initialized field overwritten [-Werror=override-init]
37 | .max_layer_count = 4096
| ^~~~
drivers/misc/gna/gna_pci.c:66:2: note: in expansion of macro 'GNA_GEN2_FEATURES'
66 | GNA_GEN2_FEATURES
| ^~~~~~~~~~~~~~~~~
drivers/misc/gna/gna_pci.c:37:21: note: (near initialization for 'tgl_drv_info.max_layer_count')
37 | .max_layer_count = 4096
| ^~~~
drivers/misc/gna/gna_pci.c:66:2: note: in expansion of macro 'GNA_GEN2_FEATURES'
66 | GNA_GEN2_FEATURES
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/gna_dev_release +270 drivers/misc/gna/gna_drv.c
269
> 270 void gna_dev_release(struct device *dev)
271 {
272 struct gna_private *gna_priv;
273
274 dev_dbg(dev, "%s enter\n", __func__);
275
276 gna_priv = dev_get_drvdata(dev);
277
278 __clear_bit(MINOR(dev->devt), gna_drv_priv.dev_map);
279 flush_workqueue(gna_priv->request_wq);
280 destroy_workqueue(gna_priv->request_wq);
281 idr_destroy(&gna_priv->memory_idr);
282 gna_mmu_free(gna_priv);
283 dev_set_drvdata(dev, NULL);
284 pci_set_drvdata(gna_priv->pdev, NULL);
285
286 kfree(gna_priv);
287
288 dev_dbg(dev, "%s exit\n", __func__);
289 }
290
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[kdave-btrfs-devel:dev/auth-hash 158/162] fs/btrfs/super.c:608:8: warning: shift count >= width of type
by kernel test robot
tree: https://github.com/kdave/btrfs-devel.git dev/auth-hash
head: 212f7564065bdfda0a55ab1ef52a4868572359de
commit: 13be51617b056261da9212d109c77311a895bb6f [158/162] btrfs: add authentication support
config: powerpc64-randconfig-r032-20210215 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/kdave/btrfs-devel/commit/13be51617b056261da9212d109c77...
git remote add kdave-btrfs-devel https://github.com/kdave/btrfs-devel.git
git fetch --no-tags kdave-btrfs-devel dev/auth-hash
git checkout 13be51617b056261da9212d109c77311a895bb6f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:115:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/super.c:6:
In file included from include/linux/blkdev.h:14:
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:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:117:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/super.c:6:
In file included from include/linux/blkdev.h:14:
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:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:119:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/super.c:6:
In file included from include/linux/blkdev.h:14:
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:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:121:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/super.c:6:
In file included from include/linux/blkdev.h:14:
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:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:123:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> fs/btrfs/super.c:608:8: warning: shift count >= width of type [-Wshift-count-overflow]
if (btrfs_test_opt(info, AUTH_KEY)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1396:7: note: expanded from macro 'btrfs_test_opt'
BTRFS_MOUNT_##opt)
^~~~~~~~~~~~~~~~~
<scratch space>:81:1: note: expanded from here
BTRFS_MOUNT_AUTH_KEY
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1387:34: note: expanded from macro 'BTRFS_MOUNT_AUTH_KEY'
#define BTRFS_MOUNT_AUTH_KEY (1 << 32)
^ ~~
fs/btrfs/super.c:628:8: warning: shift count >= width of type [-Wshift-count-overflow]
if (btrfs_test_opt(info, AUTH_KEY)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1396:7: note: expanded from macro 'btrfs_test_opt'
BTRFS_MOUNT_##opt)
^~~~~~~~~~~~~~~~~
<scratch space>:88:1: note: expanded from here
BTRFS_MOUNT_AUTH_KEY
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1387:34: note: expanded from macro 'BTRFS_MOUNT_AUTH_KEY'
#define BTRFS_MOUNT_AUTH_KEY (1 << 32)
^ ~~
fs/btrfs/super.c:1127:3: warning: shift count >= width of type [-Wshift-count-overflow]
btrfs_set_opt(info->mount_opt, AUTH_KEY);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1393:40: note: expanded from macro 'btrfs_set_opt'
#define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt)
^~~~~~~~~~~~~~~~~
<scratch space>:69:1: note: expanded from here
BTRFS_MOUNT_AUTH_KEY
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1387:34: note: expanded from macro 'BTRFS_MOUNT_AUTH_KEY'
#define BTRFS_MOUNT_AUTH_KEY (1 << 32)
^ ~~
fs/btrfs/super.c:1574:6: warning: shift count >= width of type [-Wshift-count-overflow]
if (btrfs_test_opt(info, AUTH_KEY))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1396:7: note: expanded from macro 'btrfs_test_opt'
BTRFS_MOUNT_##opt)
^~~~~~~~~~~~~~~~~
<scratch space>:102:1: note: expanded from here
BTRFS_MOUNT_AUTH_KEY
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1387:34: note: expanded from macro 'BTRFS_MOUNT_AUTH_KEY'
#define BTRFS_MOUNT_AUTH_KEY (1 << 32)
^ ~~
16 warnings generated.
--
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:85:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/disk-io.c:7:
In file included from include/linux/blkdev.h:14:
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:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:87:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/disk-io.c:7:
In file included from include/linux/blkdev.h:14:
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:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:89:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/disk-io.c:7:
In file included from include/linux/blkdev.h:14:
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:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:91:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/disk-io.c:7:
In file included from include/linux/blkdev.h:14:
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:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:93:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> fs/btrfs/disk-io.c:2321:7: warning: shift count >= width of type [-Wshift-count-overflow]
if (!btrfs_test_opt(fs_info, AUTH_KEY))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1396:7: note: expanded from macro 'btrfs_test_opt'
BTRFS_MOUNT_##opt)
^~~~~~~~~~~~~~~~~
<scratch space>:102:1: note: expanded from here
BTRFS_MOUNT_AUTH_KEY
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1387:34: note: expanded from macro 'BTRFS_MOUNT_AUTH_KEY'
#define BTRFS_MOUNT_AUTH_KEY (1 << 32)
^ ~~
13 warnings generated.
--
In file included from fs/btrfs/ioctl.c:7:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:27:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/ioctl.c:7:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:29:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/ioctl.c:7:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:31:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/ioctl.c:7:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:33:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/btrfs/ioctl.c:7:
In file included from include/linux/bio.h:8:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:35:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> fs/btrfs/ioctl.c:271:7: warning: shift count >= width of type [-Wshift-count-overflow]
if (btrfs_test_opt(fs_info, AUTH_KEY)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1396:7: note: expanded from macro 'btrfs_test_opt'
BTRFS_MOUNT_##opt)
^~~~~~~~~~~~~~~~~
<scratch space>:147:1: note: expanded from here
BTRFS_MOUNT_AUTH_KEY
^~~~~~~~~~~~~~~~~~~~
fs/btrfs/ctree.h:1387:34: note: expanded from macro 'BTRFS_MOUNT_AUTH_KEY'
#define BTRFS_MOUNT_AUTH_KEY (1 << 32)
^ ~~
13 warnings generated.
vim +608 fs/btrfs/super.c
547
548 /*
549 * Regular mount options parser. Everything that is needed only when
550 * reading in a new superblock is parsed here.
551 * XXX JDM: This needs to be cleaned up for remount.
552 */
553 int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
554 unsigned long new_flags)
555 {
556 substring_t args[MAX_OPT_ARGS];
557 char *p, *num;
558 int intarg;
559 int ret = 0;
560 char *compress_type;
561 bool compress_force = false;
562 enum btrfs_compression_type saved_compress_type;
563 int saved_compress_level;
564 bool saved_compress_force;
565 int no_compress = 0;
566
567 if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE))
568 btrfs_set_opt(info->mount_opt, FREE_SPACE_TREE);
569 else if (btrfs_free_space_cache_v1_active(info)) {
570 if (btrfs_is_zoned(info)) {
571 btrfs_info(info,
572 "zoned: clearing existing space cache");
573 btrfs_set_super_cache_generation(info->super_copy, 0);
574 } else {
575 btrfs_set_opt(info->mount_opt, SPACE_CACHE);
576 }
577 }
578
579 /*
580 * Even the options are empty, we still need to do extra check
581 * against new flags
582 */
583 if (!options)
584 goto check;
585
586 while ((p = strsep(&options, ",")) != NULL) {
587 int token;
588 if (!*p)
589 continue;
590
591 token = match_token(p, tokens, args);
592 switch (token) {
593 case Opt_degraded:
594 btrfs_info(info, "allowing degraded mounts");
595 btrfs_set_opt(info->mount_opt, DEGRADED);
596 break;
597 case Opt_subvol:
598 case Opt_subvol_empty:
599 case Opt_subvolid:
600 case Opt_device:
601 /*
602 * These are parsed by btrfs_parse_subvol_options
603 * and btrfs_parse_early_options
604 * and can be happily ignored here.
605 */
606 break;
607 case Opt_nodatasum:
> 608 if (btrfs_test_opt(info, AUTH_KEY)) {
609 btrfs_info(info,
610 "nodatasum not supported on an authnticated file-system");
611 break;
612 }
613 btrfs_set_and_info(info, NODATASUM,
614 "setting nodatasum");
615 break;
616 case Opt_datasum:
617 if (btrfs_test_opt(info, NODATASUM)) {
618 if (btrfs_test_opt(info, NODATACOW))
619 btrfs_info(info,
620 "setting datasum, datacow enabled");
621 else
622 btrfs_info(info, "setting datasum");
623 }
624 btrfs_clear_opt(info->mount_opt, NODATACOW);
625 btrfs_clear_opt(info->mount_opt, NODATASUM);
626 break;
627 case Opt_nodatacow:
628 if (btrfs_test_opt(info, AUTH_KEY)) {
629 btrfs_info(info,
630 "nodatacow not supported on an authnticated file-system");
631 break;
632 }
633 if (!btrfs_test_opt(info, NODATACOW)) {
634 if (!btrfs_test_opt(info, COMPRESS) ||
635 !btrfs_test_opt(info, FORCE_COMPRESS)) {
636 btrfs_info(info,
637 "setting nodatacow, compression disabled");
638 } else {
639 btrfs_info(info, "setting nodatacow");
640 }
641 }
642 btrfs_clear_opt(info->mount_opt, COMPRESS);
643 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
644 btrfs_set_opt(info->mount_opt, NODATACOW);
645 btrfs_set_opt(info->mount_opt, NODATASUM);
646 break;
647 case Opt_datacow:
648 btrfs_clear_and_info(info, NODATACOW,
649 "setting datacow");
650 break;
651 case Opt_compress_force:
652 case Opt_compress_force_type:
653 compress_force = true;
654 fallthrough;
655 case Opt_compress:
656 case Opt_compress_type:
657 saved_compress_type = btrfs_test_opt(info,
658 COMPRESS) ?
659 info->compress_type : BTRFS_COMPRESS_NONE;
660 saved_compress_force =
661 btrfs_test_opt(info, FORCE_COMPRESS);
662 saved_compress_level = info->compress_level;
663 if (token == Opt_compress ||
664 token == Opt_compress_force ||
665 strncmp(args[0].from, "zlib", 4) == 0) {
666 compress_type = "zlib";
667
668 info->compress_type = BTRFS_COMPRESS_ZLIB;
669 info->compress_level = BTRFS_ZLIB_DEFAULT_LEVEL;
670 /*
671 * args[0] contains uninitialized data since
672 * for these tokens we don't expect any
673 * parameter.
674 */
675 if (token != Opt_compress &&
676 token != Opt_compress_force)
677 info->compress_level =
678 btrfs_compress_str2level(
679 BTRFS_COMPRESS_ZLIB,
680 args[0].from + 4);
681 btrfs_set_opt(info->mount_opt, COMPRESS);
682 btrfs_clear_opt(info->mount_opt, NODATACOW);
683 btrfs_clear_opt(info->mount_opt, NODATASUM);
684 no_compress = 0;
685 } else if (strncmp(args[0].from, "lzo", 3) == 0) {
686 compress_type = "lzo";
687 info->compress_type = BTRFS_COMPRESS_LZO;
688 info->compress_level = 0;
689 btrfs_set_opt(info->mount_opt, COMPRESS);
690 btrfs_clear_opt(info->mount_opt, NODATACOW);
691 btrfs_clear_opt(info->mount_opt, NODATASUM);
692 btrfs_set_fs_incompat(info, COMPRESS_LZO);
693 no_compress = 0;
694 } else if (strncmp(args[0].from, "zstd", 4) == 0) {
695 compress_type = "zstd";
696 info->compress_type = BTRFS_COMPRESS_ZSTD;
697 info->compress_level =
698 btrfs_compress_str2level(
699 BTRFS_COMPRESS_ZSTD,
700 args[0].from + 4);
701 btrfs_set_opt(info->mount_opt, COMPRESS);
702 btrfs_clear_opt(info->mount_opt, NODATACOW);
703 btrfs_clear_opt(info->mount_opt, NODATASUM);
704 btrfs_set_fs_incompat(info, COMPRESS_ZSTD);
705 no_compress = 0;
706 } else if (strncmp(args[0].from, "no", 2) == 0) {
707 compress_type = "no";
708 info->compress_level = 0;
709 info->compress_type = 0;
710 btrfs_clear_opt(info->mount_opt, COMPRESS);
711 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
712 compress_force = false;
713 no_compress++;
714 } else {
715 ret = -EINVAL;
716 goto out;
717 }
718
719 if (compress_force) {
720 btrfs_set_opt(info->mount_opt, FORCE_COMPRESS);
721 } else {
722 /*
723 * If we remount from compress-force=xxx to
724 * compress=xxx, we need clear FORCE_COMPRESS
725 * flag, otherwise, there is no way for users
726 * to disable forcible compression separately.
727 */
728 btrfs_clear_opt(info->mount_opt, FORCE_COMPRESS);
729 }
730 if (no_compress == 1) {
731 btrfs_info(info, "use no compression");
732 } else if ((info->compress_type != saved_compress_type) ||
733 (compress_force != saved_compress_force) ||
734 (info->compress_level != saved_compress_level)) {
735 btrfs_info(info, "%s %s compression, level %d",
736 (compress_force) ? "force" : "use",
737 compress_type, info->compress_level);
738 }
739 compress_force = false;
740 break;
741 case Opt_ssd:
742 btrfs_set_and_info(info, SSD,
743 "enabling ssd optimizations");
744 btrfs_clear_opt(info->mount_opt, NOSSD);
745 break;
746 case Opt_ssd_spread:
747 btrfs_set_and_info(info, SSD,
748 "enabling ssd optimizations");
749 btrfs_set_and_info(info, SSD_SPREAD,
750 "using spread ssd allocation scheme");
751 btrfs_clear_opt(info->mount_opt, NOSSD);
752 break;
753 case Opt_nossd:
754 btrfs_set_opt(info->mount_opt, NOSSD);
755 btrfs_clear_and_info(info, SSD,
756 "not using ssd optimizations");
757 fallthrough;
758 case Opt_nossd_spread:
759 btrfs_clear_and_info(info, SSD_SPREAD,
760 "not using spread ssd allocation scheme");
761 break;
762 case Opt_barrier:
763 btrfs_clear_and_info(info, NOBARRIER,
764 "turning on barriers");
765 break;
766 case Opt_nobarrier:
767 btrfs_set_and_info(info, NOBARRIER,
768 "turning off barriers");
769 break;
770 case Opt_thread_pool:
771 ret = match_int(&args[0], &intarg);
772 if (ret) {
773 goto out;
774 } else if (intarg == 0) {
775 ret = -EINVAL;
776 goto out;
777 }
778 info->thread_pool_size = intarg;
779 break;
780 case Opt_max_inline:
781 num = match_strdup(&args[0]);
782 if (num) {
783 info->max_inline = memparse(num, NULL);
784 kfree(num);
785
786 if (info->max_inline) {
787 info->max_inline = min_t(u64,
788 info->max_inline,
789 info->sectorsize);
790 }
791 btrfs_info(info, "max_inline at %llu",
792 info->max_inline);
793 } else {
794 ret = -ENOMEM;
795 goto out;
796 }
797 break;
798 case Opt_acl:
799 #ifdef CONFIG_BTRFS_FS_POSIX_ACL
800 info->sb->s_flags |= SB_POSIXACL;
801 break;
802 #else
803 btrfs_err(info, "support for ACL not compiled in!");
804 ret = -EINVAL;
805 goto out;
806 #endif
807 case Opt_noacl:
808 info->sb->s_flags &= ~SB_POSIXACL;
809 break;
810 case Opt_notreelog:
811 btrfs_set_and_info(info, NOTREELOG,
812 "disabling tree log");
813 break;
814 case Opt_treelog:
815 btrfs_clear_and_info(info, NOTREELOG,
816 "enabling tree log");
817 break;
818 case Opt_norecovery:
819 case Opt_nologreplay:
820 btrfs_warn(info,
821 "'nologreplay' is deprecated, use 'rescue=nologreplay' instead");
822 btrfs_set_and_info(info, NOLOGREPLAY,
823 "disabling log replay at mount time");
824 break;
825 case Opt_flushoncommit:
826 btrfs_set_and_info(info, FLUSHONCOMMIT,
827 "turning on flush-on-commit");
828 break;
829 case Opt_noflushoncommit:
830 btrfs_clear_and_info(info, FLUSHONCOMMIT,
831 "turning off flush-on-commit");
832 break;
833 case Opt_ratio:
834 ret = match_int(&args[0], &intarg);
835 if (ret)
836 goto out;
837 info->metadata_ratio = intarg;
838 btrfs_info(info, "metadata ratio %u",
839 info->metadata_ratio);
840 break;
841 case Opt_discard:
842 case Opt_discard_mode:
843 if (token == Opt_discard ||
844 strcmp(args[0].from, "sync") == 0) {
845 btrfs_clear_opt(info->mount_opt, DISCARD_ASYNC);
846 btrfs_set_and_info(info, DISCARD_SYNC,
847 "turning on sync discard");
848 } else if (strcmp(args[0].from, "async") == 0) {
849 btrfs_clear_opt(info->mount_opt, DISCARD_SYNC);
850 btrfs_set_and_info(info, DISCARD_ASYNC,
851 "turning on async discard");
852 } else {
853 ret = -EINVAL;
854 goto out;
855 }
856 break;
857 case Opt_nodiscard:
858 btrfs_clear_and_info(info, DISCARD_SYNC,
859 "turning off discard");
860 btrfs_clear_and_info(info, DISCARD_ASYNC,
861 "turning off async discard");
862 break;
863 case Opt_space_cache:
864 case Opt_space_cache_version:
865 if (token == Opt_space_cache ||
866 strcmp(args[0].from, "v1") == 0) {
867 btrfs_clear_opt(info->mount_opt,
868 FREE_SPACE_TREE);
869 btrfs_set_and_info(info, SPACE_CACHE,
870 "enabling disk space caching");
871 } else if (strcmp(args[0].from, "v2") == 0) {
872 btrfs_clear_opt(info->mount_opt,
873 SPACE_CACHE);
874 btrfs_set_and_info(info, FREE_SPACE_TREE,
875 "enabling free space tree");
876 } else {
877 ret = -EINVAL;
878 goto out;
879 }
880 break;
881 case Opt_rescan_uuid_tree:
882 btrfs_set_opt(info->mount_opt, RESCAN_UUID_TREE);
883 break;
884 case Opt_no_space_cache:
885 if (btrfs_test_opt(info, SPACE_CACHE)) {
886 btrfs_clear_and_info(info, SPACE_CACHE,
887 "disabling disk space caching");
888 }
889 if (btrfs_test_opt(info, FREE_SPACE_TREE)) {
890 btrfs_clear_and_info(info, FREE_SPACE_TREE,
891 "disabling free space tree");
892 }
893 break;
894 case Opt_inode_cache:
895 case Opt_noinode_cache:
896 btrfs_warn(info,
897 "the 'inode_cache' option is deprecated and has no effect since 5.11");
898 break;
899 case Opt_clear_cache:
900 btrfs_set_and_info(info, CLEAR_CACHE,
901 "force clearing of disk cache");
902 break;
903 case Opt_user_subvol_rm_allowed:
904 btrfs_set_opt(info->mount_opt, USER_SUBVOL_RM_ALLOWED);
905 break;
906 case Opt_enospc_debug:
907 btrfs_set_opt(info->mount_opt, ENOSPC_DEBUG);
908 break;
909 case Opt_noenospc_debug:
910 btrfs_clear_opt(info->mount_opt, ENOSPC_DEBUG);
911 break;
912 case Opt_defrag:
913 btrfs_set_and_info(info, AUTO_DEFRAG,
914 "enabling auto defrag");
915 break;
916 case Opt_nodefrag:
917 btrfs_clear_and_info(info, AUTO_DEFRAG,
918 "disabling auto defrag");
919 break;
920 case Opt_recovery:
921 case Opt_usebackuproot:
922 btrfs_warn(info,
923 "'%s' is deprecated, use 'rescue=usebackuproot' instead",
924 token == Opt_recovery ? "recovery" :
925 "usebackuproot");
926 btrfs_info(info,
927 "trying to use backup root at mount time");
928 btrfs_set_opt(info->mount_opt, USEBACKUPROOT);
929 break;
930 case Opt_skip_balance:
931 btrfs_set_opt(info->mount_opt, SKIP_BALANCE);
932 break;
933 #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
934 case Opt_check_integrity_including_extent_data:
935 btrfs_info(info,
936 "enabling check integrity including extent data");
937 btrfs_set_opt(info->mount_opt,
938 CHECK_INTEGRITY_INCLUDING_EXTENT_DATA);
939 btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY);
940 break;
941 case Opt_check_integrity:
942 btrfs_info(info, "enabling check integrity");
943 btrfs_set_opt(info->mount_opt, CHECK_INTEGRITY);
944 break;
945 case Opt_check_integrity_print_mask:
946 ret = match_int(&args[0], &intarg);
947 if (ret)
948 goto out;
949 info->check_integrity_print_mask = intarg;
950 btrfs_info(info, "check_integrity_print_mask 0x%x",
951 info->check_integrity_print_mask);
952 break;
953 #else
954 case Opt_check_integrity_including_extent_data:
955 case Opt_check_integrity:
956 case Opt_check_integrity_print_mask:
957 btrfs_err(info,
958 "support for check_integrity* not compiled in!");
959 ret = -EINVAL;
960 goto out;
961 #endif
962 case Opt_fatal_errors:
963 if (strcmp(args[0].from, "panic") == 0)
964 btrfs_set_opt(info->mount_opt,
965 PANIC_ON_FATAL_ERROR);
966 else if (strcmp(args[0].from, "bug") == 0)
967 btrfs_clear_opt(info->mount_opt,
968 PANIC_ON_FATAL_ERROR);
969 else {
970 ret = -EINVAL;
971 goto out;
972 }
973 break;
974 case Opt_commit_interval:
975 intarg = 0;
976 ret = match_int(&args[0], &intarg);
977 if (ret)
978 goto out;
979 if (intarg == 0) {
980 btrfs_info(info,
981 "using default commit interval %us",
982 BTRFS_DEFAULT_COMMIT_INTERVAL);
983 intarg = BTRFS_DEFAULT_COMMIT_INTERVAL;
984 } else if (intarg > 300) {
985 btrfs_warn(info, "excessive commit interval %d",
986 intarg);
987 }
988 info->commit_interval = intarg;
989 break;
990 case Opt_rescue:
991 ret = parse_rescue_options(info, args[0].from);
992 if (ret < 0)
993 goto out;
994 break;
995 #ifdef CONFIG_BTRFS_DEBUG
996 case Opt_fragment_all:
997 btrfs_info(info, "fragmenting all space");
998 btrfs_set_opt(info->mount_opt, FRAGMENT_DATA);
999 btrfs_set_opt(info->mount_opt, FRAGMENT_METADATA);
1000 break;
1001 case Opt_fragment_metadata:
1002 btrfs_info(info, "fragmenting metadata");
1003 btrfs_set_opt(info->mount_opt,
1004 FRAGMENT_METADATA);
1005 break;
1006 case Opt_fragment_data:
1007 btrfs_info(info, "fragmenting data");
1008 btrfs_set_opt(info->mount_opt, FRAGMENT_DATA);
1009 break;
1010 #endif
1011 #ifdef CONFIG_BTRFS_FS_REF_VERIFY
1012 case Opt_ref_verify:
1013 btrfs_info(info, "doing ref verification");
1014 btrfs_set_opt(info->mount_opt, REF_VERIFY);
1015 break;
1016 #endif
1017 case Opt_err:
1018 btrfs_err(info, "unrecognized mount option '%s'", p);
1019 ret = -EINVAL;
1020 goto out;
1021 default:
1022 break;
1023 }
1024 }
1025 check:
1026 /* We're read-only, don't have to check. */
1027 if (new_flags & SB_RDONLY)
1028 goto out;
1029
1030 if (check_ro_option(info, BTRFS_MOUNT_NOLOGREPLAY, "nologreplay") ||
1031 check_ro_option(info, BTRFS_MOUNT_IGNOREBADROOTS, "ignorebadroots") ||
1032 check_ro_option(info, BTRFS_MOUNT_IGNOREDATACSUMS, "ignoredatacsums"))
1033 ret = -EINVAL;
1034 out:
1035 if (btrfs_fs_compat_ro(info, FREE_SPACE_TREE) &&
1036 !btrfs_test_opt(info, FREE_SPACE_TREE) &&
1037 !btrfs_test_opt(info, CLEAR_CACHE)) {
1038 btrfs_err(info, "cannot disable free space tree");
1039 ret = -EINVAL;
1040
1041 }
1042 if (!ret)
1043 ret = btrfs_check_mountopts_zoned(info);
1044 if (!ret && btrfs_test_opt(info, SPACE_CACHE))
1045 btrfs_info(info, "disk space caching is enabled");
1046 if (!ret && btrfs_test_opt(info, FREE_SPACE_TREE))
1047 btrfs_info(info, "using free space tree");
1048 return ret;
1049 }
1050
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[tip:locking/core 1/3] ld.lld: error: main.c:(.text+0x1DCE): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
CC: x86(a)kernel.org
CC: Ingo Molnar <mingo(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
head: 3765d01bab73bdb920ef711203978f02cd26e4da
commit: 62137364e3e8afcc745846c5c67cacf943149073 [1/3] Merge branch 'linus' into locking/core, to pick up upstream fixes
config: riscv-randconfig-r031-20210215 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=62...
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip locking/core
git checkout 62137364e3e8afcc745846c5c67cacf943149073
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x3E): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x154): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x1152): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x1190): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x11B0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x11CA): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0xC0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x180): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x24C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x3F4): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x668): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x7D8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0x9FA): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0xB76): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: main.c:(.text+0xDA4): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: main.c:(.text+0x1DCE): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: main.c:(.text+0x1E54): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: [PATCH 3/3] Input: applespi: Add trace_event module param for early tracing.
by kernel test robot
Hi "Ronald,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on input/next]
[also build test ERROR on v5.11 next-20210217]
[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/Ronald-Tschal-r/Input-applespi-D...
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: i386-randconfig-s001-20210217 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# https://github.com/0day-ci/linux/commit/838cd23e96675132bdd30878d1b24a59b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ronald-Tschal-r/Input-applespi-Don-t-wait-for-responses-to-commands-indefinitely/20210218-032205
git checkout 838cd23e96675132bdd30878d1b24a59b8a534e1
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: drivers/input/keyboard/applespi.o: in function `applespi_enable_early_event_tracing':
>> drivers/input/keyboard/applespi.c:1666: undefined reference to `trace_set_clr_event'
vim +1666 drivers/input/keyboard/applespi.c
1653
1654 static void applespi_enable_early_event_tracing(struct device *dev)
1655 {
1656 char *buf, *event;
1657 int sts;
1658
1659 if (trace_event && trace_event[0]) {
1660 buf = kstrdup(trace_event, GFP_KERNEL);
1661 if (!buf)
1662 return;
1663
1664 while ((event = strsep(&buf, ","))) {
1665 if (event[0]) {
> 1666 sts = trace_set_clr_event("applespi", event, 1);
1667 if (sts)
1668 dev_warn(dev,
1669 "Error setting trace event '%s': %d\n",
1670 event, sts);
1671 }
1672 }
1673
1674 kfree(buf);
1675 }
1676 }
1677
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[arm-platforms:hack/m1-aic 8/9] drivers/irqchip/irq-gic-v3.c:1743:2: error: implicit declaration of function 'set_handle_irq_entry'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git hack/m1-aic
head: a1e6adfab5efe54d01a22bf7e9c638f248140146
commit: 7fe8b45fa364a813f852e4374892652af346ff1e [8/9] [DO NOT MERGE] irqchip/gic-v3: Route SGI/PPI as FIQ
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/com...
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms hack/m1-aic
git checkout 7fe8b45fa364a813f852e4374892652af346ff1e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/irqchip/irq-gic-v3.c: In function 'gic_eoi_irq':
drivers/irqchip/irq-gic-v3.c:534:3: error: implicit declaration of function 'write_sysreg_s'; did you mean 'write_sysreg'? [-Werror=implicit-function-declaration]
534 | write_sysreg_s(d->hwirq, SYS_ICC_EOIR0_EL1);
| ^~~~~~~~~~~~~~
| write_sysreg
drivers/irqchip/irq-gic-v3.c:534:28: error: 'SYS_ICC_EOIR0_EL1' undeclared (first use in this function)
534 | write_sysreg_s(d->hwirq, SYS_ICC_EOIR0_EL1);
| ^~~~~~~~~~~~~~~~~
drivers/irqchip/irq-gic-v3.c:534:28: note: each undeclared identifier is reported only once for each function it appears in
drivers/irqchip/irq-gic-v3.c: In function 'gic_handle_fiq':
drivers/irqchip/irq-gic-v3.c:686:10: error: implicit declaration of function 'read_sysreg_s'; did you mean 'read_sysreg'? [-Werror=implicit-function-declaration]
686 | irqnr = read_sysreg_s(SYS_ICC_IAR0_EL1);
| ^~~~~~~~~~~~~
| read_sysreg
drivers/irqchip/irq-gic-v3.c:686:24: error: 'SYS_ICC_IAR0_EL1' undeclared (first use in this function)
686 | irqnr = read_sysreg_s(SYS_ICC_IAR0_EL1);
| ^~~~~~~~~~~~~~~~
drivers/irqchip/irq-gic-v3.c:704:25: error: 'SYS_ICC_EOIR0_EL1' undeclared (first use in this function)
704 | write_sysreg_s(irqnr, SYS_ICC_EOIR0_EL1);
| ^~~~~~~~~~~~~~~~~
drivers/irqchip/irq-gic-v3.c: In function 'gic_cpu_sys_reg_init':
drivers/irqchip/irq-gic-v3.c:990:21: error: 'SYS_ICC_BPR0_EL1' undeclared (first use in this function); did you mean 'read_ICC_AP1R0_EL1'?
990 | write_sysreg_s(0, SYS_ICC_BPR0_EL1);
| ^~~~~~~~~~~~~~~~
| read_ICC_AP1R0_EL1
drivers/irqchip/irq-gic-v3.c:1038:21: error: 'SYS_ICC_IGRPEN0_EL1' undeclared (first use in this function)
1038 | write_sysreg_s(1, SYS_ICC_IGRPEN0_EL1);
| ^~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-gic-v3.c: In function 'gic_init_bases':
>> drivers/irqchip/irq-gic-v3.c:1743:2: error: implicit declaration of function 'set_handle_irq_entry'; did you mean 'set_handle_irq'? [-Werror=implicit-function-declaration]
1743 | set_handle_irq_entry(gic_handle_irq, 0);
| ^~~~~~~~~~~~~~~~~~~~
| set_handle_irq
cc1: some warnings being treated as errors
vim +1743 drivers/irqchip/irq-gic-v3.c
1677
1678 static int __init gic_init_bases(void __iomem *dist_base,
1679 struct redist_region *rdist_regs,
1680 u32 nr_redist_regions,
1681 u64 redist_stride,
1682 struct fwnode_handle *handle)
1683 {
1684 u32 typer;
1685 int err;
1686
1687 if (!is_hyp_mode_available())
1688 static_branch_disable(&supports_deactivate_key);
1689
1690 if (static_branch_likely(&supports_deactivate_key))
1691 pr_info("GIC: Using split EOI/Deactivate mode\n");
1692
1693 gic_data.fwnode = handle;
1694 gic_data.dist_base = dist_base;
1695 gic_data.redist_regions = rdist_regs;
1696 gic_data.nr_redist_regions = nr_redist_regions;
1697 gic_data.redist_stride = redist_stride;
1698
1699 /*
1700 * Find out how many interrupts are supported.
1701 */
1702 typer = readl_relaxed(gic_data.dist_base + GICD_TYPER);
1703 gic_data.rdists.gicd_typer = typer;
1704
1705 gic_enable_quirks(readl_relaxed(gic_data.dist_base + GICD_IIDR),
1706 gic_quirks, &gic_data);
1707
1708 pr_info("%d SPIs implemented\n", GIC_LINE_NR - 32);
1709 pr_info("%d Extended SPIs implemented\n", GIC_ESPI_NR);
1710
1711 /*
1712 * ThunderX1 explodes on reading GICD_TYPER2, in violation of the
1713 * architecture spec (which says that reserved registers are RES0).
1714 */
1715 if (!(gic_data.flags & FLAGS_WORKAROUND_CAVIUM_ERRATUM_38539))
1716 gic_data.rdists.gicd_typer2 = readl_relaxed(gic_data.dist_base + GICD_TYPER2);
1717
1718 gic_data.domain = irq_domain_create_tree(handle, &gic_irq_domain_ops,
1719 &gic_data);
1720 gic_data.rdists.rdist = alloc_percpu(typeof(*gic_data.rdists.rdist));
1721 gic_data.rdists.has_rvpeid = true;
1722 gic_data.rdists.has_vlpis = true;
1723 gic_data.rdists.has_direct_lpi = true;
1724 gic_data.rdists.has_vpend_valid_dirty = true;
1725
1726 if (WARN_ON(!gic_data.domain) || WARN_ON(!gic_data.rdists.rdist)) {
1727 err = -ENOMEM;
1728 goto out_free;
1729 }
1730
1731 irq_domain_update_bus_token(gic_data.domain, DOMAIN_BUS_WIRED);
1732
1733 gic_data.has_rss = !!(typer & GICD_TYPER_RSS);
1734 pr_info("Distributor has %sRange Selector support\n",
1735 gic_data.has_rss ? "" : "no ");
1736
1737 if (typer & GICD_TYPER_MBIS) {
1738 err = mbi_init(handle, gic_data.domain);
1739 if (err)
1740 pr_err("Failed to initialize MBIs\n");
1741 }
1742
> 1743 set_handle_irq_entry(gic_handle_irq, 0);
1744 set_handle_irq_entry(gic_handle_fiq, 1);
1745
1746 gic_update_rdist_properties();
1747
1748 gic_dist_init();
1749 gic_cpu_init();
1750 gic_smp_init();
1751 gic_cpu_pm_init();
1752
1753 if (gic_dist_supports_lpis()) {
1754 its_init(handle, &gic_data.rdists, gic_data.domain);
1755 its_cpu_init();
1756 } else {
1757 if (IS_ENABLED(CONFIG_ARM_GIC_V2M))
1758 gicv2m_init(handle, gic_data.domain);
1759 }
1760
1761 gic_enable_nmi_support();
1762
1763 return 0;
1764
1765 out_free:
1766 if (gic_data.domain)
1767 irq_domain_remove(gic_data.domain);
1768 free_percpu(gic_data.rdists.rdist);
1769 return err;
1770 }
1771
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: [PATCH 1/4] hugetlb: Pass vma into huge_pte_alloc() and huge_pmd_share()
by kernel test robot
Hi Peter,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on linux/master linus/master hnaz-linux-mm/master v5.11 next-20210217]
[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/Peter-Xu/hugetlb-Disable-huge-pm...
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: sparc-allyesconfig (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
# https://github.com/0day-ci/linux/commit/58ca9ac367f24752915f352fa9ae1ae02...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Peter-Xu/hugetlb-Disable-huge-pmd-unshare-for-uffd-wp/20210218-003520
git checkout 58ca9ac367f24752915f352fa9ae1ae027a29de3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> arch/sparc/mm/hugetlbpage.c:285:1: error: expected ';', ',' or ')' before '{' token
285 | {
| ^
>> arch/sparc/mm/hugetlbpage.c:269:22: error: 'huge_tte_to_size' defined but not used [-Werror=unused-function]
269 | static unsigned long huge_tte_to_size(pte_t pte)
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +285 arch/sparc/mm/hugetlbpage.c
c7d9f77d33a779 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-01 268
c7d9f77d33a779 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-01 @269 static unsigned long huge_tte_to_size(pte_t pte)
c7d9f77d33a779 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-01 270 {
c7d9f77d33a779 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-01 271 unsigned long size = 1UL << huge_tte_to_shift(pte);
c7d9f77d33a779 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-01 272
c7d9f77d33a779 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-01 273 if (size == REAL_HPAGE_SIZE)
c7d9f77d33a779 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-01 274 size = HPAGE_SIZE;
c7d9f77d33a779 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-01 275 return size;
c7d9f77d33a779 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-01 276 }
c7d9f77d33a779 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-01 277
e6e4f42eb773c1 arch/sparc/mm/hugetlbpage.c Peter Zijlstra 2020-11-13 278 unsigned long pud_leaf_size(pud_t pud) { return 1UL << tte_to_shift(*(pte_t *)&pud); }
e6e4f42eb773c1 arch/sparc/mm/hugetlbpage.c Peter Zijlstra 2020-11-13 279 unsigned long pmd_leaf_size(pmd_t pmd) { return 1UL << tte_to_shift(*(pte_t *)&pmd); }
e6e4f42eb773c1 arch/sparc/mm/hugetlbpage.c Peter Zijlstra 2020-11-13 280 unsigned long pte_leaf_size(pte_t pte) { return 1UL << tte_to_shift(pte); }
e6e4f42eb773c1 arch/sparc/mm/hugetlbpage.c Peter Zijlstra 2020-11-13 281
a5516438959d90 arch/sparc64/mm/hugetlbpage.c Andi Kleen 2008-07-23 282 pte_t *huge_pte_alloc(struct mm_struct *mm,
58ca9ac367f247 arch/sparc/mm/hugetlbpage.c Peter Xu 2021-02-17 283 pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
a5516438959d90 arch/sparc64/mm/hugetlbpage.c Andi Kleen 2008-07-23 284 unsigned long addr, unsigned long sz)
^1da177e4c3f41 arch/sparc64/mm/hugetlbpage.c Linus Torvalds 2005-04-16 @285 {
^1da177e4c3f41 arch/sparc64/mm/hugetlbpage.c Linus Torvalds 2005-04-16 286 pgd_t *pgd;
5637bc50483404 arch/sparc/mm/hugetlbpage.c Mike Rapoport 2019-11-24 287 p4d_t *p4d;
^1da177e4c3f41 arch/sparc64/mm/hugetlbpage.c Linus Torvalds 2005-04-16 288 pud_t *pud;
dcd1912d21a025 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-06 289 pmd_t *pmd;
^1da177e4c3f41 arch/sparc64/mm/hugetlbpage.c Linus Torvalds 2005-04-16 290
^1da177e4c3f41 arch/sparc64/mm/hugetlbpage.c Linus Torvalds 2005-04-16 291 pgd = pgd_offset(mm, addr);
5637bc50483404 arch/sparc/mm/hugetlbpage.c Mike Rapoport 2019-11-24 292 p4d = p4d_offset(pgd, addr);
5637bc50483404 arch/sparc/mm/hugetlbpage.c Mike Rapoport 2019-11-24 293 pud = pud_alloc(mm, p4d, addr);
df7b2155bbe755 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-08-11 294 if (!pud)
df7b2155bbe755 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-08-11 295 return NULL;
df7b2155bbe755 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-08-11 296 if (sz >= PUD_SIZE)
4dbe87d5a70215 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-08-11 297 return (pte_t *)pud;
dcd1912d21a025 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-06 298 pmd = pmd_alloc(mm, pud, addr);
dcd1912d21a025 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-06 299 if (!pmd)
dcd1912d21a025 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-02-06 300 return NULL;
59f1183dd368f1 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-03-03 301 if (sz >= PMD_SIZE)
4dbe87d5a70215 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-08-11 302 return (pte_t *)pmd;
4dbe87d5a70215 arch/sparc/mm/hugetlbpage.c Nitin Gupta 2017-08-11 303 return pte_alloc_map(mm, pmd, addr);
^1da177e4c3f41 arch/sparc64/mm/hugetlbpage.c Linus Torvalds 2005-04-16 304 }
^1da177e4c3f41 arch/sparc64/mm/hugetlbpage.c Linus Torvalds 2005-04-16 305
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[linux-next:master 11288/11658] drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1140:16: warning: no previous prototype for function 'amdgpu_ras_debugfs_create_ctrl_node'
by kernel test robot
Hi Nirmoy,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: cd560d8023bf73c94d755908c8d4a0994dd1ec34
commit: eb14235668777baddfc77ce4f72ecfa2ea85ca55 [11288/11658] drm/amdgpu: do not keep debugfs dentry
config: s390-randconfig-r031-20210217 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout eb14235668777baddfc77ce4f72ecfa2ea85ca55
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
^
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:52:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__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: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)0x0000ff00UL) << 8) | \
^
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:52:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__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: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)0x00ff0000UL) >> 8) | \
^
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:52:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__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:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:52:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__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:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:31:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:52:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501: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:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609: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:617: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:625: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:634: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:643: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:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1140:16: warning: no previous prototype for function 'amdgpu_ras_debugfs_create_ctrl_node' [-Wmissing-prototypes]
struct dentry *amdgpu_ras_debugfs_create_ctrl_node(struct amdgpu_device *adev)
^
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1140:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct dentry *amdgpu_ras_debugfs_create_ctrl_node(struct amdgpu_device *adev)
^
static
21 warnings generated.
vim +/amdgpu_ras_debugfs_create_ctrl_node +1140 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
1120
1121 /**
1122 * DOC: AMDGPU RAS Reboot Behavior for Unrecoverable Errors
1123 *
1124 * Normally when there is an uncorrectable error, the driver will reset
1125 * the GPU to recover. However, in the event of an unrecoverable error,
1126 * the driver provides an interface to reboot the system automatically
1127 * in that event.
1128 *
1129 * The following file in debugfs provides that interface:
1130 * /sys/kernel/debug/dri/[0/1/2...]/ras/auto_reboot
1131 *
1132 * Usage:
1133 *
1134 * .. code-block:: bash
1135 *
1136 * echo true > .../ras/auto_reboot
1137 *
1138 */
1139 /* debugfs begin */
> 1140 struct dentry *amdgpu_ras_debugfs_create_ctrl_node(struct amdgpu_device *adev)
1141 {
1142 struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
1143 struct dentry *dir;
1144 struct drm_minor *minor = adev_to_drm(adev)->primary;
1145
1146 dir = debugfs_create_dir(RAS_FS_NAME, minor->debugfs_root);
1147 debugfs_create_file("ras_ctrl", S_IWUGO | S_IRUGO, dir, adev,
1148 &amdgpu_ras_debugfs_ctrl_ops);
1149 debugfs_create_file("ras_eeprom_reset", S_IWUGO | S_IRUGO, dir, adev,
1150 &amdgpu_ras_debugfs_eeprom_ops);
1151
1152 /*
1153 * After one uncorrectable error happens, usually GPU recovery will
1154 * be scheduled. But due to the known problem in GPU recovery failing
1155 * to bring GPU back, below interface provides one direct way to
1156 * user to reboot system automatically in such case within
1157 * ERREVENT_ATHUB_INTERRUPT generated. Normal GPU recovery routine
1158 * will never be called.
1159 */
1160 debugfs_create_bool("auto_reboot", S_IWUGO | S_IRUGO, dir, &con->reboot);
1161
1162 /*
1163 * User could set this not to clean up hardware's error count register
1164 * of RAS IPs during ras recovery.
1165 */
1166 debugfs_create_bool("disable_ras_err_cnt_harvest", 0644, dir,
1167 &con->disable_ras_err_cnt_harvest);
1168 return dir;
1169 }
1170
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
Re: [PATCH] drm/shmem-helper: Don't remove the offset in vm_area_struct pgoff
by kernel test robot
Hi Neil,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.11 next-20210217]
[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/Neil-Roberts/drm-shmem-helper-Do...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f40ddce88593482919761f74910f42f4b84c004b
config: i386-randconfig-m021-20210215 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/gpu/drm/drm_gem_shmem_helper.c:534 drm_gem_shmem_fault() warn: unsigned 'page_offset' is never less than zero.
Old smatch warnings:
include/drm/drm_vma_manager.h:225 drm_vma_node_unmap() warn: should 'drm_vma_node_size(node) << 12' be a 64 bit type?
vim +/page_offset +534 drivers/gpu/drm/drm_gem_shmem_helper.c
521
522 static vm_fault_t drm_gem_shmem_fault(struct vm_fault *vmf)
523 {
524 struct vm_area_struct *vma = vmf->vma;
525 struct drm_gem_object *obj = vma->vm_private_data;
526 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj);
527 loff_t num_pages = obj->size >> PAGE_SHIFT;
528 struct page *page;
529 pgoff_t page_offset;
530
531 /* We don't use vmf->pgoff since that has the fake offset */
532 page_offset = (vmf->address - vma->vm_start) >> PAGE_SHIFT;
533
> 534 if (page_offset < 0 || page_offset >= num_pages ||
535 WARN_ON_ONCE(!shmem->pages))
536 return VM_FAULT_SIGBUS;
537
538 page = shmem->pages[page_offset];
539
540 return vmf_insert_page(vma, vmf->address, page);
541 }
542
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months