Re: [PATCH v2] virtio_blk: Add support for lifetime feature
by kernel test robot
Hi Enrico,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on block/for-next]
[also build test WARNING on linus/master v5.12-rc7]
[cannot apply to vhost/linux-next next-20210416]
[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/Enrico-Granata/virtio_blk-Add-su...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: x86_64-randconfig-a004-20210416 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/fc90f60f9bc3b5165dc34acaabc80559e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Enrico-Granata/virtio_blk-Add-support-for-lifetime-feature/20210417-034754
git checkout fc90f60f9bc3b5165dc34acaabc80559e1fbcb5e
# 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 >>):
>> drivers/block/virtio_blk.c:248:7: warning: variable 'type' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
case REQ_OP_DRV_IN:
^~~~~~~~~~~~~
drivers/block/virtio_blk.c:258:24: note: uninitialized use occurs here
vbr->out_hdr.sector = type ?
^~~~
drivers/block/virtio_blk.c:229:10: note: initialize the variable 'type' to silence this warning
u32 type;
^
= 0
1 warning generated.
vim +/type +248 drivers/block/virtio_blk.c
944e7c87967c82 Jens Axboe 2018-11-26 216
fc17b6534eb839 Christoph Hellwig 2017-06-03 217 static blk_status_t virtio_queue_rq(struct blk_mq_hw_ctx *hctx,
74c450521dd8d2 Jens Axboe 2014-10-29 218 const struct blk_mq_queue_data *bd)
e467cde238184d Rusty Russell 2007-10-22 219 {
1cf7e9c68fe842 Jens Axboe 2013-11-01 220 struct virtio_blk *vblk = hctx->queue->queuedata;
74c450521dd8d2 Jens Axboe 2014-10-29 221 struct request *req = bd->rq;
9d74e25737d73e Christoph Hellwig 2014-04-14 222 struct virtblk_req *vbr = blk_mq_rq_to_pdu(req);
1cf7e9c68fe842 Jens Axboe 2013-11-01 223 unsigned long flags;
20af3cfd20145f Paolo Bonzini 2013-03-20 224 unsigned int num;
6a27b656fc0210 Ming Lei 2014-06-26 225 int qid = hctx->queue_num;
5261b85e586afe Rusty Russell 2014-03-13 226 int err;
e8edca6f7f9223 Ming Lei 2014-05-30 227 bool notify = false;
1f23816b8eb8fd Changpeng Liu 2018-11-01 228 bool unmap = false;
aebf526b53aea1 Christoph Hellwig 2017-01-31 229 u32 type;
e467cde238184d Rusty Russell 2007-10-22 230
1cf7e9c68fe842 Jens Axboe 2013-11-01 231 BUG_ON(req->nr_phys_segments + 2 > vblk->sg_elems);
e467cde238184d Rusty Russell 2007-10-22 232
aebf526b53aea1 Christoph Hellwig 2017-01-31 233 switch (req_op(req)) {
aebf526b53aea1 Christoph Hellwig 2017-01-31 234 case REQ_OP_READ:
aebf526b53aea1 Christoph Hellwig 2017-01-31 235 case REQ_OP_WRITE:
aebf526b53aea1 Christoph Hellwig 2017-01-31 236 type = 0;
f1b0ef06260271 Christoph Hellwig 2009-09-17 237 break;
aebf526b53aea1 Christoph Hellwig 2017-01-31 238 case REQ_OP_FLUSH:
aebf526b53aea1 Christoph Hellwig 2017-01-31 239 type = VIRTIO_BLK_T_FLUSH;
f1b0ef06260271 Christoph Hellwig 2009-09-17 240 break;
1f23816b8eb8fd Changpeng Liu 2018-11-01 241 case REQ_OP_DISCARD:
1f23816b8eb8fd Changpeng Liu 2018-11-01 242 type = VIRTIO_BLK_T_DISCARD;
1f23816b8eb8fd Changpeng Liu 2018-11-01 243 break;
1f23816b8eb8fd Changpeng Liu 2018-11-01 244 case REQ_OP_WRITE_ZEROES:
1f23816b8eb8fd Changpeng Liu 2018-11-01 245 type = VIRTIO_BLK_T_WRITE_ZEROES;
1f23816b8eb8fd Changpeng Liu 2018-11-01 246 unmap = !(req->cmd_flags & REQ_NOUNMAP);
1f23816b8eb8fd Changpeng Liu 2018-11-01 247 break;
aebf526b53aea1 Christoph Hellwig 2017-01-31 @248 case REQ_OP_DRV_IN:
fc90f60f9bc3b5 Enrico Granata 2021-04-16 249 break; /* type already set for custom requests */
f1b0ef06260271 Christoph Hellwig 2009-09-17 250 default:
aebf526b53aea1 Christoph Hellwig 2017-01-31 251 WARN_ON_ONCE(1);
fc17b6534eb839 Christoph Hellwig 2017-06-03 252 return BLK_STS_IOERR;
dd40e456a40ebb FUJITA Tomonori 2010-07-03 253 }
e467cde238184d Rusty Russell 2007-10-22 254
fc90f60f9bc3b5 Enrico Granata 2021-04-16 255 if (req_op(req) != REQ_OP_DRV_IN)
aebf526b53aea1 Christoph Hellwig 2017-01-31 256 vbr->out_hdr.type = cpu_to_virtio32(vblk->vdev, type);
fc90f60f9bc3b5 Enrico Granata 2021-04-16 257
aebf526b53aea1 Christoph Hellwig 2017-01-31 258 vbr->out_hdr.sector = type ?
aebf526b53aea1 Christoph Hellwig 2017-01-31 259 0 : cpu_to_virtio64(vblk->vdev, blk_rq_pos(req));
aebf526b53aea1 Christoph Hellwig 2017-01-31 260 vbr->out_hdr.ioprio = cpu_to_virtio32(vblk->vdev, req_get_ioprio(req));
aebf526b53aea1 Christoph Hellwig 2017-01-31 261
e2490073cd7c3d Christoph Hellwig 2014-09-13 262 blk_mq_start_request(req);
e2490073cd7c3d Christoph Hellwig 2014-09-13 263
1f23816b8eb8fd Changpeng Liu 2018-11-01 264 if (type == VIRTIO_BLK_T_DISCARD || type == VIRTIO_BLK_T_WRITE_ZEROES) {
1f23816b8eb8fd Changpeng Liu 2018-11-01 265 err = virtblk_setup_discard_write_zeroes(req, unmap);
1f23816b8eb8fd Changpeng Liu 2018-11-01 266 if (err)
1f23816b8eb8fd Changpeng Liu 2018-11-01 267 return BLK_STS_RESOURCE;
1f23816b8eb8fd Changpeng Liu 2018-11-01 268 }
1f23816b8eb8fd Changpeng Liu 2018-11-01 269
85dada09eeb31c Christoph Hellwig 2017-01-28 270 num = blk_rq_map_sg(hctx->queue, req, vbr->sg);
1cde26f928863d Hannes Reinecke 2009-05-18 271 if (num) {
85dada09eeb31c Christoph Hellwig 2017-01-28 272 if (rq_data_dir(req) == WRITE)
19c1c5a64c3b8e Michael S. Tsirkin 2014-10-07 273 vbr->out_hdr.type |= cpu_to_virtio32(vblk->vdev, VIRTIO_BLK_T_OUT);
20af3cfd20145f Paolo Bonzini 2013-03-20 274 else
19c1c5a64c3b8e Michael S. Tsirkin 2014-10-07 275 vbr->out_hdr.type |= cpu_to_virtio32(vblk->vdev, VIRTIO_BLK_T_IN);
e467cde238184d Rusty Russell 2007-10-22 276 }
e467cde238184d Rusty Russell 2007-10-22 277
6a27b656fc0210 Ming Lei 2014-06-26 278 spin_lock_irqsave(&vblk->vqs[qid].lock, flags);
97b50a654d5de5 Christoph Hellwig 2017-01-28 279 err = virtblk_add_req(vblk->vqs[qid].vq, vbr, vbr->sg, num);
5261b85e586afe Rusty Russell 2014-03-13 280 if (err) {
6a27b656fc0210 Ming Lei 2014-06-26 281 virtqueue_kick(vblk->vqs[qid].vq);
f5f6b95c72f7f8 Halil Pasic 2020-02-13 282 /* Don't stop the queue if -ENOMEM: we may have failed to
f5f6b95c72f7f8 Halil Pasic 2020-02-13 283 * bounce the buffer due to global resource outage.
f5f6b95c72f7f8 Halil Pasic 2020-02-13 284 */
f5f6b95c72f7f8 Halil Pasic 2020-02-13 285 if (err == -ENOSPC)
1cf7e9c68fe842 Jens Axboe 2013-11-01 286 blk_mq_stop_hw_queue(hctx);
6a27b656fc0210 Ming Lei 2014-06-26 287 spin_unlock_irqrestore(&vblk->vqs[qid].lock, flags);
3d973b2e9a6259 Halil Pasic 2020-02-13 288 switch (err) {
3d973b2e9a6259 Halil Pasic 2020-02-13 289 case -ENOSPC:
86ff7c2a80cd35 Ming Lei 2018-01-30 290 return BLK_STS_DEV_RESOURCE;
3d973b2e9a6259 Halil Pasic 2020-02-13 291 case -ENOMEM:
3d973b2e9a6259 Halil Pasic 2020-02-13 292 return BLK_STS_RESOURCE;
3d973b2e9a6259 Halil Pasic 2020-02-13 293 default:
fc17b6534eb839 Christoph Hellwig 2017-06-03 294 return BLK_STS_IOERR;
e467cde238184d Rusty Russell 2007-10-22 295 }
3d973b2e9a6259 Halil Pasic 2020-02-13 296 }
e467cde238184d Rusty Russell 2007-10-22 297
74c450521dd8d2 Jens Axboe 2014-10-29 298 if (bd->last && virtqueue_kick_prepare(vblk->vqs[qid].vq))
e8edca6f7f9223 Ming Lei 2014-05-30 299 notify = true;
6a27b656fc0210 Ming Lei 2014-06-26 300 spin_unlock_irqrestore(&vblk->vqs[qid].lock, flags);
e8edca6f7f9223 Ming Lei 2014-05-30 301
e8edca6f7f9223 Ming Lei 2014-05-30 302 if (notify)
6a27b656fc0210 Ming Lei 2014-06-26 303 virtqueue_notify(vblk->vqs[qid].vq);
fc17b6534eb839 Christoph Hellwig 2017-06-03 304 return BLK_STS_OK;
a98755c559e0e9 Asias He 2012-08-08 305 }
a98755c559e0e9 Asias He 2012-08-08 306
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[trace:ftrace/fgraph-multi 31/40] kernel/trace/fgraph.c:647:46: error: initialization of 'trace_func_graph_ret_t' {aka 'void (*)(struct ftrace_graph_ret *, struct fgraph_ops *)'} from incompatible pointer type 'void (*)(struct ftrace_graph_ret *)'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git ftrace/fgraph-multi
head: 978dc256bd4d08df876d58b4fa01ba4cb3926242
commit: a436705d3d66255f8e32aa715dca3fcabe9cb0a9 [31/40] ftrace/function_graph: Pass fgraph_ops to function graph callbacks
config: i386-randconfig-r035-20210416 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git/c...
git remote add trace https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
git fetch --no-tags trace ftrace/fgraph-multi
git checkout a436705d3d66255f8e32aa715dca3fcabe9cb0a9
# save the attached .config to linux build tree
make W=1 W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/trace/fgraph.c:491:15: warning: no previous prototype for 'ftrace_return_to_handler' [-Wmissing-prototypes]
491 | unsigned long ftrace_return_to_handler(unsigned long frame_pointer)
| ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/fgraph.c: In function 'ftrace_return_to_handler':
kernel/trace/fgraph.c:493:27: warning: variable 'ret_stack' set but not used [-Wunused-but-set-variable]
493 | struct ftrace_ret_stack *ret_stack;
| ^~~~~~~~~
kernel/trace/fgraph.c: At top level:
kernel/trace/fgraph.c:635:6: warning: no previous prototype for 'ftrace_graph_sleep_time_control' [-Wmissing-prototypes]
635 | void ftrace_graph_sleep_time_control(bool enable)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/trace/fgraph.c:647:46: error: initialization of 'trace_func_graph_ret_t' {aka 'void (*)(struct ftrace_graph_ret *, struct fgraph_ops *)'} from incompatible pointer type 'void (*)(struct ftrace_graph_ret *)' [-Werror=incompatible-pointer-types]
647 | trace_func_graph_ret_t ftrace_graph_return = ftrace_stub_graph;
| ^~~~~~~~~~~~~~~~~
kernel/trace/fgraph.c: In function 'unregister_ftrace_graph':
>> kernel/trace/fgraph.c:909:23: error: assignment to 'trace_func_graph_ret_t' {aka 'void (*)(struct ftrace_graph_ret *, struct fgraph_ops *)'} from incompatible pointer type 'void (*)(struct ftrace_graph_ret *)' [-Werror=incompatible-pointer-types]
909 | ftrace_graph_return = ftrace_stub_graph;
| ^
cc1: some warnings being treated as errors
vim +647 kernel/trace/fgraph.c
b83b43ffc6e4b5 Steven Rostedt (VMware 2019-10-15 645)
e73e679f656e67 Steven Rostedt (VMware 2018-11-15 646) /* The callbacks that hook a function */
46f9469247c6f4 Steven Rostedt (VMware 2019-11-18 @647) trace_func_graph_ret_t ftrace_graph_return = ftrace_stub_graph;
e73e679f656e67 Steven Rostedt (VMware 2018-11-15 648) trace_func_graph_ent_t ftrace_graph_entry = ftrace_graph_entry_stub;
e73e679f656e67 Steven Rostedt (VMware 2018-11-15 649)
:::::: The code at line 647 was first introduced by commit
:::::: 46f9469247c6f4697cbbf37e4b3961120bf07f29 ftrace: Rename ftrace_graph_stub to ftrace_stub_graph
:::::: TO: Steven Rostedt (VMware) <rostedt(a)goodmis.org>
:::::: CC: Steven Rostedt (VMware) <rostedt(a)goodmis.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v3 2/2] iommu/sva: Remove mm parameter from SVA bind API
by kernel test robot
Hi Jacob,
I love your patch! Yet something to improve:
[auto build test ERROR on e49d033bddf5b565044e2abe4241353959bc9120]
url: https://github.com/0day-ci/linux/commits/Jacob-Pan/Simplify-and-restrict-...
base: e49d033bddf5b565044e2abe4241353959bc9120
config: arm64-randconfig-r034-20210416 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f549176ad976caa3e19edd036df9a7e12770af7c)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/6d85fee95bdcd7e53f10442ddc71d0c31...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jacob-Pan/Simplify-and-restrict-IOMMU-SVA-APIs/20210417-052451
git checkout 6d85fee95bdcd7e53f10442ddc71d0c310d43367
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
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/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2631:15: error: incompatible function pointer types initializing 'struct iommu_sva *(*)(struct device *, unsigned int)' with an expression of type 'struct iommu_sva *(struct device *, struct mm_struct *, unsigned int)' [-Werror,-Wincompatible-function-pointer-types]
.sva_bind = arm_smmu_sva_bind,
^~~~~~~~~~~~~~~~~
1 error generated.
vim +2631 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2608
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2609 static struct iommu_ops arm_smmu_ops = {
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2610 .capable = arm_smmu_capable,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2611 .domain_alloc = arm_smmu_domain_alloc,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2612 .domain_free = arm_smmu_domain_free,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2613 .attach_dev = arm_smmu_attach_dev,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2614 .map = arm_smmu_map,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2615 .unmap = arm_smmu_unmap,
07fdef34d2be68 drivers/iommu/arm-smmu-v3.c Zhen Lei 2018-09-20 2616 .flush_iotlb_all = arm_smmu_flush_iotlb_all,
32b124492bdf97 drivers/iommu/arm-smmu-v3.c Robin Murphy 2017-09-28 2617 .iotlb_sync = arm_smmu_iotlb_sync,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2618 .iova_to_phys = arm_smmu_iova_to_phys,
cefa0d55da3753 drivers/iommu/arm-smmu-v3.c Joerg Roedel 2020-04-29 2619 .probe_device = arm_smmu_probe_device,
cefa0d55da3753 drivers/iommu/arm-smmu-v3.c Joerg Roedel 2020-04-29 2620 .release_device = arm_smmu_release_device,
08d4ca2a672bab drivers/iommu/arm-smmu-v3.c Robin Murphy 2016-09-12 2621 .device_group = arm_smmu_device_group,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2622 .domain_get_attr = arm_smmu_domain_get_attr,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2623 .domain_set_attr = arm_smmu_domain_set_attr,
8f78515425daea drivers/iommu/arm-smmu-v3.c Robin Murphy 2016-09-12 2624 .of_xlate = arm_smmu_of_xlate,
50019f09a4baa0 drivers/iommu/arm-smmu-v3.c Eric Auger 2017-01-19 2625 .get_resv_regions = arm_smmu_get_resv_regions,
a66c5dc549d1e1 drivers/iommu/arm-smmu-v3.c Thierry Reding 2019-12-18 2626 .put_resv_regions = generic_iommu_put_resv_regions,
f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2627 .dev_has_feat = arm_smmu_dev_has_feature,
f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2628 .dev_feat_enabled = arm_smmu_dev_feature_enabled,
f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2629 .dev_enable_feat = arm_smmu_dev_enable_feature,
f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2630 .dev_disable_feat = arm_smmu_dev_disable_feature,
32784a9562fb05 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-11-06 @2631 .sva_bind = arm_smmu_sva_bind,
32784a9562fb05 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-11-06 2632 .sva_unbind = arm_smmu_sva_unbind,
32784a9562fb05 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-11-06 2633 .sva_get_pasid = arm_smmu_sva_get_pasid,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2634 .pgsize_bitmap = -1UL, /* Restricted during device attach */
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2635 };
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2636
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v3 2/2] iommu/sva: Remove mm parameter from SVA bind API
by kernel test robot
Hi Jacob,
I love your patch! Yet something to improve:
[auto build test ERROR on e49d033bddf5b565044e2abe4241353959bc9120]
url: https://github.com/0day-ci/linux/commits/Jacob-Pan/Simplify-and-restrict-...
base: e49d033bddf5b565044e2abe4241353959bc9120
config: arm64-randconfig-r022-20210416 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/6d85fee95bdcd7e53f10442ddc71d0c31...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jacob-Pan/Simplify-and-restrict-IOMMU-SVA-APIs/20210417-052451
git checkout 6d85fee95bdcd7e53f10442ddc71d0c310d43367
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arm64
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/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2631:15: error: initialization of 'struct iommu_sva * (*)(struct device *, unsigned int)' from incompatible pointer type 'struct iommu_sva * (*)(struct device *, struct mm_struct *, unsigned int)' [-Werror=incompatible-pointer-types]
2631 | .sva_bind = arm_smmu_sva_bind,
| ^~~~~~~~~~~~~~~~~
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2631:15: note: (near initialization for 'arm_smmu_ops.sva_bind')
cc1: some warnings being treated as errors
vim +2631 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2608
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2609 static struct iommu_ops arm_smmu_ops = {
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2610 .capable = arm_smmu_capable,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2611 .domain_alloc = arm_smmu_domain_alloc,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2612 .domain_free = arm_smmu_domain_free,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2613 .attach_dev = arm_smmu_attach_dev,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2614 .map = arm_smmu_map,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2615 .unmap = arm_smmu_unmap,
07fdef34d2be68 drivers/iommu/arm-smmu-v3.c Zhen Lei 2018-09-20 2616 .flush_iotlb_all = arm_smmu_flush_iotlb_all,
32b124492bdf97 drivers/iommu/arm-smmu-v3.c Robin Murphy 2017-09-28 2617 .iotlb_sync = arm_smmu_iotlb_sync,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2618 .iova_to_phys = arm_smmu_iova_to_phys,
cefa0d55da3753 drivers/iommu/arm-smmu-v3.c Joerg Roedel 2020-04-29 2619 .probe_device = arm_smmu_probe_device,
cefa0d55da3753 drivers/iommu/arm-smmu-v3.c Joerg Roedel 2020-04-29 2620 .release_device = arm_smmu_release_device,
08d4ca2a672bab drivers/iommu/arm-smmu-v3.c Robin Murphy 2016-09-12 2621 .device_group = arm_smmu_device_group,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2622 .domain_get_attr = arm_smmu_domain_get_attr,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2623 .domain_set_attr = arm_smmu_domain_set_attr,
8f78515425daea drivers/iommu/arm-smmu-v3.c Robin Murphy 2016-09-12 2624 .of_xlate = arm_smmu_of_xlate,
50019f09a4baa0 drivers/iommu/arm-smmu-v3.c Eric Auger 2017-01-19 2625 .get_resv_regions = arm_smmu_get_resv_regions,
a66c5dc549d1e1 drivers/iommu/arm-smmu-v3.c Thierry Reding 2019-12-18 2626 .put_resv_regions = generic_iommu_put_resv_regions,
f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2627 .dev_has_feat = arm_smmu_dev_has_feature,
f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2628 .dev_feat_enabled = arm_smmu_dev_feature_enabled,
f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2629 .dev_enable_feat = arm_smmu_dev_enable_feature,
f534d98b9d2705 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-09-18 2630 .dev_disable_feat = arm_smmu_dev_disable_feature,
32784a9562fb05 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-11-06 @2631 .sva_bind = arm_smmu_sva_bind,
32784a9562fb05 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-11-06 2632 .sva_unbind = arm_smmu_sva_unbind,
32784a9562fb05 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c Jean-Philippe Brucker 2020-11-06 2633 .sva_get_pasid = arm_smmu_sva_get_pasid,
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2634 .pgsize_bitmap = -1UL, /* Restricted during device attach */
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2635 };
48ec83bcbcf509 drivers/iommu/arm-smmu-v3.c Will Deacon 2015-05-27 2636
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems
by kernel test robot
Hi "Matthew,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.12-rc7]
[cannot apply to hnaz-linux-mm/master next-20210416]
[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/Matthew-Wilcox-Oracle/Change-str...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5e46d1b78a03d52306f21f77a4e4a144b6d31486
config: parisc-randconfig-s031-20210416 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://github.com/0day-ci/linux/commit/898e155048088be20b2606575a24108ea...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Matthew-Wilcox-Oracle/Change-struct-page-layout-for-page_pool/20210417-070951
git checkout 898e155048088be20b2606575a24108eacc4c91b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from net/core/xdp.c:15:
include/net/page_pool.h: In function 'page_pool_get_dma_addr':
>> include/net/page_pool.h:203:40: warning: left shift count >= width of type [-Wshift-count-overflow]
203 | ret |= (dma_addr_t)page->dma_addr[1] << 32;
| ^~
include/net/page_pool.h: In function 'page_pool_set_dma_addr':
>> include/net/page_pool.h:211:28: warning: right shift count >= width of type [-Wshift-count-overflow]
211 | page->dma_addr[1] = addr >> 32;
| ^~
vim +203 include/net/page_pool.h
198
199 static inline dma_addr_t page_pool_get_dma_addr(struct page *page)
200 {
201 dma_addr_t ret = page->dma_addr[0];
202 if (sizeof(dma_addr_t) > sizeof(unsigned long))
> 203 ret |= (dma_addr_t)page->dma_addr[1] << 32;
204 return ret;
205 }
206
207 static inline void page_pool_set_dma_addr(struct page *page, dma_addr_t addr)
208 {
209 page->dma_addr[0] = addr;
210 if (sizeof(dma_addr_t) > sizeof(unsigned long))
> 211 page->dma_addr[1] = addr >> 32;
212 }
213
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[asoc:for-5.13 195/201] sound/soc/generic/audio-graph-card.c:548:5: warning: stack frame size of 1568 bytes in function 'audio_graph_parse_of'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.13
head: d63f2a88d5cfaad025f26e1107f3807d579654c5
commit: 343e55e71877415a23372388b3e0c59a9bba42f6 [195/201] ASoC: simple-card-utils: Increase maximum number of links to 128
config: powerpc-randconfig-r032-20210416 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/...
git remote add asoc https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
git fetch --no-tags asoc for-5.13
git checkout 343e55e71877415a23372388b3e0c59a9bba42f6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
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/generic/audio-graph-card.c:548:5: warning: stack frame size of 1568 bytes in function 'audio_graph_parse_of' [-Wframe-larger-than=]
int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev)
^
1 warning generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_SOC_MPC5200_AC97
Depends on SOUND && !UML && SND && SND_SOC && SND_POWERPC_SOC && PPC_MPC52xx && PPC_BESTCOMM
Selected by
- SND_MPC52xx_SOC_PCM030 && SOUND && !UML && SND && SND_SOC && SND_POWERPC_SOC && PPC_MPC5200_SIMPLE
WARNING: unmet direct dependencies detected for SND_SOC_WM9712
Depends on SOUND && !UML && SND && SND_SOC && (SND_SOC_AC97_BUS || AC97_BUS_NEW
Selected by
- SND_MPC52xx_SOC_PCM030 && SOUND && !UML && SND && SND_SOC && SND_POWERPC_SOC && PPC_MPC5200_SIMPLE
vim +/audio_graph_parse_of +548 sound/soc/generic/audio-graph-card.c
e9cbcf23a28b41 Kuninori Morimoto 2021-03-26 544
0f687d826736a5 Thierry Reding 2021-04-16 545 static int graph_get_dais_count(struct asoc_simple_priv *priv,
e32b100bc6ecbc Sameer Pujar 2020-11-02 546 struct link_info *li);
e32b100bc6ecbc Sameer Pujar 2020-11-02 547
6e4ea8aace0247 Sameer Pujar 2021-02-07 @548 int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev)
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 549 {
e59289cda8dec0 Kuninori Morimoto 2019-03-20 550 struct snd_soc_card *card = simple_priv_to_card(priv);
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 551 struct link_info li;
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 552 int ret;
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 553
e32b100bc6ecbc Sameer Pujar 2020-11-02 554 card->owner = THIS_MODULE;
e32b100bc6ecbc Sameer Pujar 2020-11-02 555 card->dev = dev;
e32b100bc6ecbc Sameer Pujar 2020-11-02 556
e32b100bc6ecbc Sameer Pujar 2020-11-02 557 memset(&li, 0, sizeof(li));
0f687d826736a5 Thierry Reding 2021-04-16 558 ret = graph_get_dais_count(priv, &li);
0f687d826736a5 Thierry Reding 2021-04-16 559 if (ret < 0)
0f687d826736a5 Thierry Reding 2021-04-16 560 return ret;
0f687d826736a5 Thierry Reding 2021-04-16 561
f899006d558546 Kuninori Morimoto 2021-04-12 562 if (!li.link)
e32b100bc6ecbc Sameer Pujar 2020-11-02 563 return -EINVAL;
e32b100bc6ecbc Sameer Pujar 2020-11-02 564
e32b100bc6ecbc Sameer Pujar 2020-11-02 565 ret = asoc_simple_init_priv(priv, &li);
e32b100bc6ecbc Sameer Pujar 2020-11-02 566 if (ret < 0)
e32b100bc6ecbc Sameer Pujar 2020-11-02 567 return ret;
e32b100bc6ecbc Sameer Pujar 2020-11-02 568
e32b100bc6ecbc Sameer Pujar 2020-11-02 569 priv->pa_gpio = devm_gpiod_get_optional(dev, "pa", GPIOD_OUT_LOW);
e32b100bc6ecbc Sameer Pujar 2020-11-02 570 if (IS_ERR(priv->pa_gpio)) {
e32b100bc6ecbc Sameer Pujar 2020-11-02 571 ret = PTR_ERR(priv->pa_gpio);
e32b100bc6ecbc Sameer Pujar 2020-11-02 572 dev_err(dev, "failed to get amplifier gpio: %d\n", ret);
e32b100bc6ecbc Sameer Pujar 2020-11-02 573 return ret;
e32b100bc6ecbc Sameer Pujar 2020-11-02 574 }
e32b100bc6ecbc Sameer Pujar 2020-11-02 575
ad11e59f52d6fc Kuninori Morimoto 2019-03-20 576 ret = asoc_simple_parse_widgets(card, NULL);
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 577 if (ret < 0)
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 578 return ret;
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 579
ad11e59f52d6fc Kuninori Morimoto 2019-03-20 580 ret = asoc_simple_parse_routing(card, NULL);
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 581 if (ret < 0)
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 582 return ret;
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 583
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 584 memset(&li, 0, sizeof(li));
97fe6ca4146583 Kuninori Morimoto 2018-12-20 585 ret = graph_for_each_link(priv, &li,
97fe6ca4146583 Kuninori Morimoto 2018-12-20 586 graph_dai_link_of,
97fe6ca4146583 Kuninori Morimoto 2018-12-20 587 graph_dai_link_of_dpcm);
fce9b90c1ab7e9 Kuninori Morimoto 2018-12-20 588 if (ret < 0)
e32b100bc6ecbc Sameer Pujar 2020-11-02 589 goto err;
2692c1c63c29ca Kuninori Morimoto 2017-04-20 590
e32b100bc6ecbc Sameer Pujar 2020-11-02 591 ret = asoc_simple_parse_card_name(card, NULL);
e32b100bc6ecbc Sameer Pujar 2020-11-02 592 if (ret < 0)
e32b100bc6ecbc Sameer Pujar 2020-11-02 593 goto err;
e32b100bc6ecbc Sameer Pujar 2020-11-02 594
e32b100bc6ecbc Sameer Pujar 2020-11-02 595 snd_soc_card_set_drvdata(card, priv);
e32b100bc6ecbc Sameer Pujar 2020-11-02 596
e32b100bc6ecbc Sameer Pujar 2020-11-02 597 asoc_simple_debug_info(priv);
e32b100bc6ecbc Sameer Pujar 2020-11-02 598
e32b100bc6ecbc Sameer Pujar 2020-11-02 599 ret = devm_snd_soc_register_card(dev, card);
e32b100bc6ecbc Sameer Pujar 2020-11-02 600 if (ret < 0)
e32b100bc6ecbc Sameer Pujar 2020-11-02 601 goto err;
e32b100bc6ecbc Sameer Pujar 2020-11-02 602
e32b100bc6ecbc Sameer Pujar 2020-11-02 603 return 0;
e32b100bc6ecbc Sameer Pujar 2020-11-02 604
e32b100bc6ecbc Sameer Pujar 2020-11-02 605 err:
e32b100bc6ecbc Sameer Pujar 2020-11-02 606 asoc_simple_clean_reference(card);
e32b100bc6ecbc Sameer Pujar 2020-11-02 607
e32b100bc6ecbc Sameer Pujar 2020-11-02 608 if (ret != -EPROBE_DEFER)
e32b100bc6ecbc Sameer Pujar 2020-11-02 609 dev_err(dev, "parse error %d\n", ret);
e32b100bc6ecbc Sameer Pujar 2020-11-02 610
e32b100bc6ecbc Sameer Pujar 2020-11-02 611 return ret;
2692c1c63c29ca Kuninori Morimoto 2017-04-20 612 }
6e4ea8aace0247 Sameer Pujar 2021-02-07 613 EXPORT_SYMBOL_GPL(audio_graph_parse_of);
2692c1c63c29ca Kuninori Morimoto 2017-04-20 614
:::::: The code at line 548 was first introduced by commit
:::::: 6e4ea8aace02479186b3fdaab48d7acfe06d8715 ASoC: audio-graph: Rename functions needed for export
:::::: TO: Sameer Pujar <spujar(a)nvidia.com>
:::::: CC: Mark Brown <broonie(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
hppa64-linux-ld: lib/zstd/fse_decompress.o(.text+0x347c): cannot reach _mcount
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 151501160401e2dc669ea7dac2c599b53f220c33
commit: 31e0d747708272356bee9b6a1b90c1e6525b0f6d lockdep/selftest: Unleash irq_read_recursion2 and add more
date: 8 months ago
config: parisc-randconfig-r006-20210416 (attached as .config)
compiler: hppa64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://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 31e0d747708272356bee9b6a1b90c1e6525b0f6d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=parisc
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 >>):
>> hppa64-linux-ld: lib/zstd/fse_decompress.o(.text+0x347c): cannot reach _mcount
lib/zstd/fse_decompress.o: in function `FSE_decompress_wksp':
(.text+0x347c): relocation truncated to fit: R_PARISC_PCREL22F against symbol `_mcount' defined in .text.hot section in arch/parisc/kernel/entry.o
>> hppa64-linux-ld: lib/zstd/zstd_common.o(.text+0x2c): cannot reach _mcount
lib/zstd/zstd_common.o: in function `ZSTD_stackAlloc':
(.text+0x2c): relocation truncated to fit: R_PARISC_PCREL22F against symbol `_mcount' defined in .text.hot section in arch/parisc/kernel/entry.o
hppa64-linux-ld: lib/zstd/zstd_common.o(.text+0x8c): cannot reach _mcount
lib/zstd/zstd_common.o: in function `ZSTD_stackFree':
(.text+0x8c): relocation truncated to fit: R_PARISC_PCREL22F against symbol `_mcount' defined in .text.hot section in arch/parisc/kernel/entry.o
hppa64-linux-ld: lib/zstd/zstd_common.o(.text+0xe0): cannot reach _mcount
lib/zstd/zstd_common.o: in function `ZSTD_initStack':
(.text+0xe0): relocation truncated to fit: R_PARISC_PCREL22F against symbol `_mcount' defined in .text.hot section in arch/parisc/kernel/entry.o
hppa64-linux-ld: lib/zstd/zstd_common.o(.text+0x1c4): cannot reach _mcount
lib/zstd/zstd_common.o: in function `ZSTD_stackAllocAll':
(.text+0x1c4): relocation truncated to fit: R_PARISC_PCREL22F against symbol `_mcount' defined in .text.hot section in arch/parisc/kernel/entry.o
hppa64-linux-ld: lib/zstd/zstd_common.o(.text+0x25c): cannot reach _mcount
lib/zstd/zstd_common.o: in function `ZSTD_malloc':
(.text+0x25c): relocation truncated to fit: R_PARISC_PCREL22F against symbol `_mcount' defined in .text.hot section in arch/parisc/kernel/entry.o
hppa64-linux-ld: lib/zstd/zstd_common.o(.text+0x2dc): cannot reach _mcount
lib/zstd/zstd_common.o: in function `ZSTD_free':
(.text+0x2dc): relocation truncated to fit: R_PARISC_PCREL22F against symbol `_mcount' defined in .text.hot section in arch/parisc/kernel/entry.o
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[linux-next:master 12579/13394] drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:389 sdma_v5_2_ring_emit_mem_sync() warn: inconsistent indenting
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 18250b538735142307082e4e99e3ae5c12d44013
commit: b45fdeab45bc42c2cd2dfbb3d11a3dd797907af6 [12579/13394] drm/amdgpu: Add graphics cache rinse packet for sdma
config: i386-randconfig-m021-20210416 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:389 sdma_v5_2_ring_emit_mem_sync() warn: inconsistent indenting
vim +389 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
371
372 /**
373 * sdma_v5_2_ring_emit_mem_sync - flush the IB by graphics cache rinse
374 *
375 * @ring: amdgpu ring pointer
376 * @job: job to retrieve vmid from
377 * @ib: IB object to schedule
378 *
379 * flush the IB by graphics cache rinse.
380 */
381 static void sdma_v5_2_ring_emit_mem_sync(struct amdgpu_ring *ring)
382 {
383 uint32_t gcr_cntl =
384 SDMA_GCR_GL2_INV | SDMA_GCR_GL2_WB | SDMA_GCR_GLM_INV |
385 SDMA_GCR_GL1_INV | SDMA_GCR_GLV_INV | SDMA_GCR_GLK_INV |
386 SDMA_GCR_GLI_INV(1);
387
388 /* flush entire cache L0/L1/L2, this can be optimized by performance requirement */
> 389 amdgpu_ring_write(ring, SDMA_PKT_HEADER_OP(SDMA_OP_GCR_REQ));
390 amdgpu_ring_write(ring, SDMA_PKT_GCR_REQ_PAYLOAD1_BASE_VA_31_7(0));
391 amdgpu_ring_write(ring, SDMA_PKT_GCR_REQ_PAYLOAD2_GCR_CONTROL_15_0(gcr_cntl) |
392 SDMA_PKT_GCR_REQ_PAYLOAD2_BASE_VA_47_32(0));
393 amdgpu_ring_write(ring, SDMA_PKT_GCR_REQ_PAYLOAD3_LIMIT_VA_31_7(0) |
394 SDMA_PKT_GCR_REQ_PAYLOAD3_GCR_CONTROL_18_16(gcr_cntl >> 16));
395 amdgpu_ring_write(ring, SDMA_PKT_GCR_REQ_PAYLOAD4_LIMIT_VA_47_32(0) |
396 SDMA_PKT_GCR_REQ_PAYLOAD4_VMID(0));
397 }
398
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[android-common:android-5.4-stable 1/3] drivers/mmc/core/crypto.c:14:6: warning: no previous prototype for 'mmc_crypto_setup_queue'
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-5.4-stable
head: 2c6b2164e6aaab792c736a502298203240361653
commit: 555cf12eb672727979bc7b7840c7503f3de27220 [1/3] ANDROID: mmc: MMC crypto API
config: arm-randconfig-r031-20210416 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-5.4-stable
git checkout 555cf12eb672727979bc7b7840c7503f3de27220
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 warnings (new ones prefixed by >>):
>> drivers/mmc/core/crypto.c:14:6: warning: no previous prototype for 'mmc_crypto_setup_queue' [-Wmissing-prototypes]
14 | void mmc_crypto_setup_queue(struct mmc_host *host, struct request_queue *q)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/mmc/core/crypto.c:21:6: warning: no previous prototype for 'mmc_crypto_free_host' [-Wmissing-prototypes]
21 | void mmc_crypto_free_host(struct mmc_host *host)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/mmc/core/crypto.c:26:6: warning: no previous prototype for 'mmc_crypto_prepare_req' [-Wmissing-prototypes]
26 | void mmc_crypto_prepare_req(struct mmc_queue_req *mqrq)
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/mmc_crypto_setup_queue +14 drivers/mmc/core/crypto.c
13
> 14 void mmc_crypto_setup_queue(struct mmc_host *host, struct request_queue *q)
15 {
16 if (host->caps2 & MMC_CAP2_CRYPTO)
17 q->ksm = host->ksm;
18 }
19 EXPORT_SYMBOL_GPL(mmc_crypto_setup_queue);
20
> 21 void mmc_crypto_free_host(struct mmc_host *host)
22 {
23 keyslot_manager_destroy(host->ksm);
24 }
25
> 26 void mmc_crypto_prepare_req(struct mmc_queue_req *mqrq)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[cgroup:for-next 1/5] kernel/cgroup/misc.c:61 valid_type() warn: unsigned 'type' is never less than zero.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
head: d95af61df072a7d70b311a11c0c24cf7d8ccebd9
commit: a72232eabdfcfe365a05a3eb392288b78d25a5ca [1/5] cgroup: Add misc cgroup controller
config: parisc-randconfig-m031-20210413 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
kernel/cgroup/misc.c:61 valid_type() warn: unsigned 'type' is never less than zero.
kernel/cgroup/misc.c:210 misc_cg_max_show() warn: we never enter this loop
kernel/cgroup/misc.c:257 misc_cg_max_write() warn: we never enter this loop
kernel/cgroup/misc.c:299 misc_cg_current_show() warn: we never enter this loop
kernel/cgroup/misc.c:323 misc_cg_capacity_show() warn: we never enter this loop
kernel/cgroup/misc.c:376 misc_cg_alloc() warn: we never enter this loop
kernel/cgroup/misc.c:376 misc_cg_alloc() warn: unsigned 'i' is never less than zero.
kernel/cgroup/misc.c:376 misc_cg_alloc() warn: unsigned 'i' is never less than zero.
vim +/type +61 kernel/cgroup/misc.c
49
50 /**
51 * valid_type() - Check if @type is valid or not.
52 * @type: misc res type.
53 *
54 * Context: Any context.
55 * Return:
56 * * true - If valid type.
57 * * false - If not valid type.
58 */
59 static inline bool valid_type(enum misc_res_type type)
60 {
> 61 return type >= 0 && type < MISC_CG_RES_TYPES;
62 }
63
64 /**
65 * misc_cg_res_total_usage() - Get the current total usage of the resource.
66 * @type: misc res type.
67 *
68 * Context: Any context.
69 * Return: Current total usage of the resource.
70 */
71 unsigned long misc_cg_res_total_usage(enum misc_res_type type)
72 {
73 if (valid_type(type))
74 return atomic_long_read(&root_cg.res[type].usage);
75
76 return 0;
77 }
78 EXPORT_SYMBOL_GPL(misc_cg_res_total_usage);
79
80 /**
81 * misc_cg_set_capacity() - Set the capacity of the misc cgroup res.
82 * @type: Type of the misc res.
83 * @capacity: Supported capacity of the misc res on the host.
84 *
85 * If capacity is 0 then the charging a misc cgroup fails for that type.
86 *
87 * Context: Any context.
88 * Return:
89 * * %0 - Successfully registered the capacity.
90 * * %-EINVAL - If @type is invalid.
91 */
92 int misc_cg_set_capacity(enum misc_res_type type, unsigned long capacity)
93 {
94 if (!valid_type(type))
95 return -EINVAL;
96
97 WRITE_ONCE(misc_res_capacity[type], capacity);
98 return 0;
99 }
100 EXPORT_SYMBOL_GPL(misc_cg_set_capacity);
101
102 /**
103 * misc_cg_cancel_charge() - Cancel the charge from the misc cgroup.
104 * @type: Misc res type in misc cg to cancel the charge from.
105 * @cg: Misc cgroup to cancel charge from.
106 * @amount: Amount to cancel.
107 *
108 * Context: Any context.
109 */
110 static void misc_cg_cancel_charge(enum misc_res_type type, struct misc_cg *cg,
111 unsigned long amount)
112 {
113 WARN_ONCE(atomic_long_add_negative(-amount, &cg->res[type].usage),
114 "misc cgroup resource %s became less than 0",
115 misc_res_name[type]);
116 }
117
118 /**
119 * misc_cg_try_charge() - Try charging the misc cgroup.
120 * @type: Misc res type to charge.
121 * @cg: Misc cgroup which will be charged.
122 * @amount: Amount to charge.
123 *
124 * Charge @amount to the misc cgroup. Caller must use the same cgroup during
125 * the uncharge call.
126 *
127 * Context: Any context.
128 * Return:
129 * * %0 - If successfully charged.
130 * * -EINVAL - If @type is invalid or misc res has 0 capacity.
131 * * -EBUSY - If max limit will be crossed or total usage will be more than the
132 * capacity.
133 */
134 int misc_cg_try_charge(enum misc_res_type type, struct misc_cg *cg,
135 unsigned long amount)
136 {
137 struct misc_cg *i, *j;
138 int ret;
139 struct misc_res *res;
140 int new_usage;
141
142 if (!(valid_type(type) && cg && READ_ONCE(misc_res_capacity[type])))
143 return -EINVAL;
144
145 if (!amount)
146 return 0;
147
148 for (i = cg; i; i = parent_misc(i)) {
149 res = &i->res[type];
150
151 new_usage = atomic_long_add_return(amount, &res->usage);
152 if (new_usage > READ_ONCE(res->max) ||
153 new_usage > READ_ONCE(misc_res_capacity[type])) {
154 if (!res->failed) {
155 pr_info("cgroup: charge rejected by the misc controller for %s resource in ",
156 misc_res_name[type]);
157 pr_cont_cgroup_path(i->css.cgroup);
158 pr_cont("\n");
159 res->failed = true;
160 }
161 ret = -EBUSY;
162 goto err_charge;
163 }
164 }
165 return 0;
166
167 err_charge:
168 for (j = cg; j != i; j = parent_misc(j))
169 misc_cg_cancel_charge(type, j, amount);
170 misc_cg_cancel_charge(type, i, amount);
171 return ret;
172 }
173 EXPORT_SYMBOL_GPL(misc_cg_try_charge);
174
175 /**
176 * misc_cg_uncharge() - Uncharge the misc cgroup.
177 * @type: Misc res type which was charged.
178 * @cg: Misc cgroup which will be uncharged.
179 * @amount: Charged amount.
180 *
181 * Context: Any context.
182 */
183 void misc_cg_uncharge(enum misc_res_type type, struct misc_cg *cg,
184 unsigned long amount)
185 {
186 struct misc_cg *i;
187
188 if (!(amount && valid_type(type) && cg))
189 return;
190
191 for (i = cg; i; i = parent_misc(i))
192 misc_cg_cancel_charge(type, i, amount);
193 }
194 EXPORT_SYMBOL_GPL(misc_cg_uncharge);
195
196 /**
197 * misc_cg_max_show() - Show the misc cgroup max limit.
198 * @sf: Interface file
199 * @v: Arguments passed
200 *
201 * Context: Any context.
202 * Return: 0 to denote successful print.
203 */
204 static int misc_cg_max_show(struct seq_file *sf, void *v)
205 {
206 int i;
207 struct misc_cg *cg = css_misc(seq_css(sf));
208 unsigned long max;
209
> 210 for (i = 0; i < MISC_CG_RES_TYPES; i++) {
211 if (READ_ONCE(misc_res_capacity[i])) {
212 max = READ_ONCE(cg->res[i].max);
213 if (max == MAX_NUM)
214 seq_printf(sf, "%s max\n", misc_res_name[i]);
215 else
216 seq_printf(sf, "%s %lu\n", misc_res_name[i],
217 max);
218 }
219 }
220
221 return 0;
222 }
223
224 /**
225 * misc_cg_max_write() - Update the maximum limit of the cgroup.
226 * @of: Handler for the file.
227 * @buf: Data from the user. It should be either "max", 0, or a positive
228 * integer.
229 * @nbytes: Number of bytes of the data.
230 * @off: Offset in the file.
231 *
232 * User can pass data like:
233 * echo sev 23 > misc.max, OR
234 * echo sev max > misc.max
235 *
236 * Context: Any context.
237 * Return:
238 * * >= 0 - Number of bytes processed in the input.
239 * * -EINVAL - If buf is not valid.
240 * * -ERANGE - If number is bigger than the unsigned long capacity.
241 */
242 static ssize_t misc_cg_max_write(struct kernfs_open_file *of, char *buf,
243 size_t nbytes, loff_t off)
244 {
245 struct misc_cg *cg;
246 unsigned long max;
247 int ret = 0, i;
248 enum misc_res_type type = MISC_CG_RES_TYPES;
249 char *token;
250
251 buf = strstrip(buf);
252 token = strsep(&buf, " ");
253
254 if (!token || !buf)
255 return -EINVAL;
256
> 257 for (i = 0; i < MISC_CG_RES_TYPES; i++) {
258 if (!strcmp(misc_res_name[i], token)) {
259 type = i;
260 break;
261 }
262 }
263
264 if (type == MISC_CG_RES_TYPES)
265 return -EINVAL;
266
267 if (!strcmp(MAX_STR, buf)) {
268 max = MAX_NUM;
269 } else {
270 ret = kstrtoul(buf, 0, &max);
271 if (ret)
272 return ret;
273 }
274
275 cg = css_misc(of_css(of));
276
277 if (READ_ONCE(misc_res_capacity[type]))
278 WRITE_ONCE(cg->res[type].max, max);
279 else
280 ret = -EINVAL;
281
282 return ret ? ret : nbytes;
283 }
284
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months