Re: [Qemu-devel] [PATCH 3/3] virtio-pmem: Add virtio pmem driver

2018-09-04 Thread kbuild test robot
Hi Pankaj,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linux-nvdimm/libnvdimm-for-next]
[also build test ERROR on v4.19-rc2 next-20180903]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Pankaj-Gupta/kvm-fake-DAX-device/20180903-160032
base:   https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git 
libnvdimm-for-next
config: i386-randconfig-a3-201835 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 
:: branch date: 21 hours ago
:: commit date: 21 hours ago

All errors (new ones prefixed by >>):

   drivers/virtio/virtio_pmem.o: In function `virtio_pmem_remove':
>> drivers/virtio/virtio_pmem.c:220: undefined reference to 
>> `nvdimm_bus_unregister'
   drivers/virtio/virtio_pmem.o: In function `virtio_pmem_probe':
>> drivers/virtio/virtio_pmem.c:186: undefined reference to 
>> `nvdimm_bus_register'
>> drivers/virtio/virtio_pmem.c:198: undefined reference to 
>> `nvdimm_pmem_region_create'
   drivers/virtio/virtio_pmem.c:207: undefined reference to 
`nvdimm_bus_unregister'

# 
https://github.com/0day-ci/linux/commit/acce2633da18b0ad58d0cc9243a85b03020ca099
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout acce2633da18b0ad58d0cc9243a85b03020ca099
vim +220 drivers/virtio/virtio_pmem.c

acce2633 Pankaj Gupta 2018-08-31  147  
acce2633 Pankaj Gupta 2018-08-31  148  static int virtio_pmem_probe(struct 
virtio_device *vdev)
acce2633 Pankaj Gupta 2018-08-31  149  {
acce2633 Pankaj Gupta 2018-08-31  150   int err = 0;
acce2633 Pankaj Gupta 2018-08-31  151   struct resource res;
acce2633 Pankaj Gupta 2018-08-31  152   struct virtio_pmem *vpmem;
acce2633 Pankaj Gupta 2018-08-31  153   struct nvdimm_bus *nvdimm_bus;
acce2633 Pankaj Gupta 2018-08-31  154   struct nd_region_desc ndr_desc;
acce2633 Pankaj Gupta 2018-08-31  155   int nid = dev_to_node(&vdev->dev);
acce2633 Pankaj Gupta 2018-08-31  156   struct nd_region *nd_region;
acce2633 Pankaj Gupta 2018-08-31  157  
acce2633 Pankaj Gupta 2018-08-31  158   if (!vdev->config->get) {
acce2633 Pankaj Gupta 2018-08-31  159   dev_err(&vdev->dev, "%s 
failure: config disabled\n",
acce2633 Pankaj Gupta 2018-08-31  160   __func__);
acce2633 Pankaj Gupta 2018-08-31  161   return -EINVAL;
acce2633 Pankaj Gupta 2018-08-31  162   }
acce2633 Pankaj Gupta 2018-08-31  163  
acce2633 Pankaj Gupta 2018-08-31  164   vdev->priv = vpmem = 
devm_kzalloc(&vdev->dev, sizeof(*vpmem),
acce2633 Pankaj Gupta 2018-08-31  165   GFP_KERNEL);
acce2633 Pankaj Gupta 2018-08-31  166   if (!vpmem) {
acce2633 Pankaj Gupta 2018-08-31  167   err = -ENOMEM;
acce2633 Pankaj Gupta 2018-08-31  168   goto out_err;
acce2633 Pankaj Gupta 2018-08-31  169   }
acce2633 Pankaj Gupta 2018-08-31  170  
acce2633 Pankaj Gupta 2018-08-31  171   vpmem->vdev = vdev;
acce2633 Pankaj Gupta 2018-08-31  172   err = init_vq(vpmem);
acce2633 Pankaj Gupta 2018-08-31  173   if (err)
acce2633 Pankaj Gupta 2018-08-31  174   goto out_err;
acce2633 Pankaj Gupta 2018-08-31  175  
acce2633 Pankaj Gupta 2018-08-31  176   virtio_cread(vpmem->vdev, struct 
virtio_pmem_config,
acce2633 Pankaj Gupta 2018-08-31  177   start, &vpmem->start);
acce2633 Pankaj Gupta 2018-08-31  178   virtio_cread(vpmem->vdev, struct 
virtio_pmem_config,
acce2633 Pankaj Gupta 2018-08-31  179   size, &vpmem->size);
acce2633 Pankaj Gupta 2018-08-31  180  
acce2633 Pankaj Gupta 2018-08-31  181   res.start = vpmem->start;
acce2633 Pankaj Gupta 2018-08-31  182   res.end   = vpmem->start + 
vpmem->size-1;
acce2633 Pankaj Gupta 2018-08-31  183   vpmem->nd_desc.provider_name = 
"virtio-pmem";
acce2633 Pankaj Gupta 2018-08-31  184   vpmem->nd_desc.module = THIS_MODULE;
acce2633 Pankaj Gupta 2018-08-31  185  
acce2633 Pankaj Gupta 2018-08-31 @186   vpmem->nvdimm_bus = nvdimm_bus = 
nvdimm_bus_register(&vdev->dev,
acce2633 Pankaj Gupta 2018-08-31  187   
&vpmem->nd_desc);
acce2633 Pankaj Gupta 2018-08-31  188   if (!nvdimm_bus)
acce2633 Pankaj Gupta 2018-08-31  189   goto out_vq;
acce2633 Pankaj Gupta 2018-08-31  190  
acce2633 Pankaj Gupta 2018-08-31  191   dev_set_drvdata(&vdev->dev, nvdimm_bus);
acce2633 Pankaj Gupta 2018-08-31  192   memset(&ndr_desc, 0, sizeof(ndr_desc));
acce2633 Pankaj Gupta 2018-08-31  193  
acce2633 Pankaj Gupta 2018-08-31  194   ndr_desc.res = &res;
acce2633 Pankaj Gupta 2018-08-31  195   ndr_desc.numa_node = nid;
acce2633 Pankaj Gupta 2018-08-31  196   ndr_desc.flush = virtio_pmem_flush;
acce2633 Pankaj Gupta 2018-08-31  197   set_bit(ND_REGION_PAGEMAP, 
&ndr_desc.flags);
acce2633 Pankaj Gupta 2018-08-31 @198   nd_region = 
nvdimm_pmem_region_create(nvdimm_bus, &ndr_desc);
acce2633 Pankaj G

Re: [Qemu-devel] [PATCH 2/3] libnvdimm: nd_region flush callback support

2018-09-04 Thread kbuild test robot
Hi Pankaj,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux-nvdimm/libnvdimm-for-next]
[also build test WARNING on v4.19-rc2 next-20180831]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Pankaj-Gupta/kvm-fake-DAX-device/20180903-160032
base:   https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git 
libnvdimm-for-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
:: branch date: 7 hours ago
:: commit date: 7 hours ago

   drivers/nvdimm/pmem.c:116:25: sparse: expression using sizeof(void)
   drivers/nvdimm/pmem.c:135:25: sparse: expression using sizeof(void)
>> drivers/nvdimm/pmem.c:204:32: sparse: incorrect type in assignment 
>> (different base types) @@expected restricted blk_status_t [usertype] 
>> bi_status @@got e] bi_status @@
   drivers/nvdimm/pmem.c:204:32:expected restricted blk_status_t [usertype] 
bi_status
   drivers/nvdimm/pmem.c:204:32:got int
   drivers/nvdimm/pmem.c:208:9: sparse: expression using sizeof(void)
   drivers/nvdimm/pmem.c:208:9: sparse: expression using sizeof(void)
   include/linux/bvec.h:82:37: sparse: expression using sizeof(void)
   include/linux/bvec.h:82:37: sparse: expression using sizeof(void)
   include/linux/bvec.h:83:32: sparse: expression using sizeof(void)
   include/linux/bvec.h:83:32: sparse: expression using sizeof(void)
   drivers/nvdimm/pmem.c:220:32: sparse: incorrect type in assignment 
(different base types) @@expected restricted blk_status_t [usertype] 
bi_status @@got e] bi_status @@
   drivers/nvdimm/pmem.c:220:32:expected restricted blk_status_t [usertype] 
bi_status
   drivers/nvdimm/pmem.c:220:32:got int

# 
https://github.com/0day-ci/linux/commit/69b95edd2a1f4676361988fa36866b59427e2cfa
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 69b95edd2a1f4676361988fa36866b59427e2cfa
vim +204 drivers/nvdimm/pmem.c

59e647398 drivers/nvdimm/pmem.c Dan Williams  2016-03-08  107  
bd697a80c drivers/nvdimm/pmem.c Vishal Verma  2016-09-30  108  static void 
write_pmem(void *pmem_addr, struct page *page,
bd697a80c drivers/nvdimm/pmem.c Vishal Verma  2016-09-30  109   
unsigned int off, unsigned int len)
bd697a80c drivers/nvdimm/pmem.c Vishal Verma  2016-09-30  110  {
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  111   
unsigned int chunk;
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  112   void 
*mem;
bd697a80c drivers/nvdimm/pmem.c Vishal Verma  2016-09-30  113  
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  114   while 
(len) {
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  115   
mem = kmap_atomic(page);
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06 @116   
chunk = min_t(unsigned int, len, PAGE_SIZE);
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  117   
memcpy_flushcache(pmem_addr, mem + off, chunk);
bd697a80c drivers/nvdimm/pmem.c Vishal Verma  2016-09-30  118   
kunmap_atomic(mem);
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  119   
len -= chunk;
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  120   
off = 0;
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  121   
page++;
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  122   
pmem_addr += PAGE_SIZE;
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  123   }
bd697a80c drivers/nvdimm/pmem.c Vishal Verma  2016-09-30  124  }
bd697a80c drivers/nvdimm/pmem.c Vishal Verma  2016-09-30  125  
4e4cbee93 drivers/nvdimm/pmem.c Christoph Hellwig 2017-06-03  126  static 
blk_status_t read_pmem(struct page *page, unsigned int off,
bd697a80c drivers/nvdimm/pmem.c Vishal Verma  2016-09-30  127   
void *pmem_addr, unsigned int len)
bd697a80c drivers/nvdimm/pmem.c Vishal Verma  2016-09-30  128  {
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  129   
unsigned int chunk;
60622d682 drivers/nvdimm/pmem.c Dan Williams  2018-05-03  130   
unsigned long rem;
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  131   void 
*mem;
bd697a80c drivers/nvdimm/pmem.c Vishal Verma  2016-09-30  132  
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  133   while 
(len) {
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  134   
mem = kmap_atomic(page);
98cc093cb drivers/nvdimm/pmem.c Huang Ying2017-09-06  135   
chunk = min_t(unsigned int, len, PAGE_SIZE);
60622d682 drivers/nvdimm/pmem.c Dan Williams  2018-05-03  136   
rem = memcpy_mcsafe(mem + off, pmem_addr, chunk);
bd697a

Re: [Qemu-devel] [PATCH 3/3] virtio-pmem: Add virtio pmem driver

2018-09-05 Thread kbuild test robot
Hi Pankaj,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linux-nvdimm/libnvdimm-for-next]
[also build test ERROR on v4.19-rc2 next-20180905]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Pankaj-Gupta/kvm-fake-DAX-device/20180903-160032
base:   https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git 
libnvdimm-for-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/virtio/virtio_pmem.o: In function `virtio_pmem_remove':
>> virtio_pmem.c:(.text+0x299): undefined reference to `nvdimm_bus_unregister'
   drivers/virtio/virtio_pmem.o: In function `virtio_pmem_probe':
>> virtio_pmem.c:(.text+0x5e3): undefined reference to `nvdimm_bus_register'
>> virtio_pmem.c:(.text+0x62a): undefined reference to 
>> `nvdimm_pmem_region_create'
   virtio_pmem.c:(.text+0x63b): undefined reference to `nvdimm_bus_unregister'

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [Qemu-devel] [PATCH v2 1/2] libnvdimm: nd_region flush callback support

2018-10-13 Thread kbuild test robot
Hi Pankaj,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux-nvdimm/libnvdimm-for-next]
[also build test WARNING on v4.19-rc7 next-20181012]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Pankaj-Gupta/libnvdimm-nd_region-flush-callback-support/20181013-152624
base:   https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git 
libnvdimm-for-next
config: x86_64-randconfig-x017-201840 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from drivers/nvdimm/bus.c:14:0:
>> include/linux/libnvdimm.h:206:54: warning: 'struct bio' declared inside 
>> parameter list will not be visible outside of this definition or declaration
int nvdimm_flush(struct nd_region *nd_region, struct bio *bio, bool async);
 ^~~

vim +206 include/linux/libnvdimm.h

   159  
   160  void badrange_init(struct badrange *badrange);
   161  int badrange_add(struct badrange *badrange, u64 addr, u64 length);
   162  void badrange_forget(struct badrange *badrange, phys_addr_t start,
   163  unsigned int len);
   164  int nvdimm_bus_add_badrange(struct nvdimm_bus *nvdimm_bus, u64 addr,
   165  u64 length);
   166  struct nvdimm_bus *nvdimm_bus_register(struct device *parent,
   167  struct nvdimm_bus_descriptor *nfit_desc);
   168  void nvdimm_bus_unregister(struct nvdimm_bus *nvdimm_bus);
   169  struct nvdimm_bus *to_nvdimm_bus(struct device *dev);
   170  struct nvdimm *to_nvdimm(struct device *dev);
   171  struct nd_region *to_nd_region(struct device *dev);
   172  struct device *nd_region_dev(struct nd_region *nd_region);
   173  struct nd_blk_region *to_nd_blk_region(struct device *dev);
   174  struct nvdimm_bus_descriptor *to_nd_desc(struct nvdimm_bus *nvdimm_bus);
   175  struct device *to_nvdimm_bus_dev(struct nvdimm_bus *nvdimm_bus);
   176  const char *nvdimm_name(struct nvdimm *nvdimm);
   177  struct kobject *nvdimm_kobj(struct nvdimm *nvdimm);
   178  unsigned long nvdimm_cmd_mask(struct nvdimm *nvdimm);
   179  void *nvdimm_provider_data(struct nvdimm *nvdimm);
   180  struct nvdimm *nvdimm_create(struct nvdimm_bus *nvdimm_bus, void 
*provider_data,
   181  const struct attribute_group **groups, unsigned long 
flags,
   182  unsigned long cmd_mask, int num_flush,
   183  struct resource *flush_wpq);
   184  const struct nd_cmd_desc *nd_cmd_dimm_desc(int cmd);
   185  const struct nd_cmd_desc *nd_cmd_bus_desc(int cmd);
   186  u32 nd_cmd_in_size(struct nvdimm *nvdimm, int cmd,
   187  const struct nd_cmd_desc *desc, int idx, void *buf);
   188  u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd,
   189  const struct nd_cmd_desc *desc, int idx, const u32 
*in_field,
   190  const u32 *out_field, unsigned long remainder);
   191  int nvdimm_bus_check_dimm_count(struct nvdimm_bus *nvdimm_bus, int 
dimm_count);
   192  struct nd_region *nvdimm_pmem_region_create(struct nvdimm_bus 
*nvdimm_bus,
   193  struct nd_region_desc *ndr_desc);
   194  struct nd_region *nvdimm_blk_region_create(struct nvdimm_bus 
*nvdimm_bus,
   195  struct nd_region_desc *ndr_desc);
   196  struct nd_region *nvdimm_volatile_region_create(struct nvdimm_bus 
*nvdimm_bus,
   197  struct nd_region_desc *ndr_desc);
   198  void *nd_region_provider_data(struct nd_region *nd_region);
   199  void *nd_blk_region_provider_data(struct nd_blk_region *ndbr);
   200  void nd_blk_region_set_provider_data(struct nd_blk_region *ndbr, void 
*data);
   201  struct nvdimm *nd_blk_region_to_dimm(struct nd_blk_region *ndbr);
   202  unsigned long nd_blk_memremap_flags(struct nd_blk_region *ndbr);
   203  unsigned int nd_region_acquire_lane(struct nd_region *nd_region);
   204  void nd_region_release_lane(struct nd_region *nd_region, unsigned int 
lane);
   205  u64 nd_fletcher64(void *addr, size_t len, bool le);
 > 206  int nvdimm_flush(struct nd_region *nd_region, struct bio *bio, bool 
 > async);
   207  int generic_nvdimm_flush(struct nd_region *nd_region);
   208  int nvdimm_has_flush(struct nd_region *nd_region);
   209  int nvdimm_has_cache(struct nd_region *nd_region);
   210  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [Qemu-devel] [PATCH v2 1/2] libnvdimm: nd_region flush callback support

2018-10-13 Thread kbuild test robot
Hi Pankaj,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux-nvdimm/libnvdimm-for-next]
[also build test WARNING on v4.19-rc7 next-20181012]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Pankaj-Gupta/libnvdimm-nd_region-flush-callback-support/20181013-152624
base:   https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git 
libnvdimm-for-next
config: x86_64-randconfig-g0-10131621 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from drivers//acpi/nfit/core.c:14:0:
>> include/linux/libnvdimm.h:206:54: warning: 'struct bio' declared inside 
>> parameter list
int nvdimm_flush(struct nd_region *nd_region, struct bio *bio, bool async);
 ^
>> include/linux/libnvdimm.h:206:54: warning: its scope is only this definition 
>> or declaration, which is probably not what you want

vim +206 include/linux/libnvdimm.h

   159  
   160  void badrange_init(struct badrange *badrange);
   161  int badrange_add(struct badrange *badrange, u64 addr, u64 length);
   162  void badrange_forget(struct badrange *badrange, phys_addr_t start,
   163  unsigned int len);
   164  int nvdimm_bus_add_badrange(struct nvdimm_bus *nvdimm_bus, u64 addr,
   165  u64 length);
   166  struct nvdimm_bus *nvdimm_bus_register(struct device *parent,
   167  struct nvdimm_bus_descriptor *nfit_desc);
   168  void nvdimm_bus_unregister(struct nvdimm_bus *nvdimm_bus);
   169  struct nvdimm_bus *to_nvdimm_bus(struct device *dev);
   170  struct nvdimm *to_nvdimm(struct device *dev);
   171  struct nd_region *to_nd_region(struct device *dev);
   172  struct device *nd_region_dev(struct nd_region *nd_region);
   173  struct nd_blk_region *to_nd_blk_region(struct device *dev);
   174  struct nvdimm_bus_descriptor *to_nd_desc(struct nvdimm_bus *nvdimm_bus);
   175  struct device *to_nvdimm_bus_dev(struct nvdimm_bus *nvdimm_bus);
   176  const char *nvdimm_name(struct nvdimm *nvdimm);
   177  struct kobject *nvdimm_kobj(struct nvdimm *nvdimm);
   178  unsigned long nvdimm_cmd_mask(struct nvdimm *nvdimm);
   179  void *nvdimm_provider_data(struct nvdimm *nvdimm);
   180  struct nvdimm *nvdimm_create(struct nvdimm_bus *nvdimm_bus, void 
*provider_data,
   181  const struct attribute_group **groups, unsigned long 
flags,
   182  unsigned long cmd_mask, int num_flush,
   183  struct resource *flush_wpq);
   184  const struct nd_cmd_desc *nd_cmd_dimm_desc(int cmd);
   185  const struct nd_cmd_desc *nd_cmd_bus_desc(int cmd);
   186  u32 nd_cmd_in_size(struct nvdimm *nvdimm, int cmd,
   187  const struct nd_cmd_desc *desc, int idx, void *buf);
   188  u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd,
   189  const struct nd_cmd_desc *desc, int idx, const u32 
*in_field,
   190  const u32 *out_field, unsigned long remainder);
   191  int nvdimm_bus_check_dimm_count(struct nvdimm_bus *nvdimm_bus, int 
dimm_count);
   192  struct nd_region *nvdimm_pmem_region_create(struct nvdimm_bus 
*nvdimm_bus,
   193  struct nd_region_desc *ndr_desc);
   194  struct nd_region *nvdimm_blk_region_create(struct nvdimm_bus 
*nvdimm_bus,
   195  struct nd_region_desc *ndr_desc);
   196  struct nd_region *nvdimm_volatile_region_create(struct nvdimm_bus 
*nvdimm_bus,
   197  struct nd_region_desc *ndr_desc);
   198  void *nd_region_provider_data(struct nd_region *nd_region);
   199  void *nd_blk_region_provider_data(struct nd_blk_region *ndbr);
   200  void nd_blk_region_set_provider_data(struct nd_blk_region *ndbr, void 
*data);
   201  struct nvdimm *nd_blk_region_to_dimm(struct nd_blk_region *ndbr);
   202  unsigned long nd_blk_memremap_flags(struct nd_blk_region *ndbr);
   203  unsigned int nd_region_acquire_lane(struct nd_region *nd_region);
   204  void nd_region_release_lane(struct nd_region *nd_region, unsigned int 
lane);
   205  u64 nd_fletcher64(void *addr, size_t len, bool le);
 > 206  int nvdimm_flush(struct nd_region *nd_region, struct bio *bio, bool 
 > async);
   207  int generic_nvdimm_flush(struct nd_region *nd_region);
   208  int nvdimm_has_flush(struct nd_region *nd_region);
   209  int nvdimm_has_cache(struct nd_region *nd_region);
   210  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [Qemu-devel] [PATCH v6 2/4] vfio: VFIO driver for mediated PCI device

2016-08-03 Thread kbuild test robot
Hi Kirti,

[auto build test WARNING on vfio/next]
[also build test WARNING on v4.7 next-20160803]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Kirti-Wankhede/Add-Mediated-device-support/20160804-032209
base:   https://github.com/awilliam/linux-vfio.git next
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/vfio/mdev/vfio_mpci.c: In function 'mdev_dev_mmio_fault':
>> drivers/vfio/mdev/vfio_mpci.c:384:17: warning: cast from pointer to integer 
>> of different size [-Wpointer-to-int-cast]
 u64 virtaddr = (u64)vmf->virtual_address;
^
   In file included from drivers/vfio/mdev/vfio_mpci.c:19:0:
>> include/linux/vfio.h:23:46: warning: right shift count >= width of type 
>> [-Wshift-count-overflow]
#define VFIO_PCI_OFFSET_TO_INDEX(off)   (off >> VFIO_PCI_OFFSET_SHIFT)
 ^
>> drivers/vfio/mdev/vfio_mpci.c:424:11: note: in expansion of macro 
>> 'VFIO_PCI_OFFSET_TO_INDEX'
  index = VFIO_PCI_OFFSET_TO_INDEX(vma->vm_pgoff << PAGE_SHIFT);
  ^~~~

vim +384 drivers/vfio/mdev/vfio_mpci.c

   378  static int mdev_dev_mmio_fault(struct vm_area_struct *vma, struct 
vm_fault *vmf)
   379  {
   380  int ret;
   381  struct vfio_mdev *vmdev = vma->vm_private_data;
   382  struct mdev_device *mdev;
   383  struct parent_device *parent;
 > 384  u64 virtaddr = (u64)vmf->virtual_address;
   385  unsigned long req_size, pgoff = 0;
   386  pgprot_t pg_prot;
   387  unsigned int index;
   388  
   389  if (!vmdev && !vmdev->mdev)
   390  return -EINVAL;
   391  
   392  mdev = vmdev->mdev;
   393  parent  = mdev->parent;
   394  
   395  pg_prot  = vma->vm_page_prot;
   396  
   397  if (parent->ops->validate_map_request) {
   398  u64 offset;
   399  loff_t pos;
   400  
   401  offset   = virtaddr - vma->vm_start;
   402  req_size = vma->vm_end - virtaddr;
   403  pos = (vma->vm_pgoff << PAGE_SHIFT) + offset;
   404  
   405  ret = parent->ops->validate_map_request(mdev, pos, 
&virtaddr,
   406  &pgoff, &req_size, 
&pg_prot);
   407  if (ret)
   408  return ret;
   409  
   410  /*
   411   * Verify pgoff and req_size are valid and virtaddr is 
within
   412   * vma range
   413   */
   414  if (!pgoff || !req_size || (virtaddr < vma->vm_start) ||
   415  ((virtaddr + req_size) >= vma->vm_end))
   416  return -EINVAL;
   417  } else {
   418  struct pci_dev *pdev;
   419  
   420  virtaddr = vma->vm_start;
   421  req_size = vma->vm_end - vma->vm_start;
   422  
   423  pdev = to_pci_dev(parent->dev);
 > 424  index = VFIO_PCI_OFFSET_TO_INDEX(vma->vm_pgoff << 
 > PAGE_SHIFT);
   425  pgoff = pci_resource_start(pdev, index) >> PAGE_SHIFT;
   426  }
   427  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [Qemu-devel] [PATCH v6 2/4] vfio: VFIO driver for mediated PCI device

2016-08-03 Thread kbuild test robot
Hi Kirti,

[auto build test WARNING on vfio/next]
[also build test WARNING on v4.7 next-20160803]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Kirti-Wankhede/Add-Mediated-device-support/20160804-032209
base:   https://github.com/awilliam/linux-vfio.git next
config: i386-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/vfio/mdev/vfio_mpci.c: In function 'mdev_dev_mmio_fault':
   drivers/vfio/mdev/vfio_mpci.c:384:17: warning: cast from pointer to integer 
of different size [-Wpointer-to-int-cast]
 u64 virtaddr = (u64)vmf->virtual_address;
^
>> drivers/vfio/mdev/vfio_mpci.c:424:32: warning: right shift count >= width of 
>> type [-Wshift-count-overflow]
  index = VFIO_PCI_OFFSET_TO_INDEX(vma->vm_pgoff << PAGE_SHIFT);
   ^~

vim +424 drivers/vfio/mdev/vfio_mpci.c

   378  static int mdev_dev_mmio_fault(struct vm_area_struct *vma, struct 
vm_fault *vmf)
   379  {
   380  int ret;
   381  struct vfio_mdev *vmdev = vma->vm_private_data;
   382  struct mdev_device *mdev;
   383  struct parent_device *parent;
 > 384  u64 virtaddr = (u64)vmf->virtual_address;
   385  unsigned long req_size, pgoff = 0;
   386  pgprot_t pg_prot;
   387  unsigned int index;
   388  
   389  if (!vmdev && !vmdev->mdev)
   390  return -EINVAL;
   391  
   392  mdev = vmdev->mdev;
   393  parent  = mdev->parent;
   394  
   395  pg_prot  = vma->vm_page_prot;
   396  
   397  if (parent->ops->validate_map_request) {
   398  u64 offset;
   399  loff_t pos;
   400  
   401  offset   = virtaddr - vma->vm_start;
   402  req_size = vma->vm_end - virtaddr;
   403  pos = (vma->vm_pgoff << PAGE_SHIFT) + offset;
   404  
   405  ret = parent->ops->validate_map_request(mdev, pos, 
&virtaddr,
   406  &pgoff, &req_size, 
&pg_prot);
   407  if (ret)
   408  return ret;
   409  
   410  /*
   411   * Verify pgoff and req_size are valid and virtaddr is 
within
   412   * vma range
   413   */
   414  if (!pgoff || !req_size || (virtaddr < vma->vm_start) ||
   415  ((virtaddr + req_size) >= vma->vm_end))
   416  return -EINVAL;
   417  } else {
   418  struct pci_dev *pdev;
   419  
   420  virtaddr = vma->vm_start;
   421  req_size = vma->vm_end - vma->vm_start;
   422  
   423  pdev = to_pci_dev(parent->dev);
 > 424  index = VFIO_PCI_OFFSET_TO_INDEX(vma->vm_pgoff << 
 > PAGE_SHIFT);
   425  pgoff = pci_resource_start(pdev, index) >> PAGE_SHIFT;
   426  }
   427  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [Qemu-devel] [PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process

2016-08-08 Thread kbuild test robot
Hi Liang,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.8-rc1 next-20160805]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Liang-Li/Extend-virtio-balloon-for-fast-de-inflating-fast-live-migration/20160808-144551
config: s390-default_defconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 5.4.0-6) 5.4.0 20160609
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=s390 

All warnings (new ones prefixed by >>):

   drivers/virtio/virtio_balloon.c: In function 'tell_host':
>> drivers/virtio/virtio_balloon.c:188:1: warning: the frame size of 1456 bytes 
>> is larger than 1024 bytes [-Wframe-larger-than=]
}
^

vim +188 drivers/virtio/virtio_balloon.c

112d1263 Liang Li   2016-08-08  172 msleep(2);
112d1263 Liang Li   2016-08-08  173 if 
(virtqueue_add_outbuf(vq, sg2, nr_buf, vb, GFP_KERNEL) == 0)
112d1263 Liang Li   2016-08-08  174 
virtqueue_kick(vq);
6b35e407 Rusty Russell  2008-02-04  175  
112d1263 Liang Li   2016-08-08  176 } else {
6b35e407 Rusty Russell  2008-02-04  177 sg_init_one(&sg, 
vb->pfns, sizeof(vb->pfns[0]) * vb->num_pfns);
6b35e407 Rusty Russell  2008-02-04  178  
112d1263 Liang Li   2016-08-08  179 /* We should always be 
able to add one buffer to an empty
112d1263 Liang Li   2016-08-08  180  * queue. */
4951cc90 Rusty Russell  2014-03-13  181 
virtqueue_add_outbuf(vq, &sg, 1, vb, GFP_KERNEL);
946cfe0e Michael S. Tsirkin 2010-04-12  182 virtqueue_kick(vq);
112d1263 Liang Li   2016-08-08  183 }
6b35e407 Rusty Russell  2008-02-04  184  
6b35e407 Rusty Russell  2008-02-04  185 /* When host has read buffer, 
this completes via balloon_ack */
9c378abc Michael S. Tsirkin 2012-07-02  186 wait_event(vb->acked, 
virtqueue_get_buf(vq, &len));
fd0e21c3 Petr Mladek2016-01-25  187  
6b35e407 Rusty Russell  2008-02-04 @188  }
6b35e407 Rusty Russell  2008-02-04  189  
87c9403b Michael S. Tsirkin 2016-05-17  190  static void set_page_pfns(struct 
virtio_balloon *vb,
87c9403b Michael S. Tsirkin 2016-05-17  191   __virtio32 
pfns[], struct page *page)
3ccc9372 Michael S. Tsirkin 2012-04-12  192  {
3ccc9372 Michael S. Tsirkin 2012-04-12  193 unsigned int i;
3ccc9372 Michael S. Tsirkin 2012-04-12  194  
3ccc9372 Michael S. Tsirkin 2012-04-12  195 /* Set balloon pfns pointing at 
this page.
3ccc9372 Michael S. Tsirkin 2012-04-12  196  * Note that the first pfn 
points at start of the page. */

:: The code at line 188 was first introduced by commit
:: 6b35e40767c6c1ac783330109ae8e0c09ea6bc82 virtio: balloon driver

:: TO: Rusty Russell 
:: CC: Rusty Russell 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [Qemu-devel] [PATCH v2 2/2] vfio: add virtio pci quirk

2016-08-30 Thread kbuild test robot
Hi Michael,

[auto build test ERROR on vfio/next]
[also build test ERROR on v4.8-rc4 next-20160825]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]
[Suggest to use git(>=2.9.0) format-patch --base= (or --base=auto for 
convenience) to record what (public, well-known) commit your patch series was 
built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:
https://github.com/0day-ci/linux/commits/Michael-S-Tsirkin/vfio-blacklist-legacy-virtio-devices/20160830-124010
base:   https://github.com/awilliam/linux-vfio.git next
config: x86_64-rhel (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> ERROR: "vfio_is_noiommu_group_dev" [drivers/vfio/pci/vfio-pci.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [Qemu-devel] [PATCH v14 1/5] lib/xbitmap: Introduce xbitmap

2017-08-19 Thread kbuild test robot
Hi Matthew,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.13-rc5 next-20170817]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Wei-Wang/lib-xbitmap-Introduce-xbitmap/20170820-035516
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   lib/xbitmap.c: In function 'xb_test_bit':
>> lib/xbitmap.c:153:26: warning: passing argument 1 of 'xb_bit_ops' discards 
>> 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
 return (bool)xb_bit_ops(xb, bit, XB_TEST);
 ^~
   lib/xbitmap.c:23:12: note: expected 'struct xb *' but argument is of type 
'const struct xb *'
static int xb_bit_ops(struct xb *xb, unsigned long bit, enum xb_ops ops)
   ^~

vim +153 lib/xbitmap.c

   142  
   143  /**
   144   * xb_test_bit - test a bit in the xbitmap
   145   * @xb: the xbitmap tree used to record the bit
   146   * @bit: index of the bit to set
   147   *
   148   * This function is used to test a bit in the xbitmap.
   149   * Returns: 1 if the bit is set, or 0 otherwise.
   150   */
   151  bool xb_test_bit(const struct xb *xb, unsigned long bit)
   152  {
 > 153  return (bool)xb_bit_ops(xb, bit, XB_TEST);
   154  }
   155  EXPORT_SYMBOL(xb_test_bit);
   156  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [Qemu-devel] [PATCH v14 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-08-19 Thread kbuild test robot
Hi Wei,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.13-rc5 next-20170817]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Wei-Wang/lib-xbitmap-Introduce-xbitmap/20170820-035516
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=xtensa 

All errors (new ones prefixed by >>):

   drivers/virtio/virtio_balloon.c: In function 'tell_host_sgs':
>> drivers/virtio/virtio_balloon.c:203:3: error: implicit declaration of 
>> function 'pfn_to_kaddr' [-Werror=implicit-function-declaration]
  sg_addr = (void *)pfn_to_kaddr(sg_pfn_start);
  ^
   cc1: some warnings being treated as errors

vim +/pfn_to_kaddr +203 drivers/virtio/virtio_balloon.c

   176  
   177  /*
   178   * Send balloon pages in sgs to host. The balloon pages are recorded in 
the
   179   * page xbitmap. Each bit in the bitmap corresponds to a page of 
PAGE_SIZE.
   180   * The page xbitmap is searched for continuous "1" bits, which 
correspond
   181   * to continuous pages, to chunk into sgs.
   182   *
   183   * @page_xb_start and @page_xb_end form the range of bits in the 
xbitmap that
   184   * need to be searched.
   185   */
   186  static void tell_host_sgs(struct virtio_balloon *vb,
   187struct virtqueue *vq,
   188unsigned long page_xb_start,
   189unsigned long page_xb_end)
   190  {
   191  unsigned long sg_pfn_start, sg_pfn_end;
   192  void *sg_addr;
   193  uint32_t sg_len, sg_max_len = round_down(UINT_MAX, PAGE_SIZE);
   194  
   195  sg_pfn_start = page_xb_start;
   196  while (sg_pfn_start < page_xb_end) {
   197  sg_pfn_start = xb_find_next_bit(&vb->page_xb, 
sg_pfn_start,
   198  page_xb_end, 1);
   199  if (sg_pfn_start == page_xb_end + 1)
   200  break;
   201  sg_pfn_end = xb_find_next_bit(&vb->page_xb, 
sg_pfn_start + 1,
   202page_xb_end, 0);
 > 203  sg_addr = (void *)pfn_to_kaddr(sg_pfn_start);
   204  sg_len = (sg_pfn_end - sg_pfn_start) << PAGE_SHIFT;
   205  while (sg_len > sg_max_len) {
   206  send_balloon_page_sg(vb, vq, sg_addr, 
sg_max_len);
   207  sg_addr += sg_max_len;
   208  sg_len -= sg_max_len;
   209  }
   210  send_balloon_page_sg(vb, vq, sg_addr, sg_len);
   211  xb_zero(&vb->page_xb, sg_pfn_start, sg_pfn_end);
   212  sg_pfn_start = sg_pfn_end + 1;
   213  }
   214  }
   215  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [Qemu-devel] [PATCH v2 1/4] fw_cfg: add DMA register

2017-09-22 Thread kbuild test robot
Hi Marc-André,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.14-rc1 next-20170922]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/marcandre-lureau-redhat-com/fw_cfg-add-DMA-operations-etc-vmcoreinfo-support/20170922-182716
config: i386-randconfig-x009-201738 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/firmware/qemu_fw_cfg.c: In function 'fw_cfg_cmdline_set':
>> drivers/firmware/qemu_fw_cfg.c:690:43: error: 'process' undeclared (first 
>> use in this function)
 (processed != 1 && processed != 3 && process != 4))
  ^~~
   drivers/firmware/qemu_fw_cfg.c:690:43: note: each undeclared identifier is 
reported only once for each function it appears in

vim +/process +690 drivers/firmware/qemu_fw_cfg.c

   639  
   640  /* use special scanf/printf modifier for phys_addr_t, resource_size_t */
   641  #define PH_ADDR_SCAN_FMT "@%" __PHYS_ADDR_PREFIX "i%n" \
   642   ":%" __PHYS_ADDR_PREFIX "i" \
   643   ":%" __PHYS_ADDR_PREFIX "i%n" \
   644   ":%" __PHYS_ADDR_PREFIX "i%n"
   645  
   646  #define PH_ADDR_PR_1_FMT "0x%" __PHYS_ADDR_PREFIX "x@" \
   647   "0x%" __PHYS_ADDR_PREFIX "x"
   648  
   649  #define PH_ADDR_PR_3_FMT PH_ADDR_PR_1_FMT \
   650   ":%" __PHYS_ADDR_PREFIX "u" \
   651   ":%" __PHYS_ADDR_PREFIX "u"
   652  
   653  #define PH_ADDR_PR_4_FMT PH_ADDR_PR_3_FMT \
   654   ":%" __PHYS_ADDR_PREFIX "u"
   655  
   656  static int fw_cfg_cmdline_set(const char *arg, const struct 
kernel_param *kp)
   657  {
   658  struct resource res[4] = {};
   659  char *str;
   660  phys_addr_t base;
   661  resource_size_t size, ctrl_off, data_off, dma_off;
   662  int processed, consumed = 0;
   663  
   664  /* only one fw_cfg device can exist system-wide, so if one
   665   * was processed on the command line already, we might as
   666   * well stop here.
   667   */
   668  if (fw_cfg_cmdline_dev) {
   669  /* avoid leaking previously registered device */
   670  platform_device_unregister(fw_cfg_cmdline_dev);
   671  return -EINVAL;
   672  }
   673  
   674  /* consume "" portion of command line argument */
   675  size = memparse(arg, &str);
   676  
   677  /* get "@[::[:]]" chunks */
   678  processed = sscanf(str, PH_ADDR_SCAN_FMT,
   679 &base, &consumed,
   680 &ctrl_off, &data_off, &consumed,
   681 &dma_off, &consumed);
   682  
   683  /* sscanf() must process precisely 1, 3 or 4 chunks:
   684   *  is mandatory, optionally followed by 
   685   * and , and ;
   686   * there must be no extra characters after the last chunk,
   687   * so str[consumed] must be '\0'.
   688   */
   689  if (str[consumed] ||
 > 690  (processed != 1 && processed != 3 && process != 4))
   691  return -EINVAL;
   692  
   693  res[0].start = base;
   694  res[0].end = base + size - 1;
   695  res[0].flags = !strcmp(kp->name, "mmio") ? IORESOURCE_MEM :
   696 IORESOURCE_IO;
   697  
   698  /* insert register offsets, if provided */
   699  if (processed > 1) {
   700  res[1].name = "ctrl";
   701  res[1].start = ctrl_off;
   702  res[1].flags = IORESOURCE_REG;
   703  res[2].name = "data";
   704  res[2].start = data_off;
   705  res[2].flags = IORESOURCE_REG;
   706  }
   707  if (processed > 3) {
   708  res[3].name = "dma";
   709  res[3].start = dma_off;
   710  res[3].flags = IORESOURCE_REG;
   711  }
   712  
   713  /* "processed" happens to nicely match the number of resources
   714   * we need to pass in to this platform device.
   715   */
   716  fw_cfg_cmdline_dev = platform_device_register_simple("fw_cfg",
   717  PLATFORM_DEVID_NONE, res, 
processed);
   718  if (IS_ERR(fw_cfg_cmdline_dev))
   719  return PTR_ERR(fw_cfg_cmdline_dev);
   720  
   721  return 0;
   722  }
   723  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   

Re: [Qemu-devel] [PATCH v2 2/4] fw_cfg: do DMA read operation

2017-09-22 Thread kbuild test robot
Hi Marc-André,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.14-rc1 next-20170922]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/marcandre-lureau-redhat-com/fw_cfg-add-DMA-operations-etc-vmcoreinfo-support/20170922-182716
config: i386-randconfig-x000-201738 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers//firmware/qemu_fw_cfg.c: In function 'fw_cfg_dma_transfer':
>> drivers//firmware/qemu_fw_cfg.c:139:18: warning: right shift count >= width 
>> of type [-Wshift-count-overflow]
 iowrite32be(dma >> 32, fw_cfg_reg_dma);
 ^~
   In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/list.h:4,
from include/linux/module.h:9,
from drivers//firmware/qemu_fw_cfg.c:30:
   drivers//firmware/qemu_fw_cfg.c: At top level:
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'strcpy' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:421:2: note: in expansion of macro 'if'
 if (p_size == (size_t)-1 && q_size == (size_t)-1)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'kmemdup' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:411:2: note: in expansion of macro 'if'
 if (p_size < size)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'kmemdup' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:409:2: note: in expansion of macro 'if'
 if (__builtin_constant_p(size) && p_size < size)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'memchr_inv' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:400:2: note: in expansion of macro 'if'
 if (p_size < size)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'memchr_inv' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:398:2: note: in expansion of macro 'if'
 if (__builtin_constant_p(size) && p_size < size)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'memchr' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:389:2: note: in expansion of macro 'if'
 if (p_size < size)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'memchr' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:387:2: note: in expansion of macro 'if'
 if (__builtin_constant_p(size) && p_size < size)
 ^~
   include/linux/compiler.h:162:4: warning: '__f' is static but declared in 
inline function 'memcmp' which is not static
   __f = { \
   ^
   include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
   include/linux/string.h:379:2: note: in expansion of macro 'if'
 if (p_size < size || q_size < size)
 ^~
   include/linux/compiler.

Re: [Qemu-devel] [PATCH v2 1/4] fw_cfg: add DMA register

2017-09-22 Thread kbuild test robot
Hi Marc-André,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.14-rc1 next-20170922]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/marcandre-lureau-redhat-com/fw_cfg-add-DMA-operations-etc-vmcoreinfo-support/20170922-182716
config: i386-randconfig-x075-201738 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/list.h:4,
from include/linux/module.h:9,
from drivers//firmware/qemu_fw_cfg.c:30:
   drivers//firmware/qemu_fw_cfg.c: In function 'fw_cfg_cmdline_set':
   drivers//firmware/qemu_fw_cfg.c:690:43: error: 'process' undeclared (first 
use in this function)
 (processed != 1 && processed != 3 && process != 4))
  ^
   include/linux/compiler.h:156:30: note: in definition of macro '__trace_if'
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^~~~
>> drivers//firmware/qemu_fw_cfg.c:689:2: note: in expansion of macro 'if'
 if (str[consumed] ||
 ^~
   drivers//firmware/qemu_fw_cfg.c:690:43: note: each undeclared identifier is 
reported only once for each function it appears in
 (processed != 1 && processed != 3 && process != 4))
  ^
   include/linux/compiler.h:156:30: note: in definition of macro '__trace_if'
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^~~~
>> drivers//firmware/qemu_fw_cfg.c:689:2: note: in expansion of macro 'if'
 if (str[consumed] ||
 ^~

vim +/if +689 drivers//firmware/qemu_fw_cfg.c

75f3e8e4 Gabriel Somlo 2016-01-28  639  
75f3e8e4 Gabriel Somlo 2016-01-28  640  /* use special scanf/printf 
modifier for phys_addr_t, resource_size_t */
75f3e8e4 Gabriel Somlo 2016-01-28  641  #define PH_ADDR_SCAN_FMT "@%" 
__PHYS_ADDR_PREFIX "i%n" \
75f3e8e4 Gabriel Somlo 2016-01-28  642   ":%" 
__PHYS_ADDR_PREFIX "i" \
46ebd6f8 Marc-André Lureau 2017-09-19  643   ":%" 
__PHYS_ADDR_PREFIX "i%n" \
75f3e8e4 Gabriel Somlo 2016-01-28  644   ":%" 
__PHYS_ADDR_PREFIX "i%n"
75f3e8e4 Gabriel Somlo 2016-01-28  645  
75f3e8e4 Gabriel Somlo 2016-01-28  646  #define PH_ADDR_PR_1_FMT "0x%" 
__PHYS_ADDR_PREFIX "x@" \
75f3e8e4 Gabriel Somlo 2016-01-28  647   "0x%" 
__PHYS_ADDR_PREFIX "x"
75f3e8e4 Gabriel Somlo 2016-01-28  648  
75f3e8e4 Gabriel Somlo 2016-01-28  649  #define PH_ADDR_PR_3_FMT 
PH_ADDR_PR_1_FMT \
75f3e8e4 Gabriel Somlo 2016-01-28  650   ":%" 
__PHYS_ADDR_PREFIX "u" \
75f3e8e4 Gabriel Somlo 2016-01-28  651   ":%" 
__PHYS_ADDR_PREFIX "u"
75f3e8e4 Gabriel Somlo 2016-01-28  652  
46ebd6f8 Marc-André Lureau 2017-09-19  653  #define PH_ADDR_PR_4_FMT 
PH_ADDR_PR_3_FMT \
46ebd6f8 Marc-André Lureau 2017-09-19  654   ":%" 
__PHYS_ADDR_PREFIX "u"
46ebd6f8 Marc-André Lureau 2017-09-19  655  
75f3e8e4 Gabriel Somlo 2016-01-28  656  static int fw_cfg_cmdline_set(const 
char *arg, const struct kernel_param *kp)
75f3e8e4 Gabriel Somlo 2016-01-28  657  {
46ebd6f8 Marc-André Lureau 2017-09-19  658  struct resource res[4] = {};
75f3e8e4 Gabriel Somlo 2016-01-28  659  char *str;
75f3e8e4 Gabriel Somlo 2016-01-28  660  phys_addr_t base;
46ebd6f8 Marc-André Lureau 2017-09-19  661  resource_size_t size, ctrl_off, 
data_off, dma_off;
75f3e8e4 Gabriel Somlo 2016-01-28  662  int processed, consumed = 0;
75f3e8e4 Gabriel Somlo 2016-01-28  663  
75f3e8e4 Gabriel Somlo 2016-01-28  664  /* only one fw_cfg device can 
exist system-wide, so if one
75f3e8e4 Gabriel Somlo 2016-01-28  665   * was processed on the command 
line already, we might as
75f3e8e4 Gabriel Somlo 2016-01-28  666   * well stop here.
75f3e8e4 Gabriel Somlo 2016-01-28  667   */
75f3e8e4 Gabriel Somlo 2016-01-28  668  if (fw_cfg_cmdline_dev) {
75f3e8e4 Gabriel Somlo 2016-01-28  669  /* avoid leaking 
previously registered device */
75f3e8e4 Gabriel Somlo 2016-01-28  670  
platform_device_unregister(fw_cfg_cmdline_dev);
75f3e8e4 Gabriel Somlo 2016-01-28  671  return -EINVAL;
75f3e8e4 Gabriel Somlo 2016-01-28  672  }
75f3e8e4 Gabriel Somlo 2016-01-28  673  
75f3e8e4 Gabriel Somlo 2016-01-28  674  /* consume "" p

Re: [Qemu-devel] [PATCH v2 3/4] fw_cfg: write vmcoreinfo details

2017-09-22 Thread kbuild test robot
Hi Marc-André,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.14-rc1 next-20170922]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/marcandre-lureau-redhat-com/fw_cfg-add-DMA-operations-etc-vmcoreinfo-support/20170922-182716
config: i386-randconfig-c0-0956 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/firmware/qemu_fw_cfg.o: In function `fw_cfg_register_dir_entries':
>> qemu_fw_cfg.c:(.text+0x8af): undefined reference to `paddr_vmcoreinfo_note'

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [Qemu-devel] [PATCH v2 3/4] fw_cfg: write vmcoreinfo details

2017-09-22 Thread kbuild test robot
Hi Marc-André,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.14-rc1 next-20170922]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/marcandre-lureau-redhat-com/fw_cfg-add-DMA-operations-etc-vmcoreinfo-support/20170922-182716
config: x86_64-randconfig-ws0-09230003 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> ERROR: "paddr_vmcoreinfo_note" [drivers/firmware/qemu_fw_cfg.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [Qemu-devel] [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread kbuild test robot
Hi Wei,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.12 next-20170712]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Wei-Wang/Virtio-balloon-Enhancement/20170713-074956
config: i386-randconfig-x071-07121639 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers//virtio/virtio_balloon.c: In function 'tell_host_one_page':
>> drivers//virtio/virtio_balloon.c:535:39: warning: cast to pointer from 
>> integer of different size [-Wint-to-pointer-cast]
 virtqueue_add_chain(vq, id, 0, NULL, (void *)addr, NULL);
  ^

vim +535 drivers//virtio/virtio_balloon.c

   527  
   528  static void tell_host_one_page(struct virtio_balloon *vb, struct 
virtqueue *vq,
   529 struct page *page)
   530  {
   531  unsigned int id = VIRTQUEUE_DESC_ID_INIT;
   532  u64 addr = page_to_pfn(page) << VIRTIO_BALLOON_PFN_SHIFT;
   533  
   534  virtqueue_add_chain_desc(vq, addr, PAGE_SIZE, &id, &id, 0);
 > 535  virtqueue_add_chain(vq, id, 0, NULL, (void *)addr, NULL);
   536  virtqueue_kick_async(vq, vb->acked);
   537  }
   538  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [Qemu-devel] [PATCH v12 5/8] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-07-12 Thread kbuild test robot
Hi Wei,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.12 next-20170712]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Wei-Wang/Virtio-balloon-Enhancement/20170713-074956
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):

>> ERROR: ".xb_set_bit" [drivers/virtio/virtio_balloon.ko] undefined!
>> ERROR: ".xb_zero" [drivers/virtio/virtio_balloon.ko] undefined!
>> ERROR: ".xb_find_next_bit" [drivers/virtio/virtio_balloon.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [Qemu-devel] [PATCH v10 4/6] mm: function to offer a page block on the free list

2017-05-04 Thread kbuild test robot
Hi Wei,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.11 next-20170504]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Wei-Wang/Extend-virtio-balloon-for-fast-de-inflating-fast-live-migration/20170505-052958
reproduce: make htmldocs

All warnings (new ones prefixed by >>):

   WARNING: convert(1) not found, for SVG to PDF conversion install ImageMagick 
(https://www.imagemagick.org)
   arch/x86/include/asm/uaccess_32.h:1: warning: no structured comments found
>> mm/page_alloc.c:4663: warning: No description found for parameter 'zone'
>> mm/page_alloc.c:4663: warning: No description found for parameter 'order'
>> mm/page_alloc.c:4663: warning: No description found for parameter 
>> 'migratetype'
>> mm/page_alloc.c:4663: warning: No description found for parameter 'page'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/cfg80211.h:1738: warning: Excess struct/union/enum/typedef 
member 'results_wk' description in 'cfg80211_sched_scan_request'
   include/net/cfg80211.h:1738: warning: No description found for parameter 
'report_results'
   include/net/

Re: [Qemu-devel] [PATCH v19 2/7] xbitmap: potential improvement

2017-12-14 Thread kbuild test robot
Hi Wei,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.15-rc3 next-20171214]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Wei-Wang/Virtio-balloon-Enhancement/20171215-100525
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

Note: the linux-review/Wei-Wang/Virtio-balloon-Enhancement/20171215-100525 HEAD 
607ddba072bf7f9c9cbacedaccad7c42c5c7149c builds fine.
  It only hurts bisectibility.

All errors (new ones prefixed by >>):

>> lib/xbitmap.c:80:6: error: conflicting types for 'xb_clear_bit'
void xb_clear_bit(struct xb *xb, unsigned long bit)
 ^~~~
   In file included from lib/xbitmap.c:2:0:
   include/linux/xbitmap.h:37:5: note: previous declaration of 'xb_clear_bit' 
was here
int xb_clear_bit(struct xb *xb, unsigned long bit);
^~~~

vim +/xb_clear_bit +80 lib/xbitmap.c

71  
72  /**
73   * xb_clear_bit - clear a bit in the xbitmap
74   * @xb: the xbitmap tree used to record the bit
75   * @bit: index of the bit to clear
76   *
77   * This function is used to clear a bit in the xbitmap. If all the bits 
of the
78   * bitmap are 0, the bitmap will be freed.
79   */
  > 80  void xb_clear_bit(struct xb *xb, unsigned long bit)
81  {
82  unsigned long index = bit / IDA_BITMAP_BITS;
83  struct radix_tree_root *root = &xb->xbrt;
84  struct radix_tree_node *node;
85  void **slot;
86  struct ida_bitmap *bitmap;
87  unsigned long ebit;
88  
89  bit %= IDA_BITMAP_BITS;
90  ebit = bit + 2;
91  
92  bitmap = __radix_tree_lookup(root, index, &node, &slot);
93  if (radix_tree_exception(bitmap)) {
94  unsigned long tmp = (unsigned long)bitmap;
95  
96  if (ebit >= BITS_PER_LONG)
97  return;
98  tmp &= ~(1UL << ebit);
99  if (tmp == RADIX_TREE_EXCEPTIONAL_ENTRY)
   100  __radix_tree_delete(root, node, slot);
   101  else
   102  rcu_assign_pointer(*slot, (void *)tmp);
   103  return;
   104  }
   105  
   106  if (!bitmap)
   107  return;
   108  
   109  __clear_bit(bit, bitmap->bitmap);
   110  if (bitmap_empty(bitmap->bitmap, IDA_BITMAP_BITS)) {
   111  kfree(bitmap);
   112  __radix_tree_delete(root, node, slot);
   113  }
   114  }
   115  EXPORT_SYMBOL(xb_clear_bit);
   116  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [Qemu-devel] [PATCH v19 1/7] xbitmap: Introduce xbitmap

2017-12-15 Thread kbuild test robot
Hi Matthew,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.15-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Wei-Wang/Virtio-balloon-Enhancement/20171215-100525
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)


vim +29 lib/xbitmap.c

 5  
 6  /**
 7   *  xb_set_bit - set a bit in the xbitmap
 8   *  @xb: the xbitmap tree used to record the bit
 9   *  @bit: index of the bit to set
10   *
11   * This function is used to set a bit in the xbitmap. If the bitmap 
that @bit
12   * resides in is not there, the per-cpu ida_bitmap will be taken.
13   *
14   * Returns: 0 on success. %-EAGAIN indicates that @bit was not set.
15   */
16  int xb_set_bit(struct xb *xb, unsigned long bit)
17  {
18  int err;
19  unsigned long index = bit / IDA_BITMAP_BITS;
20  struct radix_tree_root *root = &xb->xbrt;
21  struct radix_tree_node *node;
22  void **slot;
23  struct ida_bitmap *bitmap;
24  unsigned long ebit;
25  
26  bit %= IDA_BITMAP_BITS;
27  ebit = bit + 2;
28  
  > 29  err = __radix_tree_create(root, index, 0, &node, &slot);
30  if (err)
31  return err;
32  bitmap = rcu_dereference_raw(*slot);
33  if (radix_tree_exception(bitmap)) {
34  unsigned long tmp = (unsigned long)bitmap;
35  
36  if (ebit < BITS_PER_LONG) {
37  tmp |= 1UL << ebit;
38  rcu_assign_pointer(*slot, (void *)tmp);
39  return 0;
40  }
41  bitmap = this_cpu_xchg(ida_bitmap, NULL);
42  if (!bitmap)
43  return -EAGAIN;
44  memset(bitmap, 0, sizeof(*bitmap));
45  bitmap->bitmap[0] = tmp >> RADIX_TREE_EXCEPTIONAL_SHIFT;
46  rcu_assign_pointer(*slot, bitmap);
47  }
48  
49  if (!bitmap) {
50  if (ebit < BITS_PER_LONG) {
51  bitmap = (void *)((1UL << ebit) |
52  RADIX_TREE_EXCEPTIONAL_ENTRY);
  > 53  __radix_tree_replace(root, node, slot, bitmap, 
NULL);
54  return 0;
55  }
56  bitmap = this_cpu_xchg(ida_bitmap, NULL);
57  if (!bitmap)
58  return -EAGAIN;
59  memset(bitmap, 0, sizeof(*bitmap));
60  __radix_tree_replace(root, node, slot, bitmap, NULL);
61  }
62  
63  __set_bit(bit, bitmap->bitmap);
64  return 0;
65  }
66  EXPORT_SYMBOL(xb_set_bit);
67  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation



Re: [Qemu-devel] [PATCH 3/3] vfio/pci: Add ioeventfd support

2018-03-05 Thread kbuild test robot
Hi Alex,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.16-rc4 next-20180306]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Alex-Williamson/vfio-pci-Pull-BAR-mapping-setup-from-read-write-path/20180303-015851
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/vfio/pci/vfio_pci_rdwr.c:290:1: sparse: incorrect type in argument 2 
>> (different address spaces) @@expected void [noderef] * 
>> @@got sn:2>* @@
   drivers/vfio/pci/vfio_pci_rdwr.c:290:1:expected void [noderef] 
*
   drivers/vfio/pci/vfio_pci_rdwr.c:290:1:got void *opaque
   drivers/vfio/pci/vfio_pci_rdwr.c:291:1: sparse: incorrect type in argument 2 
(different address spaces) @@expected void [noderef] * @@   
 got sn:2>* @@
   drivers/vfio/pci/vfio_pci_rdwr.c:291:1:expected void [noderef] 
*
   drivers/vfio/pci/vfio_pci_rdwr.c:291:1:got void *opaque
   drivers/vfio/pci/vfio_pci_rdwr.c:292:1: sparse: incorrect type in argument 2 
(different address spaces) @@expected void [noderef] * @@   
 got sn:2>* @@
   drivers/vfio/pci/vfio_pci_rdwr.c:292:1:expected void [noderef] 
*
   drivers/vfio/pci/vfio_pci_rdwr.c:292:1:got void *opaque
>> drivers/vfio/pci/vfio_pci_rdwr.c:378:52: sparse: incorrect type in argument 
>> 1 (different address spaces) @@expected void *opaque @@got void 
>> [noderef] *

vim +290 drivers/vfio/pci/vfio_pci_rdwr.c

   286  
   287  #ifdef iowrite64
   288  VFIO_PCI_IOEVENTFD_HANDLER(64)
   289  #endif
 > 290  VFIO_PCI_IOEVENTFD_HANDLER(32)
   291  VFIO_PCI_IOEVENTFD_HANDLER(16)
   292  VFIO_PCI_IOEVENTFD_HANDLER(8)
   293  
   294  long vfio_pci_ioeventfd(struct vfio_pci_device *vdev, loff_t offset,
   295  uint64_t data, int count, int fd)
   296  {
   297  struct pci_dev *pdev = vdev->pdev;
   298  loff_t pos = offset & VFIO_PCI_OFFSET_MASK;
   299  int ret, bar = VFIO_PCI_OFFSET_TO_INDEX(offset);
   300  struct vfio_pci_ioeventfd *ioeventfd;
   301  int (*handler)(void *addr, void *value);
   302  
   303  /* Only support ioeventfds into BARs */
   304  if (bar > VFIO_PCI_BAR5_REGION_INDEX)
   305  return -EINVAL;
   306  
   307  if (pos + count > pci_resource_len(pdev, bar))
   308  return -EINVAL;
   309  
   310  /* Disallow ioeventfds working around MSI-X table writes */
   311  if (bar == vdev->msix_bar &&
   312  !(pos + count <= vdev->msix_offset ||
   313pos >= vdev->msix_offset + vdev->msix_size))
   314  return -EINVAL;
   315  
   316  switch (count) {
   317  case 1:
   318  handler = &vfio_pci_ioeventfd_handler8;
   319  break;
   320  case 2:
   321  handler = &vfio_pci_ioeventfd_handler16;
   322  break;
   323  case 4:
   324  handler = &vfio_pci_ioeventfd_handler32;
   325  break;
   326  #ifdef iowrite64
   327  case 8:
   328  handler = &vfio_pci_ioeventfd_handler64;
   329  break;
   330  #endif
   331  default:
   332  return -EINVAL;
   333  }
   334  
   335  ret = vfio_pci_setup_barmap(vdev, bar);
   336  if (ret)
   337  return ret;
   338  
   339  mutex_lock(&vdev->ioeventfds_lock);
   340  
   341  list_for_each_entry(ioeventfd, &vdev->ioeventfds_list, next) {
   342  if (ioeventfd->pos == pos && ioeventfd->bar == bar &&
   343  ioeventfd->data == data && ioeventfd->count == 
count) {
   344  if (fd == -1) {
   345  vfio_virqfd_disable(&ioeventfd->virqfd);
   346  list_del(&ioeventfd->next);
   347  vdev->ioeventfds_nr--;
   348  kfree(ioeventfd);
   349  ret = 0;
   350  } else
   351  ret = -EEXIST;
   352  
   353  goto out_unlock;
   354  }
   355  }
   356  
   357  if (fd < 0) {
   358  ret = -ENODEV;
   359  goto out_unlock;
   360  }
   361  
   362  if (vdev->ioeventfds_nr >= VFIO_PCI_IOEVENTFD_MAX) {
   363  ret = -ENOSPC;
   364  goto out_unlock;
   365  }
   366  
   367  ioeventfd = kzalloc(sizeof(*ioeventfd), GFP_KERNEL);
   368  if (!ioeventfd) {
   369  ret = -ENOMEM;
 

Re: [Qemu-devel] [PATCH v3 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device

2015-10-04 Thread kbuild test robot
Hi Gabriel,

[auto build test results on v4.3-rc3 -- if it's inappropriate base, please 
ignore]

reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   drivers/firmware/qemu_fw_cfg.c:66:25: sparse: constant 0xd0510 is so big 
it is long
>> drivers/firmware/qemu_fw_cfg.c:95:39: sparse: restricted __be16 degrades to 
>> integer
>> drivers/firmware/qemu_fw_cfg.c:95:58: sparse: restricted __le16 degrades to 
>> integer
>> drivers/firmware/qemu_fw_cfg.c:111:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:111:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:111:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:111:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:111:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:111:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:95:39: sparse: restricted __be16 degrades to 
>> integer
>> drivers/firmware/qemu_fw_cfg.c:95:58: sparse: restricted __le16 degrades to 
>> integer
>> drivers/firmware/qemu_fw_cfg.c:95:39: sparse: restricted __be16 degrades to 
>> integer
>> drivers/firmware/qemu_fw_cfg.c:95:58: sparse: restricted __le16 degrades to 
>> integer
   drivers/firmware/qemu_fw_cfg.c:367:25: sparse: cast to restricted __be32
   drivers/firmware/qemu_fw_cfg.c:367:25: sparse: cast to restricted __be32
   drivers/firmware/qemu_fw_cfg.c:367:25: sparse: cast to restricted __be32
   drivers/firmware/qemu_fw_cfg.c:367:25: sparse: cast to restricted __be32
   drivers/firmware/qemu_fw_cfg.c:367:25: sparse: cast to restricted __be32
   drivers/firmware/qemu_fw_cfg.c:367:25: sparse: cast to restricted __be32
>> drivers/firmware/qemu_fw_cfg.c:368:27: sparse: cast to restricted __be16
>> drivers/firmware/qemu_fw_cfg.c:368:27: sparse: cast to restricted __be16
>> drivers/firmware/qemu_fw_cfg.c:368:27: sparse: cast to restricted __be16
>> drivers/firmware/qemu_fw_cfg.c:368:27: sparse: cast to restricted __be16
>> drivers/firmware/qemu_fw_cfg.c:95:39: sparse: restricted __be16 degrades to 
>> integer
>> drivers/firmware/qemu_fw_cfg.c:95:58: sparse: restricted __le16 degrades to 
>> integer
>> drivers/firmware/qemu_fw_cfg.c:420:22: sparse: cast to restricted __le32

vim +95 drivers/firmware/qemu_fw_cfg.c

60  .size = 0x0a,
61  .ctrl_offset = 0x08,
62  .data_offset = 0x00,
63  .is_mmio = true,
64  }, {
65  .name = "fw_cfg MMIO on sun4m",
  > 66  .base = 0xd0510,
67  .size = 0x03,
68  .ctrl_offset = 0x00,
69  .data_offset = 0x02,
70  .is_mmio = true,
71  }, {
72  .name = "fw_cfg MMIO on ppc/mac",
73  .base = 0xf510,
74  .size = 0x03,
75  .ctrl_offset = 0x00,
76  .data_offset = 0x02,
77  .is_mmio = true,
78  }, { } /* END */
79  };
80  
81  /* fw_cfg device i/o currently selected option set */
82  static struct fw_cfg_access *fw_cfg_mode;
83  
84  /* fw_cfg device i/o register addresses */
85  static void __iomem *fw_cfg_dev_base;
86  static void __iomem *fw_cfg_reg_ctrl;
87  static void __iomem *fw_cfg_reg_data;
88  
89  /* atomic access to fw_cfg device (potentially slow i/o, so using 
mutex) */
90  static DEFINE_MUTEX(fw_cfg_dev_lock);
91  
92  /* pick appropriate endianness for selector key */
93  static inline u16 fw_cfg_sel_endianness(u16 key)
94  {
  > 95  return fw_cfg_mode->is_mmio ? cpu_to_be16(key) : 
cpu_to_le16(key);
96  }
97  
98  /* type for fw_cfg "directory scan" visitor/callback function */
99  typedef int (*fw_cfg_file_callback)(const struct fw_cfg_file *f);
   100  
   101  /* run a given callback on each fw_cfg directory entry */
   102  static int fw_cfg_scan_dir(fw_cfg_file_callback callback)
   103  {
   104  int ret = 0;
   105  u32 count, i;
   106  struct fw_cfg_file f;
   107  
   108  mutex_lock(&fw_cfg_dev_lock);
   109  iowrite16(fw_cfg_sel_endianness(FW_CFG_FILE_DIR), 
fw_cfg_reg_ctrl);
   110  ioread8_rep(fw_cfg_reg_data, &count, sizeof(count));
 > 111  for (i = 0; i < be32_to_cpu(count); i++) {
   112  ioread8_rep(fw_cfg_reg_data, &f, sizeof(f));
   113  ret = callback(&f);
   114  if (ret)

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation



Re: [Qemu-devel] [PATCH v5 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device

2015-11-23 Thread kbuild test robot
Hi Gabriel,

[auto build test WARNING on v4.4-rc2]
[also build test WARNING on next-20151123]
[cannot apply to robh/for-next]

url:
https://github.com/0day-ci/linux/commits/Gabriel-L-Somlo/SysFS-driver-for-QEMU-fw_cfg-device/20151124-000402
config: arm-allyesconfig (attached as .config)
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm 

All warnings (new ones prefixed by >>):

   drivers/firmware/qemu_fw_cfg.c: In function 'fw_cfg_cmdline_set':
>> drivers/firmware/qemu_fw_cfg.c:510:7: warning: format '%lli' expects 
>> argument of type 'long long int *', but argument 3 has type 'phys_addr_t *' 
>> [-Wformat=]
  &ctrl_off, &data_off, &consumed);
  ^
>> drivers/firmware/qemu_fw_cfg.c:510:7: warning: format '%lli' expects 
>> argument of type 'long long int *', but argument 5 has type 'resource_size_t 
>> *' [-Wformat=]
   drivers/firmware/qemu_fw_cfg.c:510:7: warning: format '%lli' expects 
argument of type 'long long int *', but argument 6 has type 'resource_size_t *' 
[-Wformat=]
   drivers/firmware/qemu_fw_cfg.c: In function 'fw_cfg_cmdline_get':
>> drivers/firmware/qemu_fw_cfg.c:563:5: warning: format '%llx' expects 
>> argument of type 'long long unsigned int', but argument 4 has type 
>> 'resource_size_t' [-Wformat=]
fw_cfg_cmdline_dev->resource[0].start);
^
   drivers/firmware/qemu_fw_cfg.c:563:5: warning: format '%llx' expects 
argument of type 'long long unsigned int', but argument 5 has type 
'resource_size_t' [-Wformat=]
   drivers/firmware/qemu_fw_cfg.c:569:5: warning: format '%llx' expects 
argument of type 'long long unsigned int', but argument 4 has type 
'resource_size_t' [-Wformat=]
fw_cfg_cmdline_dev->resource[2].start);
^
   drivers/firmware/qemu_fw_cfg.c:569:5: warning: format '%llx' expects 
argument of type 'long long unsigned int', but argument 5 has type 
'resource_size_t' [-Wformat=]
>> drivers/firmware/qemu_fw_cfg.c:569:5: warning: format '%llu' expects 
>> argument of type 'long long unsigned int', but argument 6 has type 
>> 'resource_size_t' [-Wformat=]
   drivers/firmware/qemu_fw_cfg.c:569:5: warning: format '%llu' expects 
argument of type 'long long unsigned int', but argument 7 has type 
'resource_size_t' [-Wformat=]

vim +510 drivers/firmware/qemu_fw_cfg.c

   504  /* consume "" portion of command line argument */
   505  size = memparse(arg, &str);
   506  
   507  /* get "@[::]" chunks */
   508  processed = sscanf(str, "@%lli%n:%lli:%lli%n",
   509 &base, &consumed,
 > 510 &ctrl_off, &data_off, &consumed);
   511  
   512  /* sscanf() must process precisely 1 or 3 chunks:
   513   *  is mandatory, optionally followed by 
   514   * and ;
   515   * there must be no extra characters after the last chunk,
   516   * so str[consumed] must be '\0'.
   517   */
   518  if (str[consumed] ||
   519  (processed != 1 && processed != 3))
   520  return -EINVAL;
   521  
   522  res[0].start = base;
   523  res[0].end = base + size - 1;
   524  res[0].flags = !strcmp(kp->name, "mmio") ? IORESOURCE_MEM :
   525 IORESOURCE_IO;
   526  
   527  /* insert register offsets, if provided */
   528  if (processed > 1) {
   529  res[1].name = "ctrl";
   530  res[1].start = ctrl_off;
   531  res[1].flags = IORESOURCE_REG;
   532  res[2].name = "data";
   533  res[2].start = data_off;
   534  res[2].flags = IORESOURCE_REG;
   535  }
   536  
   537  /* "processed" happens to nicely match the number of resources
   538   * we need to pass in to this platform device.
   539   */
   540  fw_cfg_cmdline_dev = platform_device_register_simple("fw_cfg",
   541  PLATFORM_DEVID_NONE, res, 
processed);
   542  if (IS_ERR(fw_cfg_cmdline_dev))
   543  return PTR_ERR(fw_cfg_cmdline_dev);
   544  
   545  return 0;
   546  }
   547  
   548  static int fw_cfg_cmdline_get(char *buf, const struct kernel_param *kp)
   549  {
   550  /* stay silent if device was not configured via the command
   551   * line, or if the parameter name (ioport/mmio) doesn't match
   552   * the device setting
   553   */
   554  if (!fw_cfg_cmdline_dev ||
   555  (!strcmp(kp->name, "mmio") ^
   556   (fw_cfg_cmdline_dev->resource[0].flags == IORESOURCE_MEM)))
   557  return 0;
   558  
   559  switch (fw_cfg_cmdline_dev->num_resource

Re: [Qemu-devel] [PATCH kernel 1/2] mm: add the related functions to build the free page bitmap

2016-04-19 Thread kbuild test robot
Hi,

[auto build test ERROR on v4.6-rc4]
[also build test ERROR on next-20160419]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improving the system]

url:
https://github.com/0day-ci/linux/commits/Liang-Li/speed-up-live-migration-by-skipping-free-pages/20160419-224707
config: i386-tinyconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   mm/built-in.o: In function `get_free_pages':
>> (.text+0x3ff6): undefined reference to `drop_cache'

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [Qemu-devel] [PATCH kernel 1/2] mm: add the related functions to build the free page bitmap

2016-04-19 Thread kbuild test robot
Hi,

[auto build test ERROR on v4.6-rc4]
[also build test ERROR on next-20160419]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improving the system]

url:
https://github.com/0day-ci/linux/commits/Liang-Li/speed-up-live-migration-by-skipping-free-pages/20160419-224707
config: arm-allnoconfig (attached as .config)
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   mm/built-in.o: In function `get_free_pages':
>> :(.text+0x3db4): undefined reference to `drop_cache'

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [Qemu-devel] [PATCH kernel 1/2] mm: add the related functions to build the free page bitmap

2016-04-19 Thread kbuild test robot
Hi,

[auto build test ERROR on v4.6-rc4]
[also build test ERROR on next-20160419]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improving the system]

url:
https://github.com/0day-ci/linux/commits/Liang-Li/speed-up-live-migration-by-skipping-free-pages/20160419-224707
config: parisc-allnoconfig (attached as .config)
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=parisc 

All errors (new ones prefixed by >>):

   mm/built-in.o: In function `get_free_pages':
>> (.text.get_free_pages+0x28): undefined reference to `drop_cache'

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [Qemu-devel] [PATCH v7 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device

2016-01-27 Thread kbuild test robot
Hi Gabriel,

[auto build test WARNING on driver-core/driver-core-testing]
[also build test WARNING on v4.5-rc1 next-20160127]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improving the system]

url:
https://github.com/0day-ci/linux/commits/Gabriel-L-Somlo/SysFS-driver-for-QEMU-fw_cfg-device/20160128-111609
config: ia64-allyesconfig (attached as .config)
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=ia64 

All warnings (new ones prefixed by >>):

>> drivers/firmware/qemu_fw_cfg.c:112:4: warning: #warning "QEMU FW_CFG may not 
>> be available on this architecture!" [-Wcpp]
#  warning "QEMU FW_CFG may not be available on this architecture!"
   ^

vim +112 drivers/firmware/qemu_fw_cfg.c

96  release_region(fw_cfg_p_base, fw_cfg_p_size);
97  }
98  }
99  
   100  /* arch-specific ctrl & data register offsets are not available in 
ACPI, DT */
   101  #if !(defined(FW_CFG_CTRL_OFF) && defined(FW_CTRL_DATA_OFF))
   102  # if (defined(CONFIG_ARM) || defined(CONFIG_ARM64))
   103  #  define FW_CFG_CTRL_OFF 0x08
   104  #  define FW_CFG_DATA_OFF 0x00
   105  # elif (defined(CONFIG_PPC_PMAC) || defined(CONFIG_SPARC32)) /* 
ppc/mac,sun4m */
   106  #  define FW_CFG_CTRL_OFF 0x00
   107  #  define FW_CFG_DATA_OFF 0x02
   108  # elif (defined(CONFIG_X86) || defined(CONFIG_SPARC64)) /* x86, sun4u */
   109  #  define FW_CFG_CTRL_OFF 0x00
   110  #  define FW_CFG_DATA_OFF 0x01
   111  # else
 > 112  #  warning "QEMU FW_CFG may not be available on this architecture!"
   113  #  define FW_CFG_CTRL_OFF 0x00
   114  #  define FW_CFG_DATA_OFF 0x01
   115  # endif
   116  #endif
   117  
   118  /* initialize fw_cfg device i/o from platform data */
   119  static int fw_cfg_do_platform_probe(struct platform_device *pdev)
   120  {

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data


Re: [Qemu-devel] [PATCH v3] crypto: add virtio-crypto driver

2016-11-28 Thread kbuild test robot
Hi Gonglei,

[auto build test ERROR on cryptodev/master]
[also build test ERROR on v4.9-rc7 next-20161128]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Gonglei/crypto-add-virtio-crypto-driver/20161128-214706
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: sparc-allmodconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc 

All error/warnings (new ones prefixed by >>):

   In file included from arch/sparc/include/asm/topology.h:4:0,
from include/linux/topology.h:35,
from include/linux/gfp.h:8,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from drivers/crypto/virtio/virtio_crypto_mgr.c:21:
   drivers/crypto/virtio/virtio_crypto_common.h: In function 
'virtio_crypto_get_current_node':
>> arch/sparc/include/asm/topology_64.h:44:44: error: implicit declaration of 
>> function 'cpu_data' [-Werror=implicit-function-declaration]
#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id)
   ^
>> drivers/crypto/virtio/virtio_crypto_common.h:118:9: note: in expansion of 
>> macro 'topology_physical_package_id'
 return topology_physical_package_id(smp_processor_id());
^~~~
>> arch/sparc/include/asm/topology_64.h:44:57: error: request for member 
>> 'proc_id' in something not a structure or union
#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id)
^
>> drivers/crypto/virtio/virtio_crypto_common.h:118:9: note: in expansion of 
>> macro 'topology_physical_package_id'
 return topology_physical_package_id(smp_processor_id());
^~~~
   cc1: some warnings being treated as errors

vim +/topology_physical_package_id +118 
drivers/crypto/virtio/virtio_crypto_common.h

   102  };
   103  
   104  int virtcrypto_devmgr_add_dev(struct virtio_crypto *vcrypto_dev);
   105  struct list_head *virtcrypto_devmgr_get_head(void);
   106  void virtcrypto_devmgr_rm_dev(struct virtio_crypto *vcrypto_dev);
   107  struct virtio_crypto *virtcrypto_devmgr_get_first(void);
   108  int virtcrypto_dev_in_use(struct virtio_crypto *vcrypto_dev);
   109  int virtcrypto_dev_get(struct virtio_crypto *vcrypto_dev);
   110  void virtcrypto_dev_put(struct virtio_crypto *vcrypto_dev);
   111  int virtcrypto_dev_started(struct virtio_crypto *vcrypto_dev);
   112  struct virtio_crypto *virtcrypto_get_dev_node(int node);
   113  int virtcrypto_dev_start(struct virtio_crypto *vcrypto);
   114  void virtcrypto_dev_stop(struct virtio_crypto *vcrypto);
   115  
   116  static inline int virtio_crypto_get_current_node(void)
   117  {
 > 118  return topology_physical_package_id(smp_processor_id());
   119  }
   120  
   121  int virtio_crypto_algs_register(void);
   122  void virtio_crypto_algs_unregister(void);
   123  
   124  #endif /* _VIRITO_CRYPTO_COMMON_H */

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [Qemu-devel] [PATCH v5 1/1] crypto: add virtio-crypto driver

2016-12-03 Thread kbuild test robot
Hi Gonglei,

[auto build test ERROR on cryptodev/master]
[also build test ERROR on v4.9-rc7 next-20161202]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Gonglei/crypto-add-virtio-crypto-driver/20161202-190424
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc64 

All errors (new ones prefixed by >>):

   In file included from arch/sparc/include/asm/topology.h:4:0,
from include/linux/topology.h:35,
from include/linux/gfp.h:8,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from drivers/crypto/virtio/virtio_crypto_mgr.c:21:
   drivers/crypto/virtio/virtio_crypto_common.h: In function 
'virtio_crypto_get_current_node':
>> arch/sparc/include/asm/topology_64.h:44:44: error: implicit declaration of 
>> function 'cpu_data' [-Werror=implicit-function-declaration]
#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id)
   ^
   drivers/crypto/virtio/virtio_crypto_common.h:116:9: note: in expansion of 
macro 'topology_physical_package_id'
 return topology_physical_package_id(smp_processor_id());
^~~~
>> arch/sparc/include/asm/topology_64.h:44:57: error: request for member 
>> 'proc_id' in something not a structure or union
#define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id)
^
   drivers/crypto/virtio/virtio_crypto_common.h:116:9: note: in expansion of 
macro 'topology_physical_package_id'
 return topology_physical_package_id(smp_processor_id());
^~~~
   cc1: some warnings being treated as errors

vim +/cpu_data +44 arch/sparc/include/asm/topology_64.h

f5e706ad include/asm-sparc/topology_64.h  Sam Ravnborg2008-07-17  
28  
9d079337 arch/sparc/include/asm/topology_64.h David Miller2009-01-11  
29  #define cpumask_of_pcibus(bus)\
9d079337 arch/sparc/include/asm/topology_64.h David Miller2009-01-11  
30(pcibus_to_node(bus) == -1 ? \
e9b37512 arch/sparc/include/asm/topology_64.h Rusty Russell   2009-03-16  
31 cpu_all_mask : \
9d079337 arch/sparc/include/asm/topology_64.h David Miller2009-01-11  
32 cpumask_of_node(pcibus_to_node(bus)))
f5e706ad include/asm-sparc/topology_64.h  Sam Ravnborg2008-07-17  
33  
52708d69 arch/sparc/include/asm/topology_64.h Nitin Gupta 2015-11-02  
34  int __node_distance(int, int);
52708d69 arch/sparc/include/asm/topology_64.h Nitin Gupta 2015-11-02  
35  #define node_distance(a, b) __node_distance(a, b)
52708d69 arch/sparc/include/asm/topology_64.h Nitin Gupta 2015-11-02  
36  
f5e706ad include/asm-sparc/topology_64.h  Sam Ravnborg2008-07-17  
37  #else /* CONFIG_NUMA */
f5e706ad include/asm-sparc/topology_64.h  Sam Ravnborg2008-07-17  
38  
f5e706ad include/asm-sparc/topology_64.h  Sam Ravnborg2008-07-17  
39  #include 
f5e706ad include/asm-sparc/topology_64.h  Sam Ravnborg2008-07-17  
40  
f5e706ad include/asm-sparc/topology_64.h  Sam Ravnborg2008-07-17  
41  #endif /* !(CONFIG_NUMA) */
f5e706ad include/asm-sparc/topology_64.h  Sam Ravnborg2008-07-17  
42  
f5e706ad include/asm-sparc/topology_64.h  Sam Ravnborg2008-07-17  
43  #ifdef CONFIG_SMP
f5e706ad include/asm-sparc/topology_64.h  Sam Ravnborg2008-07-17 
@44  #define topology_physical_package_id(cpu) (cpu_data(cpu).proc_id)
f5e706ad include/asm-sparc/topology_64.h  Sam Ravnborg2008-07-17  
45  #define topology_core_id(cpu) (cpu_data(cpu).core_id)
acc455cf arch/sparc/include/asm/topology_64.h chris hyser 2015-04-22  
46  #define topology_core_cpumask(cpu)(&cpu_core_sib_map[cpu])
06931e62 arch/sparc/include/asm/topology_64.h Bartosz Golaszewski 2015-05-26  
47  #define topology_sibling_cpumask(cpu) (&per_cpu(cpu_sibling_map, 
cpu))
f5e706ad include/asm-sparc/topology_64.h  Sam Ravnborg2008-07-17  
48  #endif /* CONFIG_SMP */
f5e706ad include/asm-sparc/topology_64.h  Sam Ravnborg2008-07-17  
49  
3905c54f arch/sparc/include/asm/topology_64.h Stephen Rothwell2011-04-12  
50  extern cpumask_t cpu_core_map[NR_CPUS];
acc455cf arch/sparc/include/asm/topology_64.h chris hyser 2015-04-22  
51  extern cpumask_t cpu_core_sib_ma