On 2021/01/29 13:11, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git block-5.11 > head: e1aa139c97ef1fa60cbdd2b6e1d40e4fe182068d > commit: e1aa139c97ef1fa60cbdd2b6e1d40e4fe182068d [35/35] null_blk: cleanup zoned mode initialization > config: i386-randconfig-r004-20210128 (attached as .config) > compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 > reproduce (this is a W=1 build): > # https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=e1aa139c97ef1fa60cbdd2b6e1d40e4fe182068d > git remote add block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git > git fetch --no-tags block block-5.11 > git checkout e1aa139c97ef1fa60cbdd2b6e1d40e4fe182068d > # save the attached .config to linux build tree > make W=1 ARCH=i386 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot <lkp@xxxxxxxxx> > > All errors (new ones prefixed by >>): > > ld: drivers/block/null_blk/zoned.o: in function `null_init_zoned_dev': >>> drivers/block/null_blk/zoned.c:86: undefined reference to `__udivdi3' Jens, Arg. 64-bit div on 32-bit arch... Forgot about that one. I can send a fixed v2 or an incremental fix patch. Which do you prefer ? > > > vim +86 drivers/block/null_blk/zoned.c > > 57 > 58 int null_init_zoned_dev(struct nullb_device *dev, struct request_queue *q) > 59 { > 60 sector_t dev_capacity_sects, zone_capacity_sects; > 61 struct nullb_zone *zone; > 62 sector_t sector = 0; > 63 unsigned int i; > 64 > 65 if (!is_power_of_2(dev->zone_size)) { > 66 pr_err("zone_size must be power-of-two\n"); > 67 return -EINVAL; > 68 } > 69 if (dev->zone_size > dev->size) { > 70 pr_err("Zone size larger than device capacity\n"); > 71 return -EINVAL; > 72 } > 73 > 74 if (!dev->zone_capacity) > 75 dev->zone_capacity = dev->zone_size; > 76 > 77 if (dev->zone_capacity > dev->zone_size) { > 78 pr_err("null_blk: zone capacity (%lu MB) larger than zone size (%lu MB)\n", > 79 dev->zone_capacity, dev->zone_size); > 80 return -EINVAL; > 81 } > 82 > 83 zone_capacity_sects = mb_to_sects(dev->zone_capacity); > 84 dev_capacity_sects = mb_to_sects(dev->size); > 85 dev->zone_size_sects = mb_to_sects(dev->zone_size); > > 86 dev->nr_zones = DIV_ROUND_UP(dev_capacity_sects, dev->zone_size_sects); > 87 > 88 dev->zones = kvmalloc_array(dev->nr_zones, sizeof(struct nullb_zone), > 89 GFP_KERNEL | __GFP_ZERO); > 90 if (!dev->zones) > 91 return -ENOMEM; > 92 > 93 spin_lock_init(&dev->zone_res_lock); > 94 > 95 if (dev->zone_nr_conv >= dev->nr_zones) { > 96 dev->zone_nr_conv = dev->nr_zones - 1; > 97 pr_info("changed the number of conventional zones to %u", > 98 dev->zone_nr_conv); > 99 } > 100 > 101 /* Max active zones has to be < nbr of seq zones in order to be enforceable */ > 102 if (dev->zone_max_active >= dev->nr_zones - dev->zone_nr_conv) { > 103 dev->zone_max_active = 0; > 104 pr_info("zone_max_active limit disabled, limit >= zone count\n"); > 105 } > 106 > 107 /* Max open zones has to be <= max active zones */ > 108 if (dev->zone_max_active && dev->zone_max_open > dev->zone_max_active) { > 109 dev->zone_max_open = dev->zone_max_active; > 110 pr_info("changed the maximum number of open zones to %u\n", > 111 dev->nr_zones); > 112 } else if (dev->zone_max_open >= dev->nr_zones - dev->zone_nr_conv) { > 113 dev->zone_max_open = 0; > 114 pr_info("zone_max_open limit disabled, limit >= zone count\n"); > 115 } > 116 dev->need_zone_res_mgmt = dev->zone_max_active || dev->zone_max_open; > 117 dev->imp_close_zone_no = dev->zone_nr_conv; > 118 > 119 for (i = 0; i < dev->zone_nr_conv; i++) { > 120 zone = &dev->zones[i]; > 121 > 122 null_init_zone_lock(dev, zone); > 123 zone->start = sector; > 124 zone->len = dev->zone_size_sects; > 125 zone->capacity = zone->len; > 126 zone->wp = zone->start + zone->len; > 127 zone->type = BLK_ZONE_TYPE_CONVENTIONAL; > 128 zone->cond = BLK_ZONE_COND_NOT_WP; > 129 > 130 sector += dev->zone_size_sects; > 131 } > 132 > 133 for (i = dev->zone_nr_conv; i < dev->nr_zones; i++) { > 134 zone = &dev->zones[i]; > 135 > 136 null_init_zone_lock(dev, zone); > 137 zone->start = zone->wp = sector; > 138 if (zone->start + dev->zone_size_sects > dev_capacity_sects) > 139 zone->len = dev_capacity_sects - zone->start; > 140 else > 141 zone->len = dev->zone_size_sects; > 142 zone->capacity = > 143 min_t(sector_t, zone->len, zone_capacity_sects); > 144 zone->type = BLK_ZONE_TYPE_SEQWRITE_REQ; > 145 zone->cond = BLK_ZONE_COND_EMPTY; > 146 > 147 sector += dev->zone_size_sects; > 148 } > 149 > 150 q->limits.zoned = BLK_ZONED_HM; > 151 blk_queue_flag_set(QUEUE_FLAG_ZONE_RESETALL, q); > 152 blk_queue_required_elevator_features(q, ELEVATOR_F_ZBD_SEQ_WRITE); > 153 > 154 return 0; > 155 } > 156 > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx > -- Damien Le Moal Western Digital Research