Re: [PATCH 1/1] virtio: disable partitions scanning for no partitions block
by kernel test robot
Hi Yury,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on block/for-next]
[also build test ERROR on vhost/linux-next hch-configfs/for-next linus/master v5.14-rc1 next-20210715]
[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/Yury-Kamenev/virtio-disable-part...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 10.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/b5b35e33f22266b3905186a005992d54a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yury-Kamenev/virtio-disable-partitions-scanning-for-no-partitions-block/20210715-175107
git checkout b5b35e33f22266b3905186a005992d54ae71e51b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/block/
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 >>):
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from drivers/block/virtio_blk.c:3:
drivers/block/virtio_blk.c: In function 'virtblk_probe':
>> drivers/block/virtio_blk.c:807:15: error: 'partitions_scanning_disable' undeclared (first use in this function)
807 | if (unlikely(partitions_scanning_disable))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
drivers/block/virtio_blk.c:807:15: note: each undeclared identifier is reported only once for each function it appears in
807 | if (unlikely(partitions_scanning_disable))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
vim +/partitions_scanning_disable +807 drivers/block/virtio_blk.c
707
708 static int virtblk_probe(struct virtio_device *vdev)
709 {
710 struct virtio_blk *vblk;
711 struct request_queue *q;
712 int err, index;
713
714 u32 v, blk_size, max_size, sg_elems, opt_io_size;
715 u16 min_io_size;
716 u8 physical_block_exp, alignment_offset;
717 unsigned int queue_depth;
718
719 if (!vdev->config->get) {
720 dev_err(&vdev->dev, "%s failure: config access disabled\n",
721 __func__);
722 return -EINVAL;
723 }
724
725 err = ida_simple_get(&vd_index_ida, 0, minor_to_index(1 << MINORBITS),
726 GFP_KERNEL);
727 if (err < 0)
728 goto out;
729 index = err;
730
731 /* We need to know how many segments before we allocate. */
732 err = virtio_cread_feature(vdev, VIRTIO_BLK_F_SEG_MAX,
733 struct virtio_blk_config, seg_max,
734 &sg_elems);
735
736 /* We need at least one SG element, whatever they say. */
737 if (err || !sg_elems)
738 sg_elems = 1;
739
740 /* Prevent integer overflows and honor max vq size */
741 sg_elems = min_t(u32, sg_elems, VIRTIO_BLK_MAX_SG_ELEMS - 2);
742
743 /* We need extra sg elements at head and tail. */
744 sg_elems += 2;
745 vdev->priv = vblk = kmalloc(sizeof(*vblk), GFP_KERNEL);
746 if (!vblk) {
747 err = -ENOMEM;
748 goto out_free_index;
749 }
750
751 /* This reference is dropped in virtblk_remove(). */
752 refcount_set(&vblk->refs, 1);
753 mutex_init(&vblk->vdev_mutex);
754
755 vblk->vdev = vdev;
756 vblk->sg_elems = sg_elems;
757
758 INIT_WORK(&vblk->config_work, virtblk_config_changed_work);
759
760 err = init_vq(vblk);
761 if (err)
762 goto out_free_vblk;
763
764 /* Default queue sizing is to fill the ring. */
765 if (likely(!virtblk_queue_depth)) {
766 queue_depth = vblk->vqs[0].vq->num_free;
767 /* ... but without indirect descs, we use 2 descs per req */
768 if (!virtio_has_feature(vdev, VIRTIO_RING_F_INDIRECT_DESC))
769 queue_depth /= 2;
770 } else {
771 queue_depth = virtblk_queue_depth;
772 }
773
774 memset(&vblk->tag_set, 0, sizeof(vblk->tag_set));
775 vblk->tag_set.ops = &virtio_mq_ops;
776 vblk->tag_set.queue_depth = queue_depth;
777 vblk->tag_set.numa_node = NUMA_NO_NODE;
778 vblk->tag_set.flags = BLK_MQ_F_SHOULD_MERGE;
779 vblk->tag_set.cmd_size =
780 sizeof(struct virtblk_req) +
781 sizeof(struct scatterlist) * sg_elems;
782 vblk->tag_set.driver_data = vblk;
783 vblk->tag_set.nr_hw_queues = vblk->num_vqs;
784
785 err = blk_mq_alloc_tag_set(&vblk->tag_set);
786 if (err)
787 goto out_free_vq;
788
789 vblk->disk = blk_mq_alloc_disk(&vblk->tag_set, vblk);
790 if (IS_ERR(vblk->disk)) {
791 err = PTR_ERR(vblk->disk);
792 goto out_free_tags;
793 }
794 q = vblk->disk->queue;
795
796 virtblk_name_format("vd", index, vblk->disk->disk_name, DISK_NAME_LEN);
797
798 vblk->disk->major = major;
799 vblk->disk->first_minor = index_to_minor(index);
800 vblk->disk->minors = 1 << PART_BITS;
801 vblk->disk->private_data = vblk;
802 vblk->disk->fops = &virtblk_fops;
803 vblk->disk->flags |= GENHD_FL_EXT_DEVT;
804 vblk->index = index;
805
806 #ifdef CONFIG_VIRTIO_BLK_NO_PART_SCAN
> 807 if (unlikely(partitions_scanning_disable))
808 /* disable partitions scanning if it was stated in virtio features*/
809 if (virtio_has_feature(vdev, VIRTIO_BLK_F_NO_PART_SCAN))
810 vblk->disk->flags |= GENHD_FL_NO_PART_SCAN;
811 #endif
812
813 /* configure queue flush support */
814 virtblk_update_cache_mode(vdev);
815
816 /* If disk is read-only in the host, the guest should obey */
817 if (virtio_has_feature(vdev, VIRTIO_BLK_F_RO))
818 set_disk_ro(vblk->disk, 1);
819
820 /* We can handle whatever the host told us to handle. */
821 blk_queue_max_segments(q, vblk->sg_elems-2);
822
823 /* No real sector limit. */
824 blk_queue_max_hw_sectors(q, -1U);
825
826 max_size = virtio_max_dma_size(vdev);
827
828 /* Host can optionally specify maximum segment size and number of
829 * segments. */
830 err = virtio_cread_feature(vdev, VIRTIO_BLK_F_SIZE_MAX,
831 struct virtio_blk_config, size_max, &v);
832 if (!err)
833 max_size = min(max_size, v);
834
835 blk_queue_max_segment_size(q, max_size);
836
837 /* Host can optionally specify the block size of the device */
838 err = virtio_cread_feature(vdev, VIRTIO_BLK_F_BLK_SIZE,
839 struct virtio_blk_config, blk_size,
840 &blk_size);
841 if (!err)
842 blk_queue_logical_block_size(q, blk_size);
843 else
844 blk_size = queue_logical_block_size(q);
845
846 /* Use topology information if available */
847 err = virtio_cread_feature(vdev, VIRTIO_BLK_F_TOPOLOGY,
848 struct virtio_blk_config, physical_block_exp,
849 &physical_block_exp);
850 if (!err && physical_block_exp)
851 blk_queue_physical_block_size(q,
852 blk_size * (1 << physical_block_exp));
853
854 err = virtio_cread_feature(vdev, VIRTIO_BLK_F_TOPOLOGY,
855 struct virtio_blk_config, alignment_offset,
856 &alignment_offset);
857 if (!err && alignment_offset)
858 blk_queue_alignment_offset(q, blk_size * alignment_offset);
859
860 err = virtio_cread_feature(vdev, VIRTIO_BLK_F_TOPOLOGY,
861 struct virtio_blk_config, min_io_size,
862 &min_io_size);
863 if (!err && min_io_size)
864 blk_queue_io_min(q, blk_size * min_io_size);
865
866 err = virtio_cread_feature(vdev, VIRTIO_BLK_F_TOPOLOGY,
867 struct virtio_blk_config, opt_io_size,
868 &opt_io_size);
869 if (!err && opt_io_size)
870 blk_queue_io_opt(q, blk_size * opt_io_size);
871
872 if (virtio_has_feature(vdev, VIRTIO_BLK_F_DISCARD)) {
873 q->limits.discard_granularity = blk_size;
874
875 virtio_cread(vdev, struct virtio_blk_config,
876 discard_sector_alignment, &v);
877 q->limits.discard_alignment = v ? v << SECTOR_SHIFT : 0;
878
879 virtio_cread(vdev, struct virtio_blk_config,
880 max_discard_sectors, &v);
881 blk_queue_max_discard_sectors(q, v ? v : UINT_MAX);
882
883 virtio_cread(vdev, struct virtio_blk_config, max_discard_seg,
884 &v);
885 blk_queue_max_discard_segments(q,
886 min_not_zero(v,
887 MAX_DISCARD_SEGMENTS));
888
889 blk_queue_flag_set(QUEUE_FLAG_DISCARD, q);
890 }
891
892 if (virtio_has_feature(vdev, VIRTIO_BLK_F_WRITE_ZEROES)) {
893 virtio_cread(vdev, struct virtio_blk_config,
894 max_write_zeroes_sectors, &v);
895 blk_queue_max_write_zeroes_sectors(q, v ? v : UINT_MAX);
896 }
897
898 virtblk_update_capacity(vblk, false);
899 virtio_device_ready(vdev);
900
901 device_add_disk(&vdev->dev, vblk->disk, virtblk_attr_groups);
902 return 0;
903
904 out_free_tags:
905 blk_mq_free_tag_set(&vblk->tag_set);
906 out_free_vq:
907 vdev->config->del_vqs(vdev);
908 kfree(vblk->vqs);
909 out_free_vblk:
910 kfree(vblk);
911 out_free_index:
912 ida_simple_remove(&vd_index_ida, index);
913 out:
914 return err;
915 }
916
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [RFC 05/12] scsi/sd: add error handling support for add_disk()
by kernel test robot
Hi Luis,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on block/for-next]
[also build test ERROR on mkp-scsi/for-next scsi/for-next v5.14-rc1 next-20210715]
[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/Luis-Chamberlain/block-add_disk-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: nds32-randconfig-r036-20210715 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 10.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/c1a87f26cc4c93ee87a100d4ed4103489...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luis-Chamberlain/block-add_disk-driver-conversions-__register_blkdev/20210716-050317
git checkout c1a87f26cc4c93ee87a100d4ed4103489f9e8e2d
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash drivers/md/ drivers/scsi/
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/scsi/sd.c: In function 'sd_probe':
>> drivers/scsi/sd.c:3489:8: error: void value not ignored as it ought to be
3489 | error = device_add_disk(dev, gd, NULL);
| ^
vim +3489 drivers/scsi/sd.c
3362
3363 /**
3364 * sd_probe - called during driver initialization and whenever a
3365 * new scsi device is attached to the system. It is called once
3366 * for each scsi device (not just disks) present.
3367 * @dev: pointer to device object
3368 *
3369 * Returns 0 if successful (or not interested in this scsi device
3370 * (e.g. scanner)); 1 when there is an error.
3371 *
3372 * Note: this function is invoked from the scsi mid-level.
3373 * This function sets up the mapping between a given
3374 * <host,channel,id,lun> (found in sdp) and new device name
3375 * (e.g. /dev/sda). More precisely it is the block device major
3376 * and minor number that is chosen here.
3377 *
3378 * Assume sd_probe is not re-entrant (for time being)
3379 * Also think about sd_probe() and sd_remove() running coincidentally.
3380 **/
3381 static int sd_probe(struct device *dev)
3382 {
3383 struct scsi_device *sdp = to_scsi_device(dev);
3384 struct scsi_disk *sdkp;
3385 struct gendisk *gd;
3386 int index;
3387 int error;
3388
3389 scsi_autopm_get_device(sdp);
3390 error = -ENODEV;
3391 if (sdp->type != TYPE_DISK &&
3392 sdp->type != TYPE_ZBC &&
3393 sdp->type != TYPE_MOD &&
3394 sdp->type != TYPE_RBC)
3395 goto out;
3396
3397 if (!IS_ENABLED(CONFIG_BLK_DEV_ZONED) && sdp->type == TYPE_ZBC) {
3398 sdev_printk(KERN_WARNING, sdp,
3399 "Unsupported ZBC host-managed device.\n");
3400 goto out;
3401 }
3402
3403 SCSI_LOG_HLQUEUE(3, sdev_printk(KERN_INFO, sdp,
3404 "sd_probe\n"));
3405
3406 error = -ENOMEM;
3407 sdkp = kzalloc(sizeof(*sdkp), GFP_KERNEL);
3408 if (!sdkp)
3409 goto out;
3410
3411 gd = alloc_disk(SD_MINORS);
3412 if (!gd)
3413 goto out_free;
3414
3415 index = ida_alloc(&sd_index_ida, GFP_KERNEL);
3416 if (index < 0) {
3417 sdev_printk(KERN_WARNING, sdp, "sd_probe: memory exhausted.\n");
3418 goto out_put;
3419 }
3420
3421 error = sd_format_disk_name("sd", index, gd->disk_name, DISK_NAME_LEN);
3422 if (error) {
3423 sdev_printk(KERN_WARNING, sdp, "SCSI disk (sd) name length exceeded.\n");
3424 goto out_free_index;
3425 }
3426
3427 sdkp->device = sdp;
3428 sdkp->driver = &sd_template;
3429 sdkp->disk = gd;
3430 sdkp->index = index;
3431 sdkp->max_retries = SD_MAX_RETRIES;
3432 atomic_set(&sdkp->openers, 0);
3433 atomic_set(&sdkp->device->ioerr_cnt, 0);
3434
3435 if (!sdp->request_queue->rq_timeout) {
3436 if (sdp->type != TYPE_MOD)
3437 blk_queue_rq_timeout(sdp->request_queue, SD_TIMEOUT);
3438 else
3439 blk_queue_rq_timeout(sdp->request_queue,
3440 SD_MOD_TIMEOUT);
3441 }
3442
3443 device_initialize(&sdkp->dev);
3444 sdkp->dev.parent = dev;
3445 sdkp->dev.class = &sd_disk_class;
3446 dev_set_name(&sdkp->dev, "%s", dev_name(dev));
3447
3448 error = device_add(&sdkp->dev);
3449 if (error)
3450 goto out_free_index;
3451
3452 get_device(dev);
3453 dev_set_drvdata(dev, sdkp);
3454
3455 gd->major = sd_major((index & 0xf0) >> 4);
3456 gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00);
3457
3458 gd->fops = &sd_fops;
3459 gd->private_data = &sdkp->driver;
3460 gd->queue = sdkp->device->request_queue;
3461
3462 /* defaults, until the device tells us otherwise */
3463 sdp->sector_size = 512;
3464 sdkp->capacity = 0;
3465 sdkp->media_present = 1;
3466 sdkp->write_prot = 0;
3467 sdkp->cache_override = 0;
3468 sdkp->WCE = 0;
3469 sdkp->RCD = 0;
3470 sdkp->ATO = 0;
3471 sdkp->first_scan = 1;
3472 sdkp->max_medium_access_timeouts = SD_MAX_MEDIUM_TIMEOUTS;
3473
3474 sd_revalidate_disk(gd);
3475
3476 gd->flags = GENHD_FL_EXT_DEVT;
3477 if (sdp->removable) {
3478 gd->flags |= GENHD_FL_REMOVABLE;
3479 gd->events |= DISK_EVENT_MEDIA_CHANGE;
3480 gd->event_flags = DISK_EVENT_FLAG_POLL | DISK_EVENT_FLAG_UEVENT;
3481 }
3482
3483 blk_pm_runtime_init(sdp->request_queue, dev);
3484 if (sdp->rpm_autosuspend) {
3485 pm_runtime_set_autosuspend_delay(dev,
3486 sdp->host->hostt->rpm_autosuspend_delay);
3487 }
3488
> 3489 error = device_add_disk(dev, gd, NULL);
3490 if (error)
3491 goto out_free_index;
3492
3493 if (sdkp->capacity)
3494 sd_dif_config_host(sdkp);
3495
3496 sd_revalidate_disk(gd);
3497
3498 if (sdkp->security) {
3499 sdkp->opal_dev = init_opal_dev(sdkp, &sd_sec_submit);
3500 if (sdkp->opal_dev)
3501 sd_printk(KERN_NOTICE, sdkp, "supports TCG Opal\n");
3502 }
3503
3504 sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n",
3505 sdp->removable ? "removable " : "");
3506 scsi_autopm_put_device(sdp);
3507
3508 return 0;
3509
3510 out_free_index:
3511 ida_free(&sd_index_ida, index);
3512 out_put:
3513 blk_cleanup_disk(gd);
3514 out_free:
3515 sd_zbc_release_disk(sdkp);
3516 kfree(sdkp);
3517 out:
3518 scsi_autopm_put_device(sdp);
3519 return error;
3520 }
3521
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH 2/5] drm/gem: Provide drm_gem_fb_{vmap,vunmap}()
by kernel test robot
Hi Thomas,
I love your patch! Yet something to improve:
[auto build test ERROR on 4d00e2309398147acdbfefbe1deb4b0e78868466]
url: https://github.com/0day-ci/linux/commits/Thomas-Zimmermann/drm-Provide-fr...
base: 4d00e2309398147acdbfefbe1deb4b0e78868466
config: arm64-randconfig-r035-20210715 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0e49c54a8cbd3e779e5526a5888c683c01cc3c50)
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/8a0708f4cf232e7fbc4eb6f58cf782200...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Zimmermann/drm-Provide-framebuffer-vmap-helpers/20210716-020508
git checkout 8a0708f4cf232e7fbc4eb6f58cf782200be8912e
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/gpu/drm/
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 >>):
In file included from drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c:11:
>> include/drm/drm_gem_framebuffer_helper.h:39:72: error: use of undeclared identifier 'DRM_FORMAT_MAX_PLANES'
int drm_gem_fb_vmap(struct drm_framebuffer *fb, struct dma_buf_map map[DRM_FORMAT_MAX_PLANES]);
^
include/drm/drm_gem_framebuffer_helper.h:40:75: error: use of undeclared identifier 'DRM_FORMAT_MAX_PLANES'
void drm_gem_fb_vunmap(struct drm_framebuffer *fb, struct dma_buf_map map[DRM_FORMAT_MAX_PLANES]);
^
2 errors generated.
vim +/DRM_FORMAT_MAX_PLANES +39 include/drm/drm_gem_framebuffer_helper.h
16
17 struct drm_gem_object *drm_gem_fb_get_obj(struct drm_framebuffer *fb,
18 unsigned int plane);
19 void drm_gem_fb_destroy(struct drm_framebuffer *fb);
20 int drm_gem_fb_create_handle(struct drm_framebuffer *fb, struct drm_file *file,
21 unsigned int *handle);
22
23 int drm_gem_fb_init_with_funcs(struct drm_device *dev,
24 struct drm_framebuffer *fb,
25 struct drm_file *file,
26 const struct drm_mode_fb_cmd2 *mode_cmd,
27 const struct drm_framebuffer_funcs *funcs);
28 struct drm_framebuffer *
29 drm_gem_fb_create_with_funcs(struct drm_device *dev, struct drm_file *file,
30 const struct drm_mode_fb_cmd2 *mode_cmd,
31 const struct drm_framebuffer_funcs *funcs);
32 struct drm_framebuffer *
33 drm_gem_fb_create(struct drm_device *dev, struct drm_file *file,
34 const struct drm_mode_fb_cmd2 *mode_cmd);
35 struct drm_framebuffer *
36 drm_gem_fb_create_with_dirty(struct drm_device *dev, struct drm_file *file,
37 const struct drm_mode_fb_cmd2 *mode_cmd);
38
> 39 int drm_gem_fb_vmap(struct drm_framebuffer *fb, struct dma_buf_map map[DRM_FORMAT_MAX_PLANES]);
40 void drm_gem_fb_vunmap(struct drm_framebuffer *fb, struct dma_buf_map map[DRM_FORMAT_MAX_PLANES]);
41
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH 1/3] loop: add error handling support for add_disk()
by kernel test robot
Hi Luis,
I love your patch! Yet something to improve:
[auto build test ERROR on block/for-next]
[also build test ERROR on v5.14-rc1 next-20210715]
[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/Luis-Chamberlain/block-simple-ad...
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
config: h8300-randconfig-r032-20210715 (attached as .config)
compiler: h8300-linux-gcc (GCC) 10.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/bc7835fa74d828de37e4f8a676d8dd451...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luis-Chamberlain/block-simple-add_disk-driver-conversions/20210716-035618
git checkout bc7835fa74d828de37e4f8a676d8dd45160299db
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/block/
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 >>):
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/block/loop.c:52:
include/linux/scatterlist.h: In function 'sg_set_buf':
include/asm-generic/page.h:89:50: warning: ordered comparison of pointer with null pointer [-Wextra]
89 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:137:2: note: in expansion of macro 'BUG_ON'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:137:10: note: in expansion of macro 'virt_addr_valid'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/block/loop.c: In function 'loop_add':
>> drivers/block/loop.c:2330:6: error: void value not ignored as it ought to be
2330 | err = add_disk(disk);
| ^
vim +2330 drivers/block/loop.c
2237
2238 static int loop_add(int i)
2239 {
2240 struct loop_device *lo;
2241 struct gendisk *disk;
2242 int err;
2243
2244 err = -ENOMEM;
2245 lo = kzalloc(sizeof(*lo), GFP_KERNEL);
2246 if (!lo)
2247 goto out;
2248 lo->lo_state = Lo_unbound;
2249
2250 err = mutex_lock_killable(&loop_ctl_mutex);
2251 if (err)
2252 goto out_free_dev;
2253
2254 /* allocate id, if @id >= 0, we're requesting that specific id */
2255 if (i >= 0) {
2256 err = idr_alloc(&loop_index_idr, lo, i, i + 1, GFP_KERNEL);
2257 if (err == -ENOSPC)
2258 err = -EEXIST;
2259 } else {
2260 err = idr_alloc(&loop_index_idr, lo, 0, 0, GFP_KERNEL);
2261 }
2262 if (err < 0)
2263 goto out_unlock;
2264 i = err;
2265
2266 err = -ENOMEM;
2267 lo->tag_set.ops = &loop_mq_ops;
2268 lo->tag_set.nr_hw_queues = 1;
2269 lo->tag_set.queue_depth = 128;
2270 lo->tag_set.numa_node = NUMA_NO_NODE;
2271 lo->tag_set.cmd_size = sizeof(struct loop_cmd);
2272 lo->tag_set.flags = BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_STACKING;
2273 lo->tag_set.driver_data = lo;
2274
2275 err = blk_mq_alloc_tag_set(&lo->tag_set);
2276 if (err)
2277 goto out_free_idr;
2278
2279 disk = lo->lo_disk = blk_mq_alloc_disk(&lo->tag_set, lo);
2280 if (IS_ERR(disk)) {
2281 err = PTR_ERR(disk);
2282 goto out_cleanup_tags;
2283 }
2284 lo->lo_queue = lo->lo_disk->queue;
2285
2286 blk_queue_max_hw_sectors(lo->lo_queue, BLK_DEF_MAX_SECTORS);
2287
2288 /*
2289 * By default, we do buffer IO, so it doesn't make sense to enable
2290 * merge because the I/O submitted to backing file is handled page by
2291 * page. For directio mode, merge does help to dispatch bigger request
2292 * to underlayer disk. We will enable merge once directio is enabled.
2293 */
2294 blk_queue_flag_set(QUEUE_FLAG_NOMERGES, lo->lo_queue);
2295
2296 /*
2297 * Disable partition scanning by default. The in-kernel partition
2298 * scanning can be requested individually per-device during its
2299 * setup. Userspace can always add and remove partitions from all
2300 * devices. The needed partition minors are allocated from the
2301 * extended minor space, the main loop device numbers will continue
2302 * to match the loop minors, regardless of the number of partitions
2303 * used.
2304 *
2305 * If max_part is given, partition scanning is globally enabled for
2306 * all loop devices. The minors for the main loop devices will be
2307 * multiples of max_part.
2308 *
2309 * Note: Global-for-all-devices, set-only-at-init, read-only module
2310 * parameteters like 'max_loop' and 'max_part' make things needlessly
2311 * complicated, are too static, inflexible and may surprise
2312 * userspace tools. Parameters like this in general should be avoided.
2313 */
2314 if (!part_shift)
2315 disk->flags |= GENHD_FL_NO_PART_SCAN;
2316 disk->flags |= GENHD_FL_EXT_DEVT;
2317 atomic_set(&lo->lo_refcnt, 0);
2318 mutex_init(&lo->lo_mutex);
2319 lo->lo_number = i;
2320 spin_lock_init(&lo->lo_lock);
2321 spin_lock_init(&lo->lo_work_lock);
2322 disk->major = LOOP_MAJOR;
2323 disk->first_minor = i << part_shift;
2324 disk->minors = 1 << part_shift;
2325 disk->fops = &lo_fops;
2326 disk->private_data = lo;
2327 disk->queue = lo->lo_queue;
2328 sprintf(disk->disk_name, "loop%d", i);
2329
> 2330 err = add_disk(disk);
2331 if (err)
2332 goto out_cleanup_disk;
2333
2334 mutex_unlock(&loop_ctl_mutex);
2335
2336 return i;
2337
2338 out_cleanup_disk:
2339 blk_cleanup_disk(disk);
2340 out_cleanup_tags:
2341 blk_mq_free_tag_set(&lo->tag_set);
2342 out_free_idr:
2343 idr_remove(&loop_index_idr, i);
2344 out_unlock:
2345 mutex_unlock(&loop_ctl_mutex);
2346 out_free_dev:
2347 kfree(lo);
2348 out:
2349 return err;
2350 }
2351
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH] media: usb: uvc: uvc_driver: Added a function pr_info() in uvc_driver and staging: android: Decleared file operation with const keyword in android keyword
by kernel test robot
Hi Saptarshi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Saptarshi-Patra/media-usb-uvc-uv...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 77d34a4683b053108ecd466cc7c4193b45805528
config: arm-randconfig-r016-20210715 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0e49c54a8cbd3e779e5526a5888c683c01cc3c50)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/9bcd3c935ac7432af5857cd7481496390...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Saptarshi-Patra/media-usb-uvc-uvc_driver-Added-a-function-pr_info-in-uvc_driver-and-staging-android-Decleared-file-operation-with-const-/20210716-040300
git checkout 9bcd3c935ac7432af5857cd74814963908d01a5d
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/staging/android/
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/staging/android/ashmem.c:431:16: error: cannot assign to variable 'vmfile_fops' with const-qualified type 'const struct file_operations'
vmfile_fops = *vmfile->f_op;
~~~~~~~~~~~ ^
drivers/staging/android/ashmem.c:380:38: note: variable 'vmfile_fops' declared const here
static const struct file_operations vmfile_fops;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
drivers/staging/android/ashmem.c:432:21: error: cannot assign to variable 'vmfile_fops' with const-qualified type 'const struct file_operations'
vmfile_fops.mmap = ashmem_vmfile_mmap;
~~~~~~~~~~~~~~~~ ^
drivers/staging/android/ashmem.c:380:38: note: variable 'vmfile_fops' declared const here
static const struct file_operations vmfile_fops;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
drivers/staging/android/ashmem.c:433:34: error: cannot assign to variable 'vmfile_fops' with const-qualified type 'const struct file_operations'
vmfile_fops.get_unmapped_area =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
drivers/staging/android/ashmem.c:380:38: note: variable 'vmfile_fops' declared const here
static const struct file_operations vmfile_fops;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
3 errors generated.
vim +431 drivers/staging/android/ashmem.c
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 377
11980c2ac4ccfa Robert Love 2011-12-20 378 static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
11980c2ac4ccfa Robert Love 2011-12-20 379 {
9bcd3c935ac743 Saptarshi Patra 2021-07-16 380 static const struct file_operations vmfile_fops;
11980c2ac4ccfa Robert Love 2011-12-20 381 struct ashmem_area *asma = file->private_data;
11980c2ac4ccfa Robert Love 2011-12-20 382 int ret = 0;
11980c2ac4ccfa Robert Love 2011-12-20 383
11980c2ac4ccfa Robert Love 2011-12-20 384 mutex_lock(&ashmem_mutex);
11980c2ac4ccfa Robert Love 2011-12-20 385
11980c2ac4ccfa Robert Love 2011-12-20 386 /* user needs to SET_SIZE before mapping */
59848d6aded59a Alistair Strachan 2018-06-19 387 if (!asma->size) {
11980c2ac4ccfa Robert Love 2011-12-20 388 ret = -EINVAL;
11980c2ac4ccfa Robert Love 2011-12-20 389 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 390 }
11980c2ac4ccfa Robert Love 2011-12-20 391
8632c614565d0c Alistair Strachan 2018-06-19 392 /* requested mapping size larger than object size */
8632c614565d0c Alistair Strachan 2018-06-19 393 if (vma->vm_end - vma->vm_start > PAGE_ALIGN(asma->size)) {
11980c2ac4ccfa Robert Love 2011-12-20 394 ret = -EINVAL;
11980c2ac4ccfa Robert Love 2011-12-20 395 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 396 }
11980c2ac4ccfa Robert Love 2011-12-20 397
11980c2ac4ccfa Robert Love 2011-12-20 398 /* requested protection bits must match our allowed protection mask */
59848d6aded59a Alistair Strachan 2018-06-19 399 if ((vma->vm_flags & ~calc_vm_prot_bits(asma->prot_mask, 0)) &
59848d6aded59a Alistair Strachan 2018-06-19 400 calc_vm_prot_bits(PROT_MASK, 0)) {
11980c2ac4ccfa Robert Love 2011-12-20 401 ret = -EPERM;
11980c2ac4ccfa Robert Love 2011-12-20 402 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 403 }
56f76fc68492af Arve Hjønnevåg 2011-12-20 404 vma->vm_flags &= ~calc_vm_may_flags(~asma->prot_mask);
11980c2ac4ccfa Robert Love 2011-12-20 405
11980c2ac4ccfa Robert Love 2011-12-20 406 if (!asma->file) {
11980c2ac4ccfa Robert Love 2011-12-20 407 char *name = ASHMEM_NAME_DEF;
11980c2ac4ccfa Robert Love 2011-12-20 408 struct file *vmfile;
3e338d3c95c735 Suren Baghdasaryan 2020-07-30 409 struct inode *inode;
11980c2ac4ccfa Robert Love 2011-12-20 410
11980c2ac4ccfa Robert Love 2011-12-20 411 if (asma->name[ASHMEM_NAME_PREFIX_LEN] != '\0')
11980c2ac4ccfa Robert Love 2011-12-20 412 name = asma->name;
11980c2ac4ccfa Robert Love 2011-12-20 413
11980c2ac4ccfa Robert Love 2011-12-20 414 /* ... and allocate the backing shmem file */
11980c2ac4ccfa Robert Love 2011-12-20 415 vmfile = shmem_file_setup(name, asma->size, vma->vm_flags);
7f44cb0ba88b40 Viresh Kumar 2015-07-31 416 if (IS_ERR(vmfile)) {
11980c2ac4ccfa Robert Love 2011-12-20 417 ret = PTR_ERR(vmfile);
11980c2ac4ccfa Robert Love 2011-12-20 418 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 419 }
97fbfef6bd5978 Shuxiao Zhang 2017-04-06 420 vmfile->f_mode |= FMODE_LSEEK;
3e338d3c95c735 Suren Baghdasaryan 2020-07-30 421 inode = file_inode(vmfile);
3e338d3c95c735 Suren Baghdasaryan 2020-07-30 422 lockdep_set_class(&inode->i_rwsem, &backing_shmem_inode_class);
11980c2ac4ccfa Robert Love 2011-12-20 423 asma->file = vmfile;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 424 /*
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 425 * override mmap operation of the vmfile so that it can't be
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 426 * remapped which would lead to creation of a new vma with no
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 427 * asma permission checks. Have to override get_unmapped_area
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 428 * as well to prevent VM_BUG_ON check for f_ops modification.
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 429 */
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 430 if (!vmfile_fops.mmap) {
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 @431 vmfile_fops = *vmfile->f_op;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 432 vmfile_fops.mmap = ashmem_vmfile_mmap;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 433 vmfile_fops.get_unmapped_area =
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 434 ashmem_vmfile_get_unmapped_area;
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 435 }
6d67b0290b4b84 Suren Baghdasaryan 2020-01-27 436 vmfile->f_op = &vmfile_fops;
11980c2ac4ccfa Robert Love 2011-12-20 437 }
11980c2ac4ccfa Robert Love 2011-12-20 438 get_file(asma->file);
11980c2ac4ccfa Robert Love 2011-12-20 439
11980c2ac4ccfa Robert Love 2011-12-20 440 /*
11980c2ac4ccfa Robert Love 2011-12-20 441 * XXX - Reworked to use shmem_zero_setup() instead of
11980c2ac4ccfa Robert Love 2011-12-20 442 * shmem_set_file while we're in staging. -jstultz
11980c2ac4ccfa Robert Love 2011-12-20 443 */
11980c2ac4ccfa Robert Love 2011-12-20 444 if (vma->vm_flags & VM_SHARED) {
11980c2ac4ccfa Robert Love 2011-12-20 445 ret = shmem_zero_setup(vma);
11980c2ac4ccfa Robert Love 2011-12-20 446 if (ret) {
11980c2ac4ccfa Robert Love 2011-12-20 447 fput(asma->file);
11980c2ac4ccfa Robert Love 2011-12-20 448 goto out;
11980c2ac4ccfa Robert Love 2011-12-20 449 }
44960f2a7b63e2 John Stultz 2018-07-31 450 } else {
44960f2a7b63e2 John Stultz 2018-07-31 451 vma_set_anonymous(vma);
11980c2ac4ccfa Robert Love 2011-12-20 452 }
11980c2ac4ccfa Robert Love 2011-12-20 453
295992fb815e79 Christian König 2020-09-14 454 vma_set_file(vma, asma->file);
295992fb815e79 Christian König 2020-09-14 455 /* XXX: merge this with the get_file() above if possible */
295992fb815e79 Christian König 2020-09-14 456 fput(asma->file);
11980c2ac4ccfa Robert Love 2011-12-20 457
11980c2ac4ccfa Robert Love 2011-12-20 458 out:
11980c2ac4ccfa Robert Love 2011-12-20 459 mutex_unlock(&ashmem_mutex);
11980c2ac4ccfa Robert Love 2011-12-20 460 return ret;
11980c2ac4ccfa Robert Love 2011-12-20 461 }
11980c2ac4ccfa Robert Love 2011-12-20 462
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH 2/5] drm/gem: Provide drm_gem_fb_{vmap,vunmap}()
by kernel test robot
Hi Thomas,
I love your patch! Yet something to improve:
[auto build test ERROR on 4d00e2309398147acdbfefbe1deb4b0e78868466]
url: https://github.com/0day-ci/linux/commits/Thomas-Zimmermann/drm-Provide-fr...
base: 4d00e2309398147acdbfefbe1deb4b0e78868466
config: nios2-randconfig-s032-20210715 (attached as .config)
compiler: nios2-linux-gcc (GCC) 10.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/0day-ci/linux/commit/8a0708f4cf232e7fbc4eb6f58cf782200...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Zimmermann/drm-Provide-framebuffer-vmap-helpers/20210716-020508
git checkout 8a0708f4cf232e7fbc4eb6f58cf782200be8912e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/gpu/drm/arm/display/komeda/
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 >>):
In file included from drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c:11:
>> include/drm/drm_gem_framebuffer_helper.h:39:72: error: 'DRM_FORMAT_MAX_PLANES' undeclared here (not in a function)
39 | int drm_gem_fb_vmap(struct drm_framebuffer *fb, struct dma_buf_map map[DRM_FORMAT_MAX_PLANES]);
| ^~~~~~~~~~~~~~~~~~~~~
include/drm/drm_gem_framebuffer_helper.h:40:75: error: 'DRM_FORMAT_MAX_PLANES' undeclared here (not in a function)
40 | void drm_gem_fb_vunmap(struct drm_framebuffer *fb, struct dma_buf_map map[DRM_FORMAT_MAX_PLANES]);
| ^~~~~~~~~~~~~~~~~~~~~
vim +/DRM_FORMAT_MAX_PLANES +39 include/drm/drm_gem_framebuffer_helper.h
16
17 struct drm_gem_object *drm_gem_fb_get_obj(struct drm_framebuffer *fb,
18 unsigned int plane);
19 void drm_gem_fb_destroy(struct drm_framebuffer *fb);
20 int drm_gem_fb_create_handle(struct drm_framebuffer *fb, struct drm_file *file,
21 unsigned int *handle);
22
23 int drm_gem_fb_init_with_funcs(struct drm_device *dev,
24 struct drm_framebuffer *fb,
25 struct drm_file *file,
26 const struct drm_mode_fb_cmd2 *mode_cmd,
27 const struct drm_framebuffer_funcs *funcs);
28 struct drm_framebuffer *
29 drm_gem_fb_create_with_funcs(struct drm_device *dev, struct drm_file *file,
30 const struct drm_mode_fb_cmd2 *mode_cmd,
31 const struct drm_framebuffer_funcs *funcs);
32 struct drm_framebuffer *
33 drm_gem_fb_create(struct drm_device *dev, struct drm_file *file,
34 const struct drm_mode_fb_cmd2 *mode_cmd);
35 struct drm_framebuffer *
36 drm_gem_fb_create_with_dirty(struct drm_device *dev, struct drm_file *file,
37 const struct drm_mode_fb_cmd2 *mode_cmd);
38
> 39 int drm_gem_fb_vmap(struct drm_framebuffer *fb, struct dma_buf_map map[DRM_FORMAT_MAX_PLANES]);
40 void drm_gem_fb_vunmap(struct drm_framebuffer *fb, struct dma_buf_map map[DRM_FORMAT_MAX_PLANES]);
41
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[linux-stable-rc:linux-4.14.y 9785/9999] arch/powerpc/kernel/hw_breakpoint.c:106:6: error: no previous prototype for 'arch_unregister_hw_breakpoint'
by kernel test robot
Hi Frédéric,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
head: 4416c389d63e76d897a5788f6145f08522cf58b4
commit: a5ef8f46a2ab471eed32a948185a05eac9613b13 [9785/9999] gcc-common.h: Update for GCC 10
config: powerpc64-randconfig-r023-20210715 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.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/stable/linux-stable-rc.gi...
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-4.14.y
git checkout a5ef8f46a2ab471eed32a948185a05eac9613b13
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/workqueue.h:9,
from include/linux/srcu.h:34,
from include/linux/notifier.h:16,
from include/linux/memory_hotplug.h:7,
from include/linux/mmzone.h:782,
from include/linux/gfp.h:6,
from include/linux/idr.h:16,
from include/linux/kernfs.h:14,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:21,
from include/linux/device.h:17,
from arch/powerpc/include/asm/perf_event_server.h:14,
from arch/powerpc/include/asm/perf_event.h:18,
from include/linux/perf_event.h:24,
from include/linux/hw_breakpoint.h:5,
from arch/powerpc/kernel/hw_breakpoint.c:25:
include/linux/timer.h: In function 'timer_setup':
include/linux/timer.h:179:23: error: cast between incompatible function types from 'void (*)(struct timer_list *)' to 'void (*)(long unsigned int)' [-Werror=cast-function-type]
179 | __setup_timer(timer, (TIMER_FUNC_TYPE)callback,
| ^
include/linux/timer.h:144:25: note: in definition of macro '__setup_timer'
144 | (_timer)->function = (_fn); \
| ^~~
arch/powerpc/kernel/hw_breakpoint.c: At top level:
>> arch/powerpc/kernel/hw_breakpoint.c:106:6: error: no previous prototype for 'arch_unregister_hw_breakpoint' [-Werror=missing-prototypes]
106 | void arch_unregister_hw_breakpoint(struct perf_event *bp)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/kernel/hw_breakpoint.c:209:5: error: no previous prototype for 'hw_breakpoint_handler' [-Werror=missing-prototypes]
209 | int hw_breakpoint_handler(struct die_args *args)
| ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
In file included from include/linux/workqueue.h:9,
from include/linux/srcu.h:34,
from include/linux/notifier.h:16,
from include/linux/memory_hotplug.h:7,
from include/linux/mmzone.h:782,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/memblock.h:18,
from arch/powerpc/kernel/btext.c:11:
include/linux/timer.h: In function 'timer_setup':
include/linux/timer.h:179:23: error: cast between incompatible function types from 'void (*)(struct timer_list *)' to 'void (*)(long unsigned int)' [-Werror=cast-function-type]
179 | __setup_timer(timer, (TIMER_FUNC_TYPE)callback,
| ^
include/linux/timer.h:144:25: note: in definition of macro '__setup_timer'
144 | (_timer)->function = (_fn); \
| ^~~
arch/powerpc/kernel/btext.c: At top level:
>> arch/powerpc/kernel/btext.c:173:5: error: no previous prototype for 'btext_initialize' [-Werror=missing-prototypes]
173 | int btext_initialize(struct device_node *np)
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
In file included from include/linux/workqueue.h:9,
from include/linux/srcu.h:34,
from include/linux/notifier.h:16,
from arch/powerpc/include/asm/uprobes.h:25,
from include/linux/uprobes.h:62,
from include/linux/mm_types.h:14,
from include/linux/fs.h:22,
from include/linux/debugfs.h:18,
from arch/powerpc/mm/dump_hashpagetable.c:16:
include/linux/timer.h: In function 'timer_setup':
include/linux/timer.h:179:23: error: cast between incompatible function types from 'void (*)(struct timer_list *)' to 'void (*)(long unsigned int)' [-Werror=cast-function-type]
179 | __setup_timer(timer, (TIMER_FUNC_TYPE)callback,
| ^
include/linux/timer.h:144:25: note: in definition of macro '__setup_timer'
144 | (_timer)->function = (_fn); \
| ^~~
In file included from arch/powerpc/mm/dump_hashpagetable.c:27:
arch/powerpc/include/asm/plpar_wrappers.h: In function 'get_cede_latency_hint':
>> arch/powerpc/include/asm/plpar_wrappers.h:27:9: error: implicit declaration of function 'get_lppaca'; did you mean 'get_page'? [-Werror=implicit-function-declaration]
27 | return get_lppaca()->cede_latency_hint;
| ^~~~~~~~~~
| get_page
>> arch/powerpc/include/asm/plpar_wrappers.h:27:21: error: invalid type argument of '->' (have 'int')
27 | return get_lppaca()->cede_latency_hint;
| ^~
arch/powerpc/include/asm/plpar_wrappers.h: In function 'set_cede_latency_hint':
arch/powerpc/include/asm/plpar_wrappers.h:32:14: error: invalid type argument of '->' (have 'int')
32 | get_lppaca()->cede_latency_hint = latency_hint;
| ^~
arch/powerpc/include/asm/plpar_wrappers.h: In function 'extended_cede_processor':
>> arch/powerpc/include/asm/plpar_wrappers.h:51:4: error: implicit declaration of function '__hard_irq_enable'; did you mean 'may_hard_irq_enable'? [-Werror=implicit-function-declaration]
51 | __hard_irq_enable();
| ^~~~~~~~~~~~~~~~~
| may_hard_irq_enable
arch/powerpc/include/asm/plpar_wrappers.h: In function 'vpa_call':
>> arch/powerpc/include/asm/plpar_wrappers.h:62:16: error: left shift count >= width of type [-Werror=shift-count-overflow]
62 | flags = flags << H_VPA_FUNC_SHIFT;
| ^~
In file included from arch/powerpc/include/asm/plpar_wrappers.h:8,
from arch/powerpc/mm/dump_hashpagetable.c:27:
arch/powerpc/include/asm/plpar_wrappers.h: In function 'plpar_pte_read_4':
>> arch/powerpc/include/asm/hvcall.h:120:23: error: left shift count >= width of type [-Werror=shift-count-overflow]
120 | #define H_READ_4 (1UL<<(63-26)) /* Return 4 PTEs */
| ^~
arch/powerpc/include/asm/plpar_wrappers.h:183:44: note: in expansion of macro 'H_READ_4'
183 | rc = plpar_hcall9(H_READ, retbuf, flags | H_READ_4, ptex);
| ^~~~~~~~
arch/powerpc/include/asm/plpar_wrappers.h: In function 'plpar_pte_read_4_raw':
>> arch/powerpc/include/asm/hvcall.h:120:23: error: left shift count >= width of type [-Werror=shift-count-overflow]
120 | #define H_READ_4 (1UL<<(63-26)) /* Return 4 PTEs */
| ^~
arch/powerpc/include/asm/plpar_wrappers.h:201:48: note: in expansion of macro 'H_READ_4'
201 | rc = plpar_hcall9_raw(H_READ, retbuf, flags | H_READ_4, ptex);
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c: At top level:
>> arch/powerpc/mm/dump_hashpagetable.c:69:13: error: 'SLB_VSID_B' undeclared here (not in a function)
69 | .mask = SLB_VSID_B,
| ^~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:70:13: error: 'SLB_VSID_B_256M' undeclared here (not in a function)
70 | .val = SLB_VSID_B_256M,
| ^~~~~~~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:74:11: error: 'HPTE_V_SECONDARY' undeclared here (not in a function)
74 | .mask = HPTE_V_SECONDARY,
| ^~~~~~~~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:79:11: error: 'HPTE_V_VALID' undeclared here (not in a function)
79 | .mask = HPTE_V_VALID,
| ^~~~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:84:11: error: 'HPTE_V_BOLTED' undeclared here (not in a function)
84 | .mask = HPTE_V_BOLTED,
| ^~~~~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:93:11: error: 'HPTE_R_PP0' undeclared here (not in a function)
93 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:93:24: error: 'HPTE_R_PP' undeclared here (not in a function)
93 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:93:22: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
93 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
>> arch/powerpc/mm/dump_hashpagetable.c:93:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
93 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:93:11: note: (near initialization for 'r_flag_array[0].mask')
>> arch/powerpc/mm/dump_hashpagetable.c:93:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:93:11: note: (near initialization for 'r_flag_array[0].mask')
arch/powerpc/mm/dump_hashpagetable.c:97:22: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
97 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
arch/powerpc/mm/dump_hashpagetable.c:97:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
97 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:97:11: note: (near initialization for 'r_flag_array[1].mask')
arch/powerpc/mm/dump_hashpagetable.c:97:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:97:11: note: (near initialization for 'r_flag_array[1].mask')
arch/powerpc/mm/dump_hashpagetable.c:101:22: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
101 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
arch/powerpc/mm/dump_hashpagetable.c:101:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
101 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:101:11: note: (near initialization for 'r_flag_array[2].mask')
arch/powerpc/mm/dump_hashpagetable.c:101:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:101:11: note: (near initialization for 'r_flag_array[2].mask')
arch/powerpc/mm/dump_hashpagetable.c:105:22: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
105 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
arch/powerpc/mm/dump_hashpagetable.c:105:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
105 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:105:11: note: (near initialization for 'r_flag_array[3].mask')
arch/powerpc/mm/dump_hashpagetable.c:105:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:105:11: note: (near initialization for 'r_flag_array[3].mask')
arch/powerpc/mm/dump_hashpagetable.c:109:22: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
109 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
arch/powerpc/mm/dump_hashpagetable.c:109:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
109 | .mask = HPTE_R_PP0 | HPTE_R_PP,
| ^~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:109:11: note: (near initialization for 'r_flag_array[4].mask')
arch/powerpc/mm/dump_hashpagetable.c:109:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:109:11: note: (near initialization for 'r_flag_array[4].mask')
>> arch/powerpc/mm/dump_hashpagetable.c:110:10: error: 'PP_RXXX' undeclared here (not in a function); did you mean 'PP_RXRX'?
110 | .val = PP_RXXX,
| ^~~~~~~
| PP_RXRX
arch/powerpc/mm/dump_hashpagetable.c:110:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:110:10: note: (near initialization for 'r_flag_array[4].val')
arch/powerpc/mm/dump_hashpagetable.c:110:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:110:10: note: (near initialization for 'r_flag_array[4].val')
>> arch/powerpc/mm/dump_hashpagetable.c:113:11: error: 'HPTE_R_KEY_HI' undeclared here (not in a function)
113 | .mask = HPTE_R_KEY_HI | HPTE_R_KEY_LO,
| ^~~~~~~~~~~~~
>> arch/powerpc/mm/dump_hashpagetable.c:113:27: error: 'HPTE_R_KEY_LO' undeclared here (not in a function)
113 | .mask = HPTE_R_KEY_HI | HPTE_R_KEY_LO,
| ^~~~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:113:25: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
113 | .mask = HPTE_R_KEY_HI | HPTE_R_KEY_LO,
| ~~~~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
arch/powerpc/mm/dump_hashpagetable.c:113:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
113 | .mask = HPTE_R_KEY_HI | HPTE_R_KEY_LO,
| ^~~~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:113:11: note: (near initialization for 'r_flag_array[5].mask')
arch/powerpc/mm/dump_hashpagetable.c:113:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:113:11: note: (near initialization for 'r_flag_array[5].mask')
arch/powerpc/mm/dump_hashpagetable.c:114:24: error: invalid operands to binary | (have 'const struct flag_info *' and 'const struct flag_info *')
114 | .val = HPTE_R_KEY_HI | HPTE_R_KEY_LO,
| ~~~~~~~~~~~~~ ^
| | |
| | const struct flag_info *
| const struct flag_info *
arch/powerpc/mm/dump_hashpagetable.c:114:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
114 | .val = HPTE_R_KEY_HI | HPTE_R_KEY_LO,
| ^~~~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:114:10: note: (near initialization for 'r_flag_array[5].val')
arch/powerpc/mm/dump_hashpagetable.c:114:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:114:10: note: (near initialization for 'r_flag_array[5].val')
>> arch/powerpc/mm/dump_hashpagetable.c:119:11: error: 'HPTE_R_R' undeclared here (not in a function)
119 | .mask = HPTE_R_R,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:119:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:119:11: note: (near initialization for 'r_flag_array[6].mask')
arch/powerpc/mm/dump_hashpagetable.c:119:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:119:11: note: (near initialization for 'r_flag_array[6].mask')
arch/powerpc/mm/dump_hashpagetable.c:120:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
120 | .val = HPTE_R_R,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:120:10: note: (near initialization for 'r_flag_array[6].val')
arch/powerpc/mm/dump_hashpagetable.c:120:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:120:10: note: (near initialization for 'r_flag_array[6].val')
arch/powerpc/mm/dump_hashpagetable.c:124:11: error: 'HPTE_R_C' undeclared here (not in a function)
124 | .mask = HPTE_R_C,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:124:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:124:11: note: (near initialization for 'r_flag_array[7].mask')
arch/powerpc/mm/dump_hashpagetable.c:124:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:124:11: note: (near initialization for 'r_flag_array[7].mask')
arch/powerpc/mm/dump_hashpagetable.c:125:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
125 | .val = HPTE_R_C,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:125:10: note: (near initialization for 'r_flag_array[7].val')
arch/powerpc/mm/dump_hashpagetable.c:125:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:125:10: note: (near initialization for 'r_flag_array[7].val')
arch/powerpc/mm/dump_hashpagetable.c:129:11: error: 'HPTE_R_N' undeclared here (not in a function)
129 | .mask = HPTE_R_N,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:129:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:129:11: note: (near initialization for 'r_flag_array[8].mask')
arch/powerpc/mm/dump_hashpagetable.c:129:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:129:11: note: (near initialization for 'r_flag_array[8].mask')
arch/powerpc/mm/dump_hashpagetable.c:130:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
130 | .val = HPTE_R_N,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:130:10: note: (near initialization for 'r_flag_array[8].val')
arch/powerpc/mm/dump_hashpagetable.c:130:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:130:10: note: (near initialization for 'r_flag_array[8].val')
arch/powerpc/mm/dump_hashpagetable.c:133:11: error: 'HPTE_R_WIMG' undeclared here (not in a function)
133 | .mask = HPTE_R_WIMG,
| ^~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:133:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:133:11: note: (near initialization for 'r_flag_array[9].mask')
arch/powerpc/mm/dump_hashpagetable.c:133:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:133:11: note: (near initialization for 'r_flag_array[9].mask')
arch/powerpc/mm/dump_hashpagetable.c:134:10: error: 'HPTE_R_W' undeclared here (not in a function)
134 | .val = HPTE_R_W,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:134:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:134:10: note: (near initialization for 'r_flag_array[9].val')
arch/powerpc/mm/dump_hashpagetable.c:134:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:134:10: note: (near initialization for 'r_flag_array[9].val')
arch/powerpc/mm/dump_hashpagetable.c:137:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
137 | .mask = HPTE_R_WIMG,
| ^~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:137:11: note: (near initialization for 'r_flag_array[10].mask')
arch/powerpc/mm/dump_hashpagetable.c:137:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:137:11: note: (near initialization for 'r_flag_array[10].mask')
arch/powerpc/mm/dump_hashpagetable.c:138:10: error: 'HPTE_R_I' undeclared here (not in a function)
138 | .val = HPTE_R_I,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:138:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:138:10: note: (near initialization for 'r_flag_array[10].val')
arch/powerpc/mm/dump_hashpagetable.c:138:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:138:10: note: (near initialization for 'r_flag_array[10].val')
arch/powerpc/mm/dump_hashpagetable.c:141:11: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
141 | .mask = HPTE_R_WIMG,
| ^~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:141:11: note: (near initialization for 'r_flag_array[11].mask')
arch/powerpc/mm/dump_hashpagetable.c:141:11: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:141:11: note: (near initialization for 'r_flag_array[11].mask')
arch/powerpc/mm/dump_hashpagetable.c:142:10: error: 'HPTE_R_G' undeclared here (not in a function)
142 | .val = HPTE_R_G,
| ^~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:142:10: error: initialization of 'long long unsigned int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:142:10: note: (near initialization for 'r_flag_array[11].val')
arch/powerpc/mm/dump_hashpagetable.c:142:10: error: initializer element is not constant
arch/powerpc/mm/dump_hashpagetable.c:142:10: note: (near initialization for 'r_flag_array[11].val')
arch/powerpc/mm/dump_hashpagetable.c: In function 'dump_hpte_info':
arch/powerpc/mm/dump_hashpagetable.c:199:37: error: implicit declaration of function 'HPTE_V_AVPN_VAL' [-Werror=implicit-function-declaration]
199 | seq_printf(st->seq, "AVPN:%llx\t", HPTE_V_AVPN_VAL(v));
| ^~~~~~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:199:31: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'int' [-Werror=format=]
199 | seq_printf(st->seq, "AVPN:%llx\t", HPTE_V_AVPN_VAL(v));
| ~~~^ ~~~~~~~~~~~~~~~~~~
| | |
| | int
| long long unsigned int
| %x
arch/powerpc/mm/dump_hashpagetable.c: In function 'native_find':
arch/powerpc/mm/dump_hashpagetable.c:217:17: error: 'mmu_kernel_ssize' undeclared (first use in this function)
217 | int i, ssize = mmu_kernel_ssize;
| ^~~~~~~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:217:17: note: each undeclared identifier is reported only once for each function it appears in
arch/powerpc/mm/dump_hashpagetable.c:217:17: error: initialization of 'int' from 'const struct flag_info *' makes integer from pointer without a cast [-Werror=int-conversion]
arch/powerpc/mm/dump_hashpagetable.c:218:24: error: 'mmu_psize_defs' undeclared (first use in this function)
218 | unsigned long shift = mmu_psize_defs[psize].shift;
| ^~~~~~~~~~~~~~
arch/powerpc/mm/dump_hashpagetable.c:221:9: error: implicit declaration of function 'get_kernel_vsid'; did you mean 'get_kernel_page'? [-Werror=implicit-function-declaration]
221 | vsid = get_kernel_vsid(ea, ssize);
..
vim +/arch_unregister_hw_breakpoint +106 arch/powerpc/kernel/hw_breakpoint.c
5aae8a53708025 K.Prasad 2010-06-15 101
5aae8a53708025 K.Prasad 2010-06-15 102 /*
5aae8a53708025 K.Prasad 2010-06-15 103 * Perform cleanup of arch-specific counters during unregistration
5aae8a53708025 K.Prasad 2010-06-15 104 * of the perf-event
5aae8a53708025 K.Prasad 2010-06-15 105 */
5aae8a53708025 K.Prasad 2010-06-15 @106 void arch_unregister_hw_breakpoint(struct perf_event *bp)
5aae8a53708025 K.Prasad 2010-06-15 107 {
5aae8a53708025 K.Prasad 2010-06-15 108 /*
5aae8a53708025 K.Prasad 2010-06-15 109 * If the breakpoint is unregistered between a hw_breakpoint_handler()
5aae8a53708025 K.Prasad 2010-06-15 110 * and the single_step_dabr_instruction(), then cleanup the breakpoint
5aae8a53708025 K.Prasad 2010-06-15 111 * restoration variables to prevent dangling pointers.
fb822e6076d972 Ravi Bangoria 2016-03-02 112 * FIXME, this should not be using bp->ctx at all! Sayeth peterz.
5aae8a53708025 K.Prasad 2010-06-15 113 */
fb822e6076d972 Ravi Bangoria 2016-03-02 114 if (bp->ctx && bp->ctx->task && bp->ctx->task != ((void *)-1L))
5aae8a53708025 K.Prasad 2010-06-15 115 bp->ctx->task->thread.last_hit_ubp = NULL;
5aae8a53708025 K.Prasad 2010-06-15 116 }
5aae8a53708025 K.Prasad 2010-06-15 117
5aae8a53708025 K.Prasad 2010-06-15 118 /*
5aae8a53708025 K.Prasad 2010-06-15 119 * Check for virtual address in kernel space.
5aae8a53708025 K.Prasad 2010-06-15 120 */
5aae8a53708025 K.Prasad 2010-06-15 121 int arch_check_bp_in_kernelspace(struct perf_event *bp)
5aae8a53708025 K.Prasad 2010-06-15 122 {
5aae8a53708025 K.Prasad 2010-06-15 123 struct arch_hw_breakpoint *info = counter_arch_bp(bp);
5aae8a53708025 K.Prasad 2010-06-15 124
5aae8a53708025 K.Prasad 2010-06-15 125 return is_kernel_addr(info->address);
5aae8a53708025 K.Prasad 2010-06-15 126 }
5aae8a53708025 K.Prasad 2010-06-15 127
5aae8a53708025 K.Prasad 2010-06-15 128 int arch_bp_generic_fields(int type, int *gen_bp_type)
5aae8a53708025 K.Prasad 2010-06-15 129 {
9422de3e953d0e Michael Neuling 2012-12-20 130 *gen_bp_type = 0;
9422de3e953d0e Michael Neuling 2012-12-20 131 if (type & HW_BRK_TYPE_READ)
9422de3e953d0e Michael Neuling 2012-12-20 132 *gen_bp_type |= HW_BREAKPOINT_R;
9422de3e953d0e Michael Neuling 2012-12-20 133 if (type & HW_BRK_TYPE_WRITE)
9422de3e953d0e Michael Neuling 2012-12-20 134 *gen_bp_type |= HW_BREAKPOINT_W;
9422de3e953d0e Michael Neuling 2012-12-20 135 if (*gen_bp_type == 0)
5aae8a53708025 K.Prasad 2010-06-15 136 return -EINVAL;
5aae8a53708025 K.Prasad 2010-06-15 137 return 0;
5aae8a53708025 K.Prasad 2010-06-15 138 }
5aae8a53708025 K.Prasad 2010-06-15 139
5aae8a53708025 K.Prasad 2010-06-15 140 /*
5aae8a53708025 K.Prasad 2010-06-15 141 * Validate the arch-specific HW Breakpoint register settings
5aae8a53708025 K.Prasad 2010-06-15 142 */
5aae8a53708025 K.Prasad 2010-06-15 143 int arch_validate_hwbkpt_settings(struct perf_event *bp)
5aae8a53708025 K.Prasad 2010-06-15 144 {
4ae7ebe9522a9e Michael Neuling 2013-01-24 145 int ret = -EINVAL, length_max;
5aae8a53708025 K.Prasad 2010-06-15 146 struct arch_hw_breakpoint *info = counter_arch_bp(bp);
5aae8a53708025 K.Prasad 2010-06-15 147
5aae8a53708025 K.Prasad 2010-06-15 148 if (!bp)
5aae8a53708025 K.Prasad 2010-06-15 149 return ret;
5aae8a53708025 K.Prasad 2010-06-15 150
9422de3e953d0e Michael Neuling 2012-12-20 151 info->type = HW_BRK_TYPE_TRANSLATE;
9422de3e953d0e Michael Neuling 2012-12-20 152 if (bp->attr.bp_type & HW_BREAKPOINT_R)
9422de3e953d0e Michael Neuling 2012-12-20 153 info->type |= HW_BRK_TYPE_READ;
9422de3e953d0e Michael Neuling 2012-12-20 154 if (bp->attr.bp_type & HW_BREAKPOINT_W)
9422de3e953d0e Michael Neuling 2012-12-20 155 info->type |= HW_BRK_TYPE_WRITE;
9422de3e953d0e Michael Neuling 2012-12-20 156 if (info->type == HW_BRK_TYPE_TRANSLATE)
9422de3e953d0e Michael Neuling 2012-12-20 157 /* must set alteast read or write */
5aae8a53708025 K.Prasad 2010-06-15 158 return ret;
9422de3e953d0e Michael Neuling 2012-12-20 159 if (!(bp->attr.exclude_user))
9422de3e953d0e Michael Neuling 2012-12-20 160 info->type |= HW_BRK_TYPE_USER;
9422de3e953d0e Michael Neuling 2012-12-20 161 if (!(bp->attr.exclude_kernel))
9422de3e953d0e Michael Neuling 2012-12-20 162 info->type |= HW_BRK_TYPE_KERNEL;
9422de3e953d0e Michael Neuling 2012-12-20 163 if (!(bp->attr.exclude_hv))
9422de3e953d0e Michael Neuling 2012-12-20 164 info->type |= HW_BRK_TYPE_HYP;
5aae8a53708025 K.Prasad 2010-06-15 165 info->address = bp->attr.bp_addr;
5aae8a53708025 K.Prasad 2010-06-15 166 info->len = bp->attr.bp_len;
5aae8a53708025 K.Prasad 2010-06-15 167
5aae8a53708025 K.Prasad 2010-06-15 168 /*
5aae8a53708025 K.Prasad 2010-06-15 169 * Since breakpoint length can be a maximum of HW_BREAKPOINT_LEN(8)
5aae8a53708025 K.Prasad 2010-06-15 170 * and breakpoint addresses are aligned to nearest double-word
5aae8a53708025 K.Prasad 2010-06-15 171 * HW_BREAKPOINT_ALIGN by rounding off to the lower address, the
5aae8a53708025 K.Prasad 2010-06-15 172 * 'symbolsize' should satisfy the check below.
5aae8a53708025 K.Prasad 2010-06-15 173 */
4ae7ebe9522a9e Michael Neuling 2013-01-24 174 length_max = 8; /* DABR */
4ae7ebe9522a9e Michael Neuling 2013-01-24 175 if (cpu_has_feature(CPU_FTR_DAWR)) {
4ae7ebe9522a9e Michael Neuling 2013-01-24 176 length_max = 512 ; /* 64 doublewords */
4ae7ebe9522a9e Michael Neuling 2013-01-24 177 /* DAWR region can't cross 512 boundary */
919c9b8187bc8a Michael Neuling 2018-05-17 178 if ((bp->attr.bp_addr >> 9) !=
919c9b8187bc8a Michael Neuling 2018-05-17 179 ((bp->attr.bp_addr + bp->attr.bp_len - 1) >> 9))
4ae7ebe9522a9e Michael Neuling 2013-01-24 180 return -EINVAL;
4ae7ebe9522a9e Michael Neuling 2013-01-24 181 }
5aae8a53708025 K.Prasad 2010-06-15 182 if (info->len >
4ae7ebe9522a9e Michael Neuling 2013-01-24 183 (length_max - (info->address & HW_BREAKPOINT_ALIGN)))
5aae8a53708025 K.Prasad 2010-06-15 184 return -EINVAL;
5aae8a53708025 K.Prasad 2010-06-15 185 return 0;
5aae8a53708025 K.Prasad 2010-06-15 186 }
5aae8a53708025 K.Prasad 2010-06-15 187
06532a6743d83f K.Prasad 2010-06-15 188 /*
06532a6743d83f K.Prasad 2010-06-15 189 * Restores the breakpoint on the debug registers.
06532a6743d83f K.Prasad 2010-06-15 190 * Invoke this function if it is known that the execution context is
06532a6743d83f K.Prasad 2010-06-15 191 * about to change to cause loss of MSR_SE settings.
06532a6743d83f K.Prasad 2010-06-15 192 */
06532a6743d83f K.Prasad 2010-06-15 193 void thread_change_pc(struct task_struct *tsk, struct pt_regs *regs)
06532a6743d83f K.Prasad 2010-06-15 194 {
06532a6743d83f K.Prasad 2010-06-15 195 struct arch_hw_breakpoint *info;
06532a6743d83f K.Prasad 2010-06-15 196
06532a6743d83f K.Prasad 2010-06-15 197 if (likely(!tsk->thread.last_hit_ubp))
06532a6743d83f K.Prasad 2010-06-15 198 return;
06532a6743d83f K.Prasad 2010-06-15 199
06532a6743d83f K.Prasad 2010-06-15 200 info = counter_arch_bp(tsk->thread.last_hit_ubp);
06532a6743d83f K.Prasad 2010-06-15 201 regs->msr &= ~MSR_SE;
21f585073d6347 Paul Gortmaker 2014-04-29 202 __set_breakpoint(info);
06532a6743d83f K.Prasad 2010-06-15 203 tsk->thread.last_hit_ubp = NULL;
06532a6743d83f K.Prasad 2010-06-15 204 }
06532a6743d83f K.Prasad 2010-06-15 205
5aae8a53708025 K.Prasad 2010-06-15 206 /*
5aae8a53708025 K.Prasad 2010-06-15 207 * Handle debug exception notifications.
5aae8a53708025 K.Prasad 2010-06-15 208 */
03465f899bdac7 Nicholas Piggin 2016-09-16 @209 int hw_breakpoint_handler(struct die_args *args)
5aae8a53708025 K.Prasad 2010-06-15 210 {
5aae8a53708025 K.Prasad 2010-06-15 211 int rc = NOTIFY_STOP;
5aae8a53708025 K.Prasad 2010-06-15 212 struct perf_event *bp;
5aae8a53708025 K.Prasad 2010-06-15 213 struct pt_regs *regs = args->regs;
4ad8622dc54895 Christophe Leroy 2016-11-29 214 #ifndef CONFIG_PPC_8xx
5aae8a53708025 K.Prasad 2010-06-15 215 int stepped = 1;
5aae8a53708025 K.Prasad 2010-06-15 216 unsigned int instr;
4ad8622dc54895 Christophe Leroy 2016-11-29 217 #endif
4ad8622dc54895 Christophe Leroy 2016-11-29 218 struct arch_hw_breakpoint *info;
e3e94084adb561 K.Prasad 2010-06-15 219 unsigned long dar = regs->dar;
5aae8a53708025 K.Prasad 2010-06-15 220
5aae8a53708025 K.Prasad 2010-06-15 221 /* Disable breakpoints during exception handling */
9422de3e953d0e Michael Neuling 2012-12-20 222 hw_breakpoint_disable();
574cb24899d35e Paul Mackerras 2010-06-23 223
5aae8a53708025 K.Prasad 2010-06-15 224 /*
5aae8a53708025 K.Prasad 2010-06-15 225 * The counter may be concurrently released but that can only
5aae8a53708025 K.Prasad 2010-06-15 226 * occur from a call_rcu() path. We can then safely fetch
5aae8a53708025 K.Prasad 2010-06-15 227 * the breakpoint, use its callback, touch its counter
5aae8a53708025 K.Prasad 2010-06-15 228 * while we are in an rcu_read_lock() path.
5aae8a53708025 K.Prasad 2010-06-15 229 */
5aae8a53708025 K.Prasad 2010-06-15 230 rcu_read_lock();
5aae8a53708025 K.Prasad 2010-06-15 231
69111bac42f5ce Christoph Lameter 2014-10-21 232 bp = __this_cpu_read(bp_per_reg);
c21a493a2b4465 Ravi Bangoria 2016-11-22 233 if (!bp) {
c21a493a2b4465 Ravi Bangoria 2016-11-22 234 rc = NOTIFY_DONE;
5aae8a53708025 K.Prasad 2010-06-15 235 goto out;
c21a493a2b4465 Ravi Bangoria 2016-11-22 236 }
5aae8a53708025 K.Prasad 2010-06-15 237 info = counter_arch_bp(bp);
5aae8a53708025 K.Prasad 2010-06-15 238
5aae8a53708025 K.Prasad 2010-06-15 239 /*
5aae8a53708025 K.Prasad 2010-06-15 240 * Return early after invoking user-callback function without restoring
5aae8a53708025 K.Prasad 2010-06-15 241 * DABR if the breakpoint is from ptrace which always operates in
5aae8a53708025 K.Prasad 2010-06-15 242 * one-shot mode. The ptrace-ed process will receive the SIGTRAP signal
5aae8a53708025 K.Prasad 2010-06-15 243 * generated in do_dabr().
5aae8a53708025 K.Prasad 2010-06-15 244 */
574cb24899d35e Paul Mackerras 2010-06-23 245 if (bp->overflow_handler == ptrace_triggered) {
5aae8a53708025 K.Prasad 2010-06-15 246 perf_bp_event(bp, regs);
5aae8a53708025 K.Prasad 2010-06-15 247 rc = NOTIFY_DONE;
5aae8a53708025 K.Prasad 2010-06-15 248 goto out;
5aae8a53708025 K.Prasad 2010-06-15 249 }
5aae8a53708025 K.Prasad 2010-06-15 250
e3e94084adb561 K.Prasad 2010-06-15 251 /*
e3e94084adb561 K.Prasad 2010-06-15 252 * Verify if dar lies within the address range occupied by the symbol
574cb24899d35e Paul Mackerras 2010-06-23 253 * being watched to filter extraneous exceptions. If it doesn't,
574cb24899d35e Paul Mackerras 2010-06-23 254 * we still need to single-step the instruction, but we don't
574cb24899d35e Paul Mackerras 2010-06-23 255 * generate an event.
e3e94084adb561 K.Prasad 2010-06-15 256 */
540e07c67efe42 Michael Neuling 2013-06-24 257 info->type &= ~HW_BRK_TYPE_EXTRANEOUS_IRQ;
9422de3e953d0e Michael Neuling 2012-12-20 258 if (!((bp->attr.bp_addr <= dar) &&
9422de3e953d0e Michael Neuling 2012-12-20 259 (dar - bp->attr.bp_addr < bp->attr.bp_len)))
9422de3e953d0e Michael Neuling 2012-12-20 260 info->type |= HW_BRK_TYPE_EXTRANEOUS_IRQ;
e3e94084adb561 K.Prasad 2010-06-15 261
:::::: The code at line 106 was first introduced by commit
:::::: 5aae8a53708025d4e718f0d2e7c2f766779ddc71 powerpc, hw_breakpoints: Implement hw_breakpoints for 64-bit server processors
:::::: TO: K.Prasad <prasad(a)linux.vnet.ibm.com>
:::::: CC: Paul Mackerras <paulus(a)samba.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months