drivers/net/ethernet/huawei/hinic/hinic_debugfs.c:92 hinic_dbg_get_func_table() warn: returning -1 instead of -ENOMEM is sloppy
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 06af8679449d4ed282df13191fc52d5ba28ec536
commit: 5215e16244ee5889cc6135381acdbf4cbcb7905a hinic: add support to query function table
config: i386-randconfig-m021-20210615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/net/ethernet/huawei/hinic/hinic_debugfs.c:92 hinic_dbg_get_func_table() warn: returning -1 instead of -ENOMEM is sloppy
vim +92 drivers/net/ethernet/huawei/hinic/hinic_debugfs.c
5215e16244ee58 Luo bin 2020-08-28 83 static int hinic_dbg_get_func_table(struct hinic_dev *nic_dev, int idx)
5215e16244ee58 Luo bin 2020-08-28 84 {
5215e16244ee58 Luo bin 2020-08-28 85 struct tag_sml_funcfg_tbl *funcfg_table_elem;
5215e16244ee58 Luo bin 2020-08-28 86 struct hinic_cmd_lt_rd *read_data;
5215e16244ee58 Luo bin 2020-08-28 87 u16 out_size = sizeof(*read_data);
5215e16244ee58 Luo bin 2020-08-28 88 int err;
5215e16244ee58 Luo bin 2020-08-28 89
5215e16244ee58 Luo bin 2020-08-28 90 read_data = kzalloc(sizeof(*read_data), GFP_KERNEL);
5215e16244ee58 Luo bin 2020-08-28 91 if (!read_data)
5215e16244ee58 Luo bin 2020-08-28 @92 return ~0;
Should be -ENOMEM instead of -EPERM (~0).
5215e16244ee58 Luo bin 2020-08-28 93
5215e16244ee58 Luo bin 2020-08-28 94 read_data->node = TBL_ID_FUNC_CFG_SM_NODE;
5215e16244ee58 Luo bin 2020-08-28 95 read_data->inst = TBL_ID_FUNC_CFG_SM_INST;
5215e16244ee58 Luo bin 2020-08-28 96 read_data->entry_size = HINIC_FUNCTION_CONFIGURE_TABLE_SIZE;
5215e16244ee58 Luo bin 2020-08-28 97 read_data->lt_index = HINIC_HWIF_FUNC_IDX(nic_dev->hwdev->hwif);
5215e16244ee58 Luo bin 2020-08-28 98 read_data->len = HINIC_FUNCTION_CONFIGURE_TABLE_SIZE;
5215e16244ee58 Luo bin 2020-08-28 99
5215e16244ee58 Luo bin 2020-08-28 100 err = hinic_port_msg_cmd(nic_dev->hwdev, HINIC_PORT_CMD_RD_LINE_TBL, read_data,
5215e16244ee58 Luo bin 2020-08-28 101 sizeof(*read_data), read_data, &out_size);
5215e16244ee58 Luo bin 2020-08-28 102 if (err || out_size != sizeof(*read_data) || read_data->status) {
5215e16244ee58 Luo bin 2020-08-28 103 netif_err(nic_dev, drv, nic_dev->netdev,
5215e16244ee58 Luo bin 2020-08-28 104 "Failed to get func table, err: %d, status: 0x%x, out size: 0x%x\n",
5215e16244ee58 Luo bin 2020-08-28 105 err, read_data->status, out_size);
5215e16244ee58 Luo bin 2020-08-28 106 kfree(read_data);
5215e16244ee58 Luo bin 2020-08-28 107 return ~0;
return -EINVAL;
5215e16244ee58 Luo bin 2020-08-28 108 }
5215e16244ee58 Luo bin 2020-08-28 109
5215e16244ee58 Luo bin 2020-08-28 110 funcfg_table_elem = (struct tag_sml_funcfg_tbl *)read_data->data;
5215e16244ee58 Luo bin 2020-08-28 111
5215e16244ee58 Luo bin 2020-08-28 112 switch (idx) {
5215e16244ee58 Luo bin 2020-08-28 113 case VALID:
5215e16244ee58 Luo bin 2020-08-28 114 return funcfg_table_elem->dw0.bs.valid;
5215e16244ee58 Luo bin 2020-08-28 115 case RX_MODE:
5215e16244ee58 Luo bin 2020-08-28 116 return funcfg_table_elem->dw0.bs.nic_rx_mode;
5215e16244ee58 Luo bin 2020-08-28 117 case MTU:
5215e16244ee58 Luo bin 2020-08-28 118 return funcfg_table_elem->dw1.bs.mtu;
5215e16244ee58 Luo bin 2020-08-28 119 case RQ_DEPTH:
5215e16244ee58 Luo bin 2020-08-28 120 return funcfg_table_elem->dw13.bs.cfg_rq_depth;
5215e16244ee58 Luo bin 2020-08-28 121 case QUEUE_NUM:
5215e16244ee58 Luo bin 2020-08-28 122 return funcfg_table_elem->dw13.bs.cfg_q_num;
5215e16244ee58 Luo bin 2020-08-28 123 }
5215e16244ee58 Luo bin 2020-08-28 124
5215e16244ee58 Luo bin 2020-08-28 125 kfree(read_data);
5215e16244ee58 Luo bin 2020-08-28 126
5215e16244ee58 Luo bin 2020-08-28 127 return ~0;
-EINVAL;
5215e16244ee58 Luo bin 2020-08-28 128 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH v3 1/4] fpga: dfl: reorganize to subdir layout
by kernel test robot
Hi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.13-rc6 next-20210615]
[cannot apply to xlnx/master]
[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/trix-redhat-com/fpga-reorganize-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 94f0b2d4a1d0c52035aef425da5e022bd2cb1c71
config: x86_64-randconfig-a001-20210615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/56f921cb10c08e89e237940f556198696...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review trix-redhat-com/fpga-reorganize-to-subdirs/20210616-121609
git checkout 56f921cb10c08e89e237940f55619869650f9d5b
# 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 warnings (new ones prefixed by >>):
drivers/fpga/dfl/dfl-fme-pr.c:175: warning: Function parameter or member 'feature' not described in 'dfl_fme_create_mgr'
>> drivers/fpga/dfl/dfl-fme-pr.c:280: warning: expecting prototype for dfl_fme_destroy_bridge(). Prototype was for dfl_fme_destroy_bridges() instead
vim +280 drivers/fpga/dfl/dfl-fme-pr.c
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 274
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 275 /**
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 276 * dfl_fme_destroy_bridge - destroy all fpga bridge platform device
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 277 * @pdata: fme platform device's pdata
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 278 */
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 279 static void dfl_fme_destroy_bridges(struct dfl_feature_platform_data *pdata)
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 @280 {
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 281 struct dfl_fme *priv = dfl_fpga_pdata_get_private(pdata);
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 282 struct dfl_fme_bridge *fbridge, *tmp;
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 283
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 284 list_for_each_entry_safe(fbridge, tmp, &priv->bridge_list, node) {
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 285 list_del(&fbridge->node);
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 286 dfl_fme_destroy_bridge(fbridge);
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 287 }
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 288 }
29de76240e861d drivers/fpga/dfl-fme-pr.c Kang Luwei 2018-06-30 289
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[chrome-os:chromeos-5.10 13103/13368] drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:389 sdma_v5_2_ring_emit_mem_sync() warn: inconsistent indenting
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: 9a4485b33838e9b8695558672870a0f29b241133
commit: 508833d31d24416cbd73b3fbea7df42e5a00ac1f [13103/13368] UPSTREAM: drm/amdgpu: Add graphics cache rinse packet for sdma
config: i386-randconfig-m021-20210615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:389 sdma_v5_2_ring_emit_mem_sync() warn: inconsistent indenting
vim +389 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
371
372 /**
373 * sdma_v5_2_ring_emit_mem_sync - flush the IB by graphics cache rinse
374 *
375 * @ring: amdgpu ring pointer
376 * @job: job to retrieve vmid from
377 * @ib: IB object to schedule
378 *
379 * flush the IB by graphics cache rinse.
380 */
381 static void sdma_v5_2_ring_emit_mem_sync(struct amdgpu_ring *ring)
382 {
383 uint32_t gcr_cntl =
384 SDMA_GCR_GL2_INV | SDMA_GCR_GL2_WB | SDMA_GCR_GLM_INV |
385 SDMA_GCR_GL1_INV | SDMA_GCR_GLV_INV | SDMA_GCR_GLK_INV |
386 SDMA_GCR_GLI_INV(1);
387
388 /* flush entire cache L0/L1/L2, this can be optimized by performance requirement */
> 389 amdgpu_ring_write(ring, SDMA_PKT_HEADER_OP(SDMA_OP_GCR_REQ));
390 amdgpu_ring_write(ring, SDMA_PKT_GCR_REQ_PAYLOAD1_BASE_VA_31_7(0));
391 amdgpu_ring_write(ring, SDMA_PKT_GCR_REQ_PAYLOAD2_GCR_CONTROL_15_0(gcr_cntl) |
392 SDMA_PKT_GCR_REQ_PAYLOAD2_BASE_VA_47_32(0));
393 amdgpu_ring_write(ring, SDMA_PKT_GCR_REQ_PAYLOAD3_LIMIT_VA_31_7(0) |
394 SDMA_PKT_GCR_REQ_PAYLOAD3_GCR_CONTROL_18_16(gcr_cntl >> 16));
395 amdgpu_ring_write(ring, SDMA_PKT_GCR_REQ_PAYLOAD4_LIMIT_VA_47_32(0) |
396 SDMA_PKT_GCR_REQ_PAYLOAD4_VMID(0));
397 }
398
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH net-next 10/11] net: marvell: prestera: add storm control (rate limiter) implementation
by kernel test robot
Hi Oleksandr,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kselftest/next]
[also build test WARNING on net/master linus/master v5.13-rc6]
[cannot apply to net-next/master sparc-next/master next-20210615]
[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/Oleksandr-Mazur/Marvell-Prestera...
base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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/d1e2db61850ee143f7aa180d34efb413f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Oleksandr-Mazur/Marvell-Prestera-driver-implementation-of-devlink-functionality/20210616-112917
git checkout d1e2db61850ee143f7aa180d34efb413f0956abd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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 >>):
drivers/net/ethernet/marvell/prestera/prestera_devlink.c: In function 'prestera_devlink_port_param_set':
>> drivers/net/ethernet/marvell/prestera/prestera_devlink.c:693:26: warning: variable 'sw' set but not used [-Wunused-but-set-variable]
693 | struct prestera_switch *sw;
| ^~
drivers/net/ethernet/marvell/prestera/prestera_devlink.c: In function 'prestera_devlink_port_param_get':
drivers/net/ethernet/marvell/prestera/prestera_devlink.c:736:26: warning: variable 'sw' set but not used [-Wunused-but-set-variable]
736 | struct prestera_switch *sw;
| ^~
vim +/sw +693 drivers/net/ethernet/marvell/prestera/prestera_devlink.c
686
687 static int prestera_devlink_port_param_set(struct devlink_port *dl_port, u32 id,
688 struct devlink_param_gset_ctx *ctx)
689 {
690 struct prestera_strom_control_cfg *cfg;
691 u32 kbyte_per_sec_rate = ctx->val.vu32;
692 struct prestera_port *port;
> 693 struct prestera_switch *sw;
694 u32 *param_to_set;
695 u32 storm_type;
696 int ret;
697
698 port = container_of(dl_port, struct prestera_port, dl_port);
699 sw = devlink_priv(dl_port->devlink);
700 cfg = &port->storm_control;
701
702 switch (id) {
703 case PRESTERA_DEVLINK_PORT_PARAM_ID_BC_RATE:
704 param_to_set = &cfg->bc_kbyte_per_sec_rate;
705 storm_type = PRESTERA_PORT_STORM_CTL_TYPE_BC;
706 break;
707 case PRESTERA_DEVLINK_PORT_PARAM_ID_UC_UNK_RATE:
708 param_to_set = &cfg->unk_uc_kbyte_per_sec_rate;
709 storm_type = PRESTERA_PORT_STORM_CTL_TYPE_UC_UNK;
710 break;
711 case PRESTERA_DEVLINK_PORT_PARAM_ID_MC_RATE:
712 param_to_set = &cfg->unreg_mc_kbyte_per_sec_rate;
713 storm_type = PRESTERA_PORT_STORM_CTL_TYPE_MC;
714 break;
715 default:
716 return -EINVAL;
717 }
718
719 if (kbyte_per_sec_rate != *param_to_set) {
720 ret = prestera_hw_port_storm_control_cfg_set(port, storm_type,
721 kbyte_per_sec_rate);
722 if (ret)
723 return ret;
724
725 *param_to_set = kbyte_per_sec_rate;
726 }
727
728 return 0;
729 }
730
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[xlnx:xlnx_rebase_v5.4 906/1762] ld.lld: error: duplicate symbol: dwc3_simple_check_quirks
by kernel test robot
Hi Piyush,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: d128303e4c53bcf7775c46771bf64c71596f3303
commit: 782658c51bbcd85a39a5d9a51b57224f185d7670 [906/1762] usb: dwc3: Correct errors when dwc3 loaded as module
config: x86_64-randconfig-a014-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/Xilinx/linux-xlnx/commit/782658c51bbcd85a39a5d9a51b572...
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.4
git checkout 782658c51bbcd85a39a5d9a51b57224f185d7670
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):
>> ld.lld: error: duplicate symbol: dwc3_simple_check_quirks
>>> defined at core.h:1434 (drivers/usb/dwc3/core.h:1434)
>>> usb/dwc3/core.o:(dwc3_simple_check_quirks) in archive drivers/built-in.a
>>> defined at core.h:1434 (drivers/usb/dwc3/core.h:1434)
>>> usb/dwc3/trace.o:(.text+0x40) in archive drivers/built-in.a
--
>> ld.lld: error: duplicate symbol: dwc3_simple_check_quirks
>>> defined at core.h:1434 (drivers/usb/dwc3/core.h:1434)
>>> usb/dwc3/core.o:(dwc3_simple_check_quirks) in archive drivers/built-in.a
>>> defined at core.h:1434 (drivers/usb/dwc3/core.h:1434)
>>> usb/dwc3/host.o:(.text+0x40) in archive drivers/built-in.a
--
>> ld.lld: error: duplicate symbol: dwc3_simple_check_quirks
>>> defined at core.h:1434 (drivers/usb/dwc3/core.h:1434)
>>> usb/dwc3/core.o:(dwc3_simple_check_quirks) in archive drivers/built-in.a
>>> defined at core.h:1434 (drivers/usb/dwc3/core.h:1434)
>>> usb/dwc3/debugfs.o:(.text+0x40) in archive drivers/built-in.a
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[avpatel:riscv_aia_v1 16/18] drivers/irqchip/irq-riscv-aplic.c:358:13: error: 'struct aplic_priv' has no member named 'msippn'
by kernel test robot
tree: https://github.com/avpatel/linux.git riscv_aia_v1
head: 679a7344562d3b82d931bed973307536d9d77035
commit: 266a0e87b7e61e0d9f429cde996e9d70142d0cdd [16/18] irqchip: Add RISC-V advanced platform-level interrupt controller driver
config: riscv-nommu_virt_defconfig (attached as .config)
compiler: riscv64-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/avpatel/linux/commit/266a0e87b7e61e0d9f429cde996e9d701...
git remote add avpatel https://github.com/avpatel/linux.git
git fetch --no-tags avpatel riscv_aia_v1
git checkout 266a0e87b7e61e0d9f429cde996e9d70142d0cdd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 >>):
drivers/irqchip/irq-riscv-aplic.c: In function 'aplic_init_hw_global':
>> drivers/irqchip/irq-riscv-aplic.c:358:13: error: 'struct aplic_priv' has no member named 'msippn'
358 | val = priv->msippn.base;
| ^~
drivers/irqchip/irq-riscv-aplic.c:359:15: error: 'struct aplic_priv' has no member named 'msippn'
359 | valH = (priv->msippn.base >> 32) &
| ^~
drivers/irqchip/irq-riscv-aplic.c:361:16: error: 'struct aplic_priv' has no member named 'msippn'
361 | valH |= (priv->msippn.lhxw & APLIC_xMSICFGADDRH_LHXW_MASK)
| ^~
drivers/irqchip/irq-riscv-aplic.c:363:16: error: 'struct aplic_priv' has no member named 'msippn'
363 | valH |= (priv->msippn.hhxw & APLIC_xMSICFGADDRH_HHXW_MASK)
| ^~
drivers/irqchip/irq-riscv-aplic.c:365:16: error: 'struct aplic_priv' has no member named 'msippn'
365 | valH |= (priv->msippn.lhxs & APLIC_xMSICFGADDRH_LHXS_MASK)
| ^~
drivers/irqchip/irq-riscv-aplic.c:367:16: error: 'struct aplic_priv' has no member named 'msippn'
367 | valH |= (priv->msippn.hhxs & APLIC_xMSICFGADDRH_HHXS_MASK)
| ^~
vim +358 drivers/irqchip/irq-riscv-aplic.c
350
351 static void aplic_init_hw_global(struct aplic_priv *priv)
352 {
353 u32 val;
354 #ifdef CONFIG_RISCV_M_MODE
355 u32 valH;
356
357 if (!priv->nr_idcs) {
> 358 val = priv->msippn.base;
359 valH = (priv->msippn.base >> 32) &
360 APLIC_xMSICFGADDRH_BAPPN_MASK;
361 valH |= (priv->msippn.lhxw & APLIC_xMSICFGADDRH_LHXW_MASK)
362 << APLIC_xMSICFGADDRH_LHXW_SHIFT;
363 valH |= (priv->msippn.hhxw & APLIC_xMSICFGADDRH_HHXW_MASK)
364 << APLIC_xMSICFGADDRH_HHXW_SHIFT;
365 valH |= (priv->msippn.lhxs & APLIC_xMSICFGADDRH_LHXS_MASK)
366 << APLIC_xMSICFGADDRH_LHXS_SHIFT;
367 valH |= (priv->msippn.hhxs & APLIC_xMSICFGADDRH_HHXS_MASK)
368 << APLIC_xMSICFGADDRH_HHXS_SHIFT;
369 writel(val, priv->regs + APLIC_xMSICFGADDR);
370 writel(valH, priv->regs + APLIC_xMSICFGADDRH);
371 }
372 #endif
373
374 /* Setup APLIC domaincfg register */
375 val = readl(priv->regs + APLIC_DOMAINCFG);
376 val |= APLIC_DOMAINCFG_IE;
377 if (!priv->nr_idcs)
378 val |= APLIC_DOMAINCFG_DM;
379 writel(val, priv->regs + APLIC_DOMAINCFG);
380 if (readl(priv->regs + APLIC_DOMAINCFG) != val)
381 dev_warn(priv->dev,
382 "unable to write 0x%x in domaincfg\n", val);
383 }
384
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[linux-next:master 5116/5396] mm/memory.c:710:25: sparse: sparse: cast to non-scalar
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: f6b46ef27317b3441138b902689bd89e4f82c6f4
commit: ce50e82c1d69532fc05721ed7951480c8525e7fd [5116/5396] mm: device exclusive memory access
config: alpha-randconfig-s032-20210526 (attached as .config)
compiler: alpha-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-341-g8af24329-dirty
# 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 ce50e82c1d69532fc05721ed7951480c8525e7fd
# 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__' W=1 ARCH=alpha
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 >>)
>> mm/memory.c:710:25: sparse: sparse: cast to non-scalar
>> mm/memory.c:710:25: sparse: sparse: cast from non-scalar
mm/memory.c:1024:17: sparse: sparse: context imbalance in 'copy_pte_range' - different lock contexts for basic block
mm/memory.c:1721:16: sparse: sparse: context imbalance in '__get_locked_pte' - different lock contexts for basic block
mm/memory.c:1770:9: sparse: sparse: context imbalance in 'insert_page' - different lock contexts for basic block
mm/memory.c:2272:17: sparse: sparse: context imbalance in 'remap_pte_range' - different lock contexts for basic block
mm/memory.c:2528:17: sparse: sparse: context imbalance in 'apply_to_pte_range' - unexpected unlock
mm/memory.c:2816:17: sparse: sparse: context imbalance in 'wp_page_copy' - unexpected unlock
mm/memory.c:3162:17: sparse: sparse: context imbalance in 'wp_pfn_shared' - unexpected unlock
mm/memory.c:3225:19: sparse: sparse: context imbalance in 'do_wp_page' - different lock contexts for basic block
mm/memory.c: note: in included file (through include/linux/mm.h, arch/alpha/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
include/linux/pgtable.h:257:16: sparse: sparse: cast to non-scalar
include/linux/pgtable.h:257:16: sparse: sparse: cast from non-scalar
mm/memory.c:4823:5: sparse: sparse: context imbalance in 'follow_invalidate_pte' - different lock contexts for basic block
mm/memory.c:4944:9: sparse: sparse: context imbalance in 'follow_pfn' - unexpected unlock
vim +710 mm/memory.c
702
703 static void restore_exclusive_pte(struct vm_area_struct *vma,
704 struct page *page, unsigned long address,
705 pte_t *ptep)
706 {
707 pte_t pte;
708 swp_entry_t entry;
709
> 710 pte = pte_mkold(mk_pte(page, READ_ONCE(vma->vm_page_prot)));
711 if (pte_swp_soft_dirty(*ptep))
712 pte = pte_mksoft_dirty(pte);
713
714 entry = pte_to_swp_entry(*ptep);
715 if (pte_swp_uffd_wp(*ptep))
716 pte = pte_mkuffd_wp(pte);
717 else if (is_writable_device_exclusive_entry(entry))
718 pte = maybe_mkwrite(pte_mkdirty(pte), vma);
719
720 set_pte_at(vma->vm_mm, address, ptep, pte);
721
722 /*
723 * No need to take a page reference as one was already
724 * created when the swap entry was made.
725 */
726 if (PageAnon(page))
727 page_add_anon_rmap(page, vma, address, false);
728 else
729 /*
730 * Currently device exclusive access only supports anonymous
731 * memory so the entry shouldn't point to a filebacked page.
732 */
733 WARN_ON_ONCE(!PageAnon(page));
734
735 if (vma->vm_flags & VM_LOCKED)
736 mlock_vma_page(page);
737
738 /*
739 * No need to invalidate - it was non-present before. However
740 * secondary CPUs may have mappings that need invalidating.
741 */
742 update_mmu_cache(vma, address, ptep);
743 }
744
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months