Re: [PATCH 19/23] cxl/pci: Store component register base in cxlds
by kernel test robot
Hi Ben,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 53989fad1286e652ea3655ae3367ba698da8d2ff]
url: https://github.com/0day-ci/linux/commits/Ben-Widawsky/Add-drivers-for-CXL...
base: 53989fad1286e652ea3655ae3367ba698da8d2ff
config: riscv-buildonly-randconfig-r001-20211119 (attached as .config)
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://github.com/0day-ci/linux/commit/3f74c99d751a24a4c12ba76c23b68c283...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ben-Widawsky/Add-drivers-for-CXL-ports-and-mem-devices/20211120-080513
git checkout 3f74c99d751a24a4c12ba76c23b68c2832f805e1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
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/cxl/pci.c:469:7: warning: variable 'size' set but not used [-Wunused-but-set-variable]
u64 size;
^
drivers/cxl/pci.c:516:7: warning: variable 'size' set but not used [-Wunused-but-set-variable]
u64 size;
^
>> drivers/cxl/pci.c:673:13: warning: variable 'cxlmd' is uninitialized when used here [-Wuninitialized]
dev_warn(&cxlmd->dev, "No component registers (%d)\n", rc);
^~~~~
include/linux/dev_printk.h:146:49: note: expanded from macro 'dev_warn'
dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~
include/linux/dev_printk.h:110:11: note: expanded from macro 'dev_printk_index_wrap'
_p_func(dev, fmt, ##__VA_ARGS__); \
^~~
drivers/cxl/pci.c:630:26: note: initialize the variable 'cxlmd' to silence this warning
struct cxl_memdev *cxlmd;
^
= NULL
3 warnings generated.
vim +/cxlmd +673 drivers/cxl/pci.c
625
626 static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
627 {
628 struct cxl_endpoint_dvsec_info *info;
629 struct cxl_register_map map;
630 struct cxl_memdev *cxlmd;
631 struct cxl_dev_state *cxlds;
632 int rc;
633
634 /*
635 * Double check the anonymous union trickery in struct cxl_regs
636 * FIXME switch to struct_group()
637 */
638 BUILD_BUG_ON(offsetof(struct cxl_regs, memdev) !=
639 offsetof(struct cxl_regs, device_regs.memdev));
640
641 rc = pcim_enable_device(pdev);
642 if (rc)
643 return rc;
644
645 cxlds = cxl_dev_state_create(&pdev->dev);
646 if (IS_ERR(cxlds))
647 return PTR_ERR(cxlds);
648
649 cxlds->device_dvsec = pci_find_dvsec_capability(pdev,
650 PCI_DVSEC_VENDOR_ID_CXL,
651 CXL_DVSEC_PCIE_DEVICE);
652 if (!cxlds->device_dvsec)
653 dev_warn(&pdev->dev,
654 "Device DVSEC not present. Expect limited functionality.\n");
655 else
656 cxlds->wait_media_ready = wait_for_media_ready;
657
658 rc = cxl_setup_regs(pdev, CXL_REGLOC_RBI_MEMDEV, &map);
659 if (rc)
660 return rc;
661
662 rc = cxl_map_regs(cxlds, &map);
663 if (rc)
664 return rc;
665
666 /*
667 * If the component registers can't be found, the cxl_pci driver may
668 * still be useful for management functions so don't return an error.
669 */
670 cxlds->component_reg_phys = CXL_RESOURCE_NONE;
671 rc = cxl_setup_regs(pdev, CXL_REGLOC_RBI_COMPONENT, &map);
672 if (rc)
> 673 dev_warn(&cxlmd->dev, "No component registers (%d)\n", rc);
674 else
675 cxlds->component_reg_phys = cxl_reg_block(pdev, &map);
676
677 rc = cxl_pci_setup_mailbox(cxlds);
678 if (rc)
679 return rc;
680
681 rc = cxl_enumerate_cmds(cxlds);
682 if (rc)
683 return rc;
684
685 rc = cxl_dev_state_identify(cxlds);
686 if (rc)
687 return rc;
688
689 rc = cxl_mem_create_range_info(cxlds);
690 if (rc)
691 return rc;
692
693 info = dvsec_ranges(cxlds);
694 if (IS_ERR(info))
695 dev_err(&pdev->dev,
696 "Failed to get DVSEC range information (%ld)\n",
697 PTR_ERR(info));
698 else
699 cxlds->info = info;
700
701 cxlmd = devm_cxl_add_memdev(cxlds);
702 if (IS_ERR(cxlmd))
703 return PTR_ERR(cxlmd);
704
705 if (range_len(&cxlds->pmem_range) && IS_ENABLED(CONFIG_CXL_PMEM))
706 rc = devm_cxl_add_nvdimm(&pdev->dev, cxlmd);
707
708 return rc;
709 }
710
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
kernel/bpf/btf.c:5346:29: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute
by kernel test robot
Hi Alan,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a90af8f15bdc9449ee2d24e1d73fa3f7e8633f81
commit: 31d0bc81637d8d974a6dad9827b765b4b70c89d7 bpf: Move to generic BTF show support, apply it to seq files/strings
date: 1 year, 2 months ago
config: nds32-buildonly-randconfig-r002-20210927 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 11.2.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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 31d0bc81637d8d974a6dad9827b765b4b70c89d7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nds32
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 >>):
kernel/bpf/btf.c: In function 'btf_seq_show':
>> kernel/bpf/btf.c:5346:29: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
5346 | seq_vprintf((struct seq_file *)show->target, fmt, args);
| ^~~~~~~~
kernel/bpf/btf.c: In function 'btf_snprintf_show':
>> kernel/bpf/btf.c:5383:9: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
5383 | len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
| ^~~
vim +5346 kernel/bpf/btf.c
5342
5343 static void btf_seq_show(struct btf_show *show, const char *fmt,
5344 va_list args)
5345 {
> 5346 seq_vprintf((struct seq_file *)show->target, fmt, args);
5347 }
5348
5349 static int btf_type_seq_show_flags(const struct btf *btf, u32 type_id,
5350 void *obj, struct seq_file *m, u64 flags)
5351 {
5352 struct btf_show sseq;
5353
5354 sseq.target = m;
5355 sseq.showfn = btf_seq_show;
5356 sseq.flags = flags;
5357
5358 btf_type_show(btf, type_id, obj, &sseq);
5359
5360 return sseq.state.status;
5361 }
5362
5363 void btf_type_seq_show(const struct btf *btf, u32 type_id, void *obj,
5364 struct seq_file *m)
5365 {
5366 (void) btf_type_seq_show_flags(btf, type_id, obj, m,
5367 BTF_SHOW_NONAME | BTF_SHOW_COMPACT |
5368 BTF_SHOW_ZERO | BTF_SHOW_UNSAFE);
5369 }
5370
5371 struct btf_show_snprintf {
5372 struct btf_show show;
5373 int len_left; /* space left in string */
5374 int len; /* length we would have written */
5375 };
5376
5377 static void btf_snprintf_show(struct btf_show *show, const char *fmt,
5378 va_list args)
5379 {
5380 struct btf_show_snprintf *ssnprintf = (struct btf_show_snprintf *)show;
5381 int len;
5382
> 5383 len = vsnprintf(show->target, ssnprintf->len_left, fmt, args);
5384
5385 if (len < 0) {
5386 ssnprintf->len_left = 0;
5387 ssnprintf->len = len;
5388 } else if (len > ssnprintf->len_left) {
5389 /* no space, drive on to get length we would have written */
5390 ssnprintf->len_left = 0;
5391 ssnprintf->len += len;
5392 } else {
5393 ssnprintf->len_left -= len;
5394 ssnprintf->len += len;
5395 show->target += len;
5396 }
5397 }
5398
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
sound/soc/codecs/tlv320aic32x4.c:1202:18: warning: cast to smaller integer type 'enum aic32x4_type' from 'void *'
by kernel test robot
Hi Claudius,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a90af8f15bdc9449ee2d24e1d73fa3f7e8633f81
commit: 688d47cdd9344b1485eb28c2a7aa99743ed529a3 ASoC: tlv320aic32x4: add type to device private data struct
date: 5 months ago
config: x86_64-randconfig-a005-20211116 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 688d47cdd9344b1485eb28c2a7aa99743ed529a3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):
>> sound/soc/codecs/tlv320aic32x4.c:1202:18: warning: cast to smaller integer type 'enum aic32x4_type' from 'void *' [-Wvoid-pointer-to-enum-cast]
aic32x4->type = (enum aic32x4_type)dev_get_drvdata(dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +1202 sound/soc/codecs/tlv320aic32x4.c
1185
1186 int aic32x4_probe(struct device *dev, struct regmap *regmap)
1187 {
1188 struct aic32x4_priv *aic32x4;
1189 struct aic32x4_pdata *pdata = dev->platform_data;
1190 struct device_node *np = dev->of_node;
1191 int ret;
1192
1193 if (IS_ERR(regmap))
1194 return PTR_ERR(regmap);
1195
1196 aic32x4 = devm_kzalloc(dev, sizeof(struct aic32x4_priv),
1197 GFP_KERNEL);
1198 if (aic32x4 == NULL)
1199 return -ENOMEM;
1200
1201 aic32x4->dev = dev;
> 1202 aic32x4->type = (enum aic32x4_type)dev_get_drvdata(dev);
1203
1204 dev_set_drvdata(dev, aic32x4);
1205
1206 if (pdata) {
1207 aic32x4->power_cfg = pdata->power_cfg;
1208 aic32x4->swapdacs = pdata->swapdacs;
1209 aic32x4->micpga_routing = pdata->micpga_routing;
1210 aic32x4->rstn_gpio = pdata->rstn_gpio;
1211 aic32x4->mclk_name = "mclk";
1212 } else if (np) {
1213 ret = aic32x4_parse_dt(aic32x4, np);
1214 if (ret) {
1215 dev_err(dev, "Failed to parse DT node\n");
1216 return ret;
1217 }
1218 } else {
1219 aic32x4->power_cfg = 0;
1220 aic32x4->swapdacs = false;
1221 aic32x4->micpga_routing = 0;
1222 aic32x4->rstn_gpio = -1;
1223 aic32x4->mclk_name = "mclk";
1224 }
1225
1226 if (gpio_is_valid(aic32x4->rstn_gpio)) {
1227 ret = devm_gpio_request_one(dev, aic32x4->rstn_gpio,
1228 GPIOF_OUT_INIT_LOW, "tlv320aic32x4 rstn");
1229 if (ret != 0)
1230 return ret;
1231 }
1232
1233 ret = aic32x4_setup_regulators(dev, aic32x4);
1234 if (ret) {
1235 dev_err(dev, "Failed to setup regulators\n");
1236 return ret;
1237 }
1238
1239 if (gpio_is_valid(aic32x4->rstn_gpio)) {
1240 ndelay(10);
1241 gpio_set_value_cansleep(aic32x4->rstn_gpio, 1);
1242 mdelay(1);
1243 }
1244
1245 ret = regmap_write(regmap, AIC32X4_RESET, 0x01);
1246 if (ret)
1247 goto err_disable_regulators;
1248
1249 ret = aic32x4_register_clocks(dev, aic32x4->mclk_name);
1250 if (ret)
1251 goto err_disable_regulators;
1252
1253 ret = devm_snd_soc_register_component(dev,
1254 &soc_component_dev_aic32x4, &aic32x4_dai, 1);
1255 if (ret) {
1256 dev_err(dev, "Failed to register component\n");
1257 goto err_disable_regulators;
1258 }
1259
1260 return 0;
1261
1262 err_disable_regulators:
1263 aic32x4_disable_regulators(aic32x4);
1264
1265 return ret;
1266 }
1267 EXPORT_SYMBOL(aic32x4_probe);
1268
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH 20/23] cxl/port: Introduce a port driver
by kernel test robot
Hi Ben,
I love your patch! Yet something to improve:
[auto build test ERROR on 53989fad1286e652ea3655ae3367ba698da8d2ff]
url: https://github.com/0day-ci/linux/commits/Ben-Widawsky/Add-drivers-for-CXL...
base: 53989fad1286e652ea3655ae3367ba698da8d2ff
config: arm-randconfig-r034-20211119 (attached as .config)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/8ff43502e84dd4fa1296a131cb0cc8214...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ben-Widawsky/Add-drivers-for-CXL-ports-and-mem-devices/20211120-080513
git checkout 8ff43502e84dd4fa1296a131cb0cc82146389db4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 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/cxl/port.c:105:9: error: implicit declaration of function 'ioread64_hi_lo' [-Werror,-Wimplicit-function-declaration]
return ioread64_hi_lo(hdm_decoder +
^
drivers/cxl/port.c:191:11: error: implicit declaration of function 'ioread64_hi_lo' [-Werror,-Wimplicit-function-declaration]
base = ioread64_hi_lo(decoderN(BASE_LOW_OFFSET, i));
^
2 errors generated.
vim +/ioread64_hi_lo +105 drivers/cxl/port.c
97
98 static u64 get_decoder_size(void __iomem *hdm_decoder, int n)
99 {
100 u32 ctrl = readl(hdm_decoder + CXL_HDM_DECODER0_CTRL_OFFSET(n));
101
102 if (ctrl & CXL_HDM_DECODER0_CTRL_COMMITTED)
103 return 0;
104
> 105 return ioread64_hi_lo(hdm_decoder +
106 CXL_HDM_DECODER0_SIZE_LOW_OFFSET(n));
107 }
108
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH] MM: introduce memalloc_retry_wait()
by kernel test robot
Hi NeilBrown,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on jaegeuk-f2fs/dev-test]
[also build test ERROR on v5.16-rc1 next-20211118]
[cannot apply to xfs-linux/for-next]
[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/NeilBrown/MM-introduce-memalloc_...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
config: arc-randconfig-r043-20211117 (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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/1da355dc212c5f6ade3a21d4a5b1cfaf6...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review NeilBrown/MM-introduce-memalloc_retry_wait/20211117-122932
git checkout 1da355dc212c5f6ade3a21d4a5b1cfaf6b48ff0f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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 errors (new ones prefixed by >>):
fs/f2fs/super.c: In function 'f2fs_quota_read':
>> fs/f2fs/super.c:2417:33: error: implicit declaration of function 'memalloc_retry_wait' [-Werror=implicit-function-declaration]
2417 | memalloc_retry_wait(GFP_NOFS);
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/memalloc_retry_wait +2417 fs/f2fs/super.c
2389
2390 #ifdef CONFIG_QUOTA
2391 /* Read data from quotafile */
2392 static ssize_t f2fs_quota_read(struct super_block *sb, int type, char *data,
2393 size_t len, loff_t off)
2394 {
2395 struct inode *inode = sb_dqopt(sb)->files[type];
2396 struct address_space *mapping = inode->i_mapping;
2397 block_t blkidx = F2FS_BYTES_TO_BLK(off);
2398 int offset = off & (sb->s_blocksize - 1);
2399 int tocopy;
2400 size_t toread;
2401 loff_t i_size = i_size_read(inode);
2402 struct page *page;
2403 char *kaddr;
2404
2405 if (off > i_size)
2406 return 0;
2407
2408 if (off + len > i_size)
2409 len = i_size - off;
2410 toread = len;
2411 while (toread > 0) {
2412 tocopy = min_t(unsigned long, sb->s_blocksize - offset, toread);
2413 repeat:
2414 page = read_cache_page_gfp(mapping, blkidx, GFP_NOFS);
2415 if (IS_ERR(page)) {
2416 if (PTR_ERR(page) == -ENOMEM) {
> 2417 memalloc_retry_wait(GFP_NOFS);
2418 goto repeat;
2419 }
2420 set_sbi_flag(F2FS_SB(sb), SBI_QUOTA_NEED_REPAIR);
2421 return PTR_ERR(page);
2422 }
2423
2424 lock_page(page);
2425
2426 if (unlikely(page->mapping != mapping)) {
2427 f2fs_put_page(page, 1);
2428 goto repeat;
2429 }
2430 if (unlikely(!PageUptodate(page))) {
2431 f2fs_put_page(page, 1);
2432 set_sbi_flag(F2FS_SB(sb), SBI_QUOTA_NEED_REPAIR);
2433 return -EIO;
2434 }
2435
2436 kaddr = kmap_atomic(page);
2437 memcpy(data, kaddr + offset, tocopy);
2438 kunmap_atomic(kaddr);
2439 f2fs_put_page(page, 1);
2440
2441 offset = 0;
2442 toread -= tocopy;
2443 data += tocopy;
2444 blkidx++;
2445 }
2446 return len;
2447 }
2448
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH 2/2] PCI: vmd: Override ASPM on TGL/ADL VMD devices
by kernel test robot
Hi "David,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on helgaas-pci/next]
[also build test WARNING on v5.16-rc1 next-20211118]
[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/David-E-Box/PCI-ASPM-Add-ASPM-BI...
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: x86_64-randconfig-a012-20211118 (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/d0452407e2d5bf22bd1094654d7e86831...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review David-E-Box/PCI-ASPM-Add-ASPM-BIOS-override-function/20211120-095959
git checkout d0452407e2d5bf22bd1094654d7e868311b7c94e
# 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/pci/controller/vmd.c:676:5: warning: no previous prototype for 'vmd_enable_aspm' [-Wmissing-prototypes]
676 | int vmd_enable_aspm(struct pci_dev *pdev, void *userdata)
| ^~~~~~~~~~~~~~~
vim +/vmd_enable_aspm +676 drivers/pci/controller/vmd.c
671
672 /*
673 * Override the BIOS ASPM policy and set the LTR value for PCI storage
674 * devices on the VMD bride.
675 */
> 676 int vmd_enable_aspm(struct pci_dev *pdev, void *userdata)
677 {
678 int features = *(int *)userdata;
679
680 if (features & VMD_FEAT_QUIRK_OVERRIDE_ASPM &&
681 pdev->class == PCI_CLASS_STORAGE_EXPRESS) {
682 int pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_LTR);
683
684 if (pos) {
685 pci_write_config_word(pdev, pos + PCI_LTR_MAX_SNOOP_LAT, 0x1003);
686 pci_write_config_word(pdev, pos + PCI_LTR_MAX_NOSNOOP_LAT, 0x1003);
687 pcie_aspm_policy_override(pdev);
688 }
689 }
690 return 0;
691 }
692
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
arch/mips/kernel/syscall.c:173:31: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a90af8f15bdc9449ee2d24e1d73fa3f7e8633f81
commit: ddb002d6d6af12c45dd9d565cadf0f40b36b7c25 MIPS: uaccess: Reduce number of nested macros
date: 7 months ago
config: mips-randconfig-s032-20211116 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 11.2.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.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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
>> arch/mips/kernel/syscall.c:173:31: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const [noderef] __user *__gu_ptr @@ got unsigned int * @@
arch/mips/kernel/syscall.c:173:31: sparse: expected unsigned int const [noderef] __user *__gu_ptr
arch/mips/kernel/syscall.c:173:31: sparse: got unsigned int *
>> arch/mips/kernel/syscall.c:174:32: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int [noderef] __user *__pu_ptr @@ got unsigned int * @@
arch/mips/kernel/syscall.c:174:32: sparse: expected unsigned int [noderef] __user *__pu_ptr
arch/mips/kernel/syscall.c:174:32: sparse: got unsigned int *
--
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
arch/mips/kernel/ptrace.c: note: in included file:
>> arch/mips/include/asm/syscall.h:70:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const [noderef] __user *__p @@ got int * @@
arch/mips/include/asm/syscall.h:70:17: sparse: expected int const [noderef] __user *__p
arch/mips/include/asm/syscall.h:70:17: sparse: got int *
--
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
arch/mips/kernel/signal.c:280:13: sparse: sparse: cast removes address space '__user' of expression
arch/mips/kernel/signal.c:280:13: sparse: sparse: cast removes address space '__user' of expression
>> arch/mips/kernel/signal.c:280:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int [noderef] __user *__pu_ptr @@ got unsigned int [usertype] * @@
arch/mips/kernel/signal.c:280:13: sparse: expected unsigned int [noderef] __user *__pu_ptr
arch/mips/kernel/signal.c:280:13: sparse: got unsigned int [usertype] *
arch/mips/kernel/signal.c:280:13: sparse: sparse: cast removes address space '__user' of expression
arch/mips/kernel/signal.c:293:23: sparse: sparse: cast removes address space '__user' of expression
arch/mips/kernel/signal.c:293:23: sparse: sparse: cast removes address space '__user' of expression
>> arch/mips/kernel/signal.c:293:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const [noderef] __user *__gu_ptr @@ got unsigned int * @@
arch/mips/kernel/signal.c:293:23: sparse: expected unsigned int const [noderef] __user *__gu_ptr
arch/mips/kernel/signal.c:293:23: sparse: got unsigned int *
arch/mips/kernel/signal.c:300:23: sparse: sparse: cast removes address space '__user' of expression
arch/mips/kernel/signal.c:300:23: sparse: sparse: cast removes address space '__user' of expression
arch/mips/kernel/signal.c:300:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const [noderef] __user *__gu_ptr @@ got unsigned int * @@
arch/mips/kernel/signal.c:300:23: sparse: expected unsigned int const [noderef] __user *__gu_ptr
arch/mips/kernel/signal.c:300:23: sparse: got unsigned int *
arch/mips/kernel/signal.c:630:17: sparse: sparse: symbol 'sys_sigreturn' was not declared. Should it be static?
arch/mips/kernel/signal.c:667:17: sparse: sparse: symbol 'sys_rt_sigreturn' was not declared. Should it be static?
arch/mips/kernel/signal.c:157:14: sparse: sparse: cast removes address space '__user' of expression
arch/mips/kernel/signal.c:157:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ucontext [noderef] __user *uc @@ got struct ucontext * @@
arch/mips/kernel/signal.c:157:12: sparse: expected struct ucontext [noderef] __user *uc
arch/mips/kernel/signal.c:157:12: sparse: got struct ucontext *
arch/mips/kernel/signal.c:157:14: sparse: sparse: cast removes address space '__user' of expression
arch/mips/kernel/signal.c:157:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ucontext [noderef] __user *uc @@ got struct ucontext * @@
arch/mips/kernel/signal.c:157:12: sparse: expected struct ucontext [noderef] __user *uc
arch/mips/kernel/signal.c:157:12: sparse: got struct ucontext *
--
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
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *p @@ got char *buf @@
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: expected void const [noderef] __user *p
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: got char *buf
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got char *dest @@
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: expected void [noderef] __user *to
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: got char *dest
>> arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int [noderef] __user *__p @@ got int * @@
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: expected int [noderef] __user *__p
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: got int *
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected int ( *read )( ... ) @@ got int ( * )( ... ) @@
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: expected int ( *read )( ... )
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: got int ( * )( ... )
--
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
kernel/ptrace.c:53:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/ptrace.c:53:22: sparse: struct task_struct *
kernel/ptrace.c:53:22: sparse: struct task_struct [noderef] __rcu *
kernel/ptrace.c:72:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct [noderef] __rcu *parent @@ got struct task_struct *new_parent @@
kernel/ptrace.c:72:23: sparse: expected struct task_struct [noderef] __rcu *parent
kernel/ptrace.c:72:23: sparse: got struct task_struct *new_parent
kernel/ptrace.c:73:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cred const [noderef] __rcu *ptracer_cred @@ got struct cred const * @@
kernel/ptrace.c:73:29: sparse: expected struct cred const [noderef] __rcu *ptracer_cred
kernel/ptrace.c:73:29: sparse: got struct cred const *
kernel/ptrace.c:127:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cred const *old_cred @@ got struct cred const [noderef] __rcu *ptracer_cred @@
kernel/ptrace.c:127:18: sparse: expected struct cred const *old_cred
kernel/ptrace.c:127:18: sparse: got struct cred const [noderef] __rcu *ptracer_cred
kernel/ptrace.c:131:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:131:25: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:131:25: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:169:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:169:27: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:169:27: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:181:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:181:28: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:181:28: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:186:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:186:30: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:186:30: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:196:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/ptrace.c:196:9: sparse: struct task_struct [noderef] __rcu *
kernel/ptrace.c:196:9: sparse: struct task_struct *
kernel/ptrace.c:241:44: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/ptrace.c:241:44: sparse: struct task_struct [noderef] __rcu *
kernel/ptrace.c:241:44: sparse: struct task_struct *
kernel/ptrace.c:415:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:415:24: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:415:24: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:438:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:438:26: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:438:26: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:474:54: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *parent @@ got struct task_struct [noderef] __rcu *parent @@
kernel/ptrace.c:474:54: sparse: expected struct task_struct *parent
kernel/ptrace.c:474:54: sparse: got struct task_struct [noderef] __rcu *parent
kernel/ptrace.c:482:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *new_parent @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/ptrace.c:482:53: sparse: expected struct task_struct *new_parent
kernel/ptrace.c:482:53: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/ptrace.c:530:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p1 @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/ptrace.c:530:41: sparse: expected struct task_struct *p1
kernel/ptrace.c:530:41: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/ptrace.c:532:50: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sighand_struct *sigh @@ got struct sighand_struct [noderef] __rcu *sighand @@
kernel/ptrace.c:532:50: sparse: expected struct sighand_struct *sigh
kernel/ptrace.c:532:50: sparse: got struct sighand_struct [noderef] __rcu *sighand
kernel/ptrace.c:734:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:734:37: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:734:37: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:742:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:742:39: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:742:39: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:847:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:847:37: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:847:37: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:851:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:851:39: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:851:39: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:1081:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:1081:37: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:1081:37: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:1083:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/ptrace.c:1083:39: sparse: expected struct spinlock [usertype] *lock
kernel/ptrace.c:1083:39: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:480:38: sparse: sparse: dereference of noderef expression
kernel/ptrace.c: note: in included file (through include/linux/rcuwait.h, include/linux/percpu-rwsem.h, include/linux/fs.h, ...):
include/linux/sched/signal.h:708:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
include/linux/sched/signal.h:708:37: sparse: expected struct spinlock [usertype] *lock
include/linux/sched/signal.h:708:37: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:681:9: sparse: sparse: context imbalance in 'ptrace_getsiginfo' - different lock contexts for basic block
include/linux/sched/signal.h:708:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
include/linux/sched/signal.h:708:37: sparse: expected struct spinlock [usertype] *lock
include/linux/sched/signal.h:708:37: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:697:9: sparse: sparse: context imbalance in 'ptrace_setsiginfo' - different lock contexts for basic block
kernel/ptrace.c:853:9: sparse: sparse: context imbalance in 'ptrace_resume' - different lock contexts for basic block
kernel/ptrace.c: note: in included file:
>> arch/mips/include/asm/syscall.h:70:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const [noderef] __user *__p @@ got int * @@
arch/mips/include/asm/syscall.h:70:17: sparse: expected int const [noderef] __user *__p
arch/mips/include/asm/syscall.h:70:17: sparse: got int *
kernel/ptrace.c: note: in included file (through include/linux/rcuwait.h, include/linux/percpu-rwsem.h, include/linux/fs.h, ...):
include/linux/sched/signal.h:708:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
include/linux/sched/signal.h:708:37: sparse: expected struct spinlock [usertype] *lock
include/linux/sched/signal.h:708:37: sparse: got struct spinlock [noderef] __rcu *
include/linux/sched/signal.h:708:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
include/linux/sched/signal.h:708:37: sparse: expected struct spinlock [usertype] *lock
include/linux/sched/signal.h:708:37: sparse: got struct spinlock [noderef] __rcu *
kernel/ptrace.c:1229:9: sparse: sparse: context imbalance in 'ptrace_request' - different lock contexts for basic block
--
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
kernel/seccomp.c:1333:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/seccomp.c:1333:31: sparse: expected struct spinlock [usertype] *lock
kernel/seccomp.c:1333:31: sparse: got struct spinlock [noderef] __rcu *
kernel/seccomp.c:1345:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/seccomp.c:1345:33: sparse: expected struct spinlock [usertype] *lock
kernel/seccomp.c:1345:33: sparse: got struct spinlock [noderef] __rcu *
kernel/seccomp.c:1831:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/seccomp.c:1831:31: sparse: expected struct spinlock [usertype] *lock
kernel/seccomp.c:1831:31: sparse: got struct spinlock [noderef] __rcu *
kernel/seccomp.c:1849:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/seccomp.c:1849:33: sparse: expected struct spinlock [usertype] *lock
kernel/seccomp.c:1849:33: sparse: got struct spinlock [noderef] __rcu *
kernel/seccomp.c: note: in included file:
>> arch/mips/include/asm/syscall.h:70:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const [noderef] __user *__p @@ got int * @@
arch/mips/include/asm/syscall.h:70:17: sparse: expected int const [noderef] __user *__p
arch/mips/include/asm/syscall.h:70:17: sparse: got int *
--
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/w1/slaves/w1_ds28e04.c:342:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected char [noderef] __user *__p @@ got char *buf @@
drivers/w1/slaves/w1_ds28e04.c:342:13: sparse: expected char [noderef] __user *__p
drivers/w1/slaves/w1_ds28e04.c:342:13: sparse: got char *buf
>> drivers/w1/slaves/w1_ds28e04.c:356:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected char const [noderef] __user *__p @@ got char const *buf @@
drivers/w1/slaves/w1_ds28e04.c:356:13: sparse: expected char const [noderef] __user *__p
drivers/w1/slaves/w1_ds28e04.c:356:13: sparse: got char const *buf
vim +173 arch/mips/kernel/syscall.c
3c37026d43c47b Ralf Baechle 2005-04-13 96
12890d0f61fc4e Ralf Baechle 2012-12-27 97 static inline int mips_atomic_set(unsigned long addr, unsigned long new)
^1da177e4c3f41 Linus Torvalds 2005-04-16 98 {
f1e39a4a616cd9 Ralf Baechle 2009-09-17 99 unsigned long old, tmp;
12890d0f61fc4e Ralf Baechle 2012-12-27 100 struct pt_regs *regs;
f1e39a4a616cd9 Ralf Baechle 2009-09-17 101 unsigned int err;
f1e39a4a616cd9 Ralf Baechle 2009-09-17 102
f1e39a4a616cd9 Ralf Baechle 2009-09-17 103 if (unlikely(addr & 3))
f1e39a4a616cd9 Ralf Baechle 2009-09-17 104 return -EINVAL;
f1e39a4a616cd9 Ralf Baechle 2009-09-17 105
96d4f267e40f95 Linus Torvalds 2019-01-03 106 if (unlikely(!access_ok((const void __user *)addr, 4)))
f1e39a4a616cd9 Ralf Baechle 2009-09-17 107 return -EINVAL;
f1e39a4a616cd9 Ralf Baechle 2009-09-17 108
256ec489f1c772 Thomas Bogendoerfer 2020-08-24 109 if (cpu_has_llsc && IS_ENABLED(CONFIG_WAR_R10000_LLSC)) {
f1e39a4a616cd9 Ralf Baechle 2009-09-17 110 __asm__ __volatile__ (
378ed6f0e3c525 Paul Burton 2018-11-08 111 " .set push \n"
a809d46066d517 Ralf Baechle 2014-03-30 112 " .set arch=r4000 \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 113 " li %[err], 0 \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 114 "1: ll %[old], (%[addr]) \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 115 " move %[tmp], %[new] \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 116 "2: sc %[tmp], (%[addr]) \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 117 " beqzl %[tmp], 1b \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 118 "3: \n"
0e525e48f73cc8 Maciej W. Rozycki 2014-11-15 119 " .insn \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 120 " .section .fixup,\"ax\" \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 121 "4: li %[err], %[efault] \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 122 " j 3b \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 123 " .previous \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 124 " .section __ex_table,\"a\" \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 125 " "STR(PTR)" 1b, 4b \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 126 " "STR(PTR)" 2b, 4b \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 127 " .previous \n"
378ed6f0e3c525 Paul Burton 2018-11-08 128 " .set pop \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 129 : [old] "=&r" (old),
f1e39a4a616cd9 Ralf Baechle 2009-09-17 130 [err] "=&r" (err),
f1e39a4a616cd9 Ralf Baechle 2009-09-17 131 [tmp] "=&r" (tmp)
f1e39a4a616cd9 Ralf Baechle 2009-09-17 132 : [addr] "r" (addr),
f1e39a4a616cd9 Ralf Baechle 2009-09-17 133 [new] "r" (new),
f1e39a4a616cd9 Ralf Baechle 2009-09-17 134 [efault] "i" (-EFAULT)
f1e39a4a616cd9 Ralf Baechle 2009-09-17 135 : "memory");
f1e39a4a616cd9 Ralf Baechle 2009-09-17 136 } else if (cpu_has_llsc) {
f1e39a4a616cd9 Ralf Baechle 2009-09-17 137 __asm__ __volatile__ (
378ed6f0e3c525 Paul Burton 2018-11-08 138 " .set push \n"
fee313d4b880d4 Markos Chandras 2015-01-15 139 " .set "MIPS_ISA_ARCH_LEVEL" \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 140 " li %[err], 0 \n"
4915e1b043d628 James Hogan 2017-05-31 141 "1: \n"
e84957e6ae043b Paul Burton 2019-10-01 142 " " __SYNC(full, loongson3_war) " \n"
4915e1b043d628 James Hogan 2017-05-31 143 user_ll("%[old]", "(%[addr])")
f1e39a4a616cd9 Ralf Baechle 2009-09-17 144 " move %[tmp], %[new] \n"
4915e1b043d628 James Hogan 2017-05-31 145 "2: \n"
4915e1b043d628 James Hogan 2017-05-31 146 user_sc("%[tmp]", "(%[addr])")
203e090ade7357 James Hogan 2017-05-31 147 " beqz %[tmp], 1b \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 148 "3: \n"
0e525e48f73cc8 Maciej W. Rozycki 2014-11-15 149 " .insn \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 150 " .section .fixup,\"ax\" \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 151 "5: li %[err], %[efault] \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 152 " j 3b \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 153 " .previous \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 154 " .section __ex_table,\"a\" \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 155 " "STR(PTR)" 1b, 5b \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 156 " "STR(PTR)" 2b, 5b \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 157 " .previous \n"
378ed6f0e3c525 Paul Burton 2018-11-08 158 " .set pop \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 159 : [old] "=&r" (old),
f1e39a4a616cd9 Ralf Baechle 2009-09-17 160 [err] "=&r" (err),
f1e39a4a616cd9 Ralf Baechle 2009-09-17 161 [tmp] "=&r" (tmp)
f1e39a4a616cd9 Ralf Baechle 2009-09-17 162 : [addr] "r" (addr),
f1e39a4a616cd9 Ralf Baechle 2009-09-17 163 [new] "r" (new),
f1e39a4a616cd9 Ralf Baechle 2009-09-17 164 [efault] "i" (-EFAULT)
f1e39a4a616cd9 Ralf Baechle 2009-09-17 165 : "memory");
f1e39a4a616cd9 Ralf Baechle 2009-09-17 166 } else {
f1e39a4a616cd9 Ralf Baechle 2009-09-17 167 do {
f1e39a4a616cd9 Ralf Baechle 2009-09-17 168 preempt_disable();
f1e39a4a616cd9 Ralf Baechle 2009-09-17 169 ll_bit = 1;
f1e39a4a616cd9 Ralf Baechle 2009-09-17 170 ll_task = current;
f1e39a4a616cd9 Ralf Baechle 2009-09-17 171 preempt_enable();
f1e39a4a616cd9 Ralf Baechle 2009-09-17 172
f1e39a4a616cd9 Ralf Baechle 2009-09-17 @173 err = __get_user(old, (unsigned int *) addr);
f1e39a4a616cd9 Ralf Baechle 2009-09-17 @174 err |= __put_user(new, (unsigned int *) addr);
f1e39a4a616cd9 Ralf Baechle 2009-09-17 175 if (err)
f1e39a4a616cd9 Ralf Baechle 2009-09-17 176 break;
f1e39a4a616cd9 Ralf Baechle 2009-09-17 177 rmb();
f1e39a4a616cd9 Ralf Baechle 2009-09-17 178 } while (!ll_bit);
f1e39a4a616cd9 Ralf Baechle 2009-09-17 179 }
f1e39a4a616cd9 Ralf Baechle 2009-09-17 180
f1e39a4a616cd9 Ralf Baechle 2009-09-17 181 if (unlikely(err))
f1e39a4a616cd9 Ralf Baechle 2009-09-17 182 return err;
f1e39a4a616cd9 Ralf Baechle 2009-09-17 183
12890d0f61fc4e Ralf Baechle 2012-12-27 184 regs = current_pt_regs();
f1e39a4a616cd9 Ralf Baechle 2009-09-17 185 regs->regs[2] = old;
f1e39a4a616cd9 Ralf Baechle 2009-09-17 186 regs->regs[7] = 0; /* No error */
f1e39a4a616cd9 Ralf Baechle 2009-09-17 187
f1e39a4a616cd9 Ralf Baechle 2009-09-17 188 /*
f1e39a4a616cd9 Ralf Baechle 2009-09-17 189 * Don't let your children do this ...
f1e39a4a616cd9 Ralf Baechle 2009-09-17 190 */
f1e39a4a616cd9 Ralf Baechle 2009-09-17 191 __asm__ __volatile__(
f1e39a4a616cd9 Ralf Baechle 2009-09-17 192 " move $29, %0 \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 193 " j syscall_exit \n"
f1e39a4a616cd9 Ralf Baechle 2009-09-17 194 : /* no outputs */
f1e39a4a616cd9 Ralf Baechle 2009-09-17 195 : "r" (regs));
f1e39a4a616cd9 Ralf Baechle 2009-09-17 196
f1e39a4a616cd9 Ralf Baechle 2009-09-17 197 /* unreached. Honestly. */
f2ace93136cade Ralf Baechle 2012-12-27 198 unreachable();
f1e39a4a616cd9 Ralf Baechle 2009-09-17 199 }
f1e39a4a616cd9 Ralf Baechle 2009-09-17 200
:::::: The code at line 173 was first introduced by commit
:::::: f1e39a4a616cd9981a9decfd5332fd07a01abb8b MIPS: Rewrite sysmips(MIPS_ATOMIC_SET, ...) in C with inline assembler
:::::: TO: Ralf Baechle <ralf(a)linux-mips.org>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH 17/23] cxl: Cache and pass DVSEC ranges
by kernel test robot
Hi Ben,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 53989fad1286e652ea3655ae3367ba698da8d2ff]
url: https://github.com/0day-ci/linux/commits/Ben-Widawsky/Add-drivers-for-CXL...
base: 53989fad1286e652ea3655ae3367ba698da8d2ff
config: riscv-buildonly-randconfig-r001-20211119 (attached as .config)
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://github.com/0day-ci/linux/commit/cfdf51e15fc8229a494ee59d05bc7459a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ben-Widawsky/Add-drivers-for-CXL-ports-and-mem-devices/20211120-080513
git checkout cfdf51e15fc8229a494ee59d05bc7459ab5eecd8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
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/cxl/pci.c:469:7: warning: variable 'size' set but not used [-Wunused-but-set-variable]
u64 size;
^
1 warning generated.
vim +/size +469 drivers/cxl/pci.c
454
455 #define CDPD(cxlds, which) \
456 cxlds->device_dvsec + CXL_DVSEC_PCIE_DEVICE_##which##_OFFSET
457
458 #define CDPDR(cxlds, which, sorb, lohi) \
459 cxlds->device_dvsec + \
460 CXL_DVSEC_PCIE_DEVICE_RANGE_##sorb##_##lohi##_OFFSET(which)
461
462 static int wait_for_valid(struct cxl_dev_state *cxlds)
463 {
464 struct pci_dev *pdev = to_pci_dev(cxlds->dev);
465 const unsigned long timeout = jiffies + HZ;
466 bool valid;
467
468 do {
> 469 u64 size;
470 u32 temp;
471 int rc;
472
473 rc = pci_read_config_dword(pdev, CDPDR(cxlds, 0, SIZE, HIGH),
474 &temp);
475 if (rc)
476 return -ENXIO;
477 size = (u64)temp << 32;
478
479 rc = pci_read_config_dword(pdev, CDPDR(cxlds, 0, SIZE, LOW),
480 &temp);
481 if (rc)
482 return -ENXIO;
483 size |= temp & CXL_DVSEC_PCIE_DEVICE_MEM_SIZE_LOW_MASK;
484
485 /*
486 * Memory_Info_Valid: When set, indicates that the CXL Range 1
487 * Size high and Size Low registers are valid. Must be set
488 * within 1 second of deassertion of reset to CXL device.
489 */
490 valid = FIELD_GET(CXL_DVSEC_PCIE_DEVICE_MEM_INFO_VALID, temp);
491 if (valid)
492 break;
493 cpu_relax();
494 } while (!time_after(jiffies, timeout));
495
496 return valid ? 0 : -ETIMEDOUT;
497 }
498
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months