Home
last modified time | relevance | path

Searched refs:bitmap (Results 1 – 25 of 188) sorted by relevance

12345678

/drivers/md/
Dmd-bitmap.c35 static inline char *bmname(struct bitmap *bitmap) in bmname() argument
37 return bitmap->mddev ? mdname(bitmap->mddev) : "mdX"; in bmname()
50 static int md_bitmap_checkpage(struct bitmap_counts *bitmap, in md_bitmap_checkpage() argument
52 __releases(bitmap->lock) in md_bitmap_checkpage()
53 __acquires(bitmap->lock) in md_bitmap_checkpage()
57 WARN_ON_ONCE(page >= bitmap->pages); in md_bitmap_checkpage()
58 if (bitmap->bp[page].hijacked) /* it's hijacked, don't try to alloc */ in md_bitmap_checkpage()
61 if (bitmap->bp[page].map) /* page is already allocated, just return */ in md_bitmap_checkpage()
69 spin_unlock_irq(&bitmap->lock); in md_bitmap_checkpage()
84 spin_lock_irq(&bitmap->lock); in md_bitmap_checkpage()
[all …]
Dmd-bitmap.h180 struct bitmap { struct
239 struct bitmap *md_bitmap_create(struct mddev *mddev, int slot);
244 void md_bitmap_print_sb(struct bitmap *bitmap);
245 void md_bitmap_update_sb(struct bitmap *bitmap);
246 void md_bitmap_status(struct seq_file *seq, struct bitmap *bitmap);
248 int md_bitmap_setallbits(struct bitmap *bitmap);
249 void md_bitmap_write_all(struct bitmap *bitmap);
251 void md_bitmap_dirty_bits(struct bitmap *bitmap, unsigned long s, unsigned long e);
254 int md_bitmap_startwrite(struct bitmap *bitmap, sector_t offset,
256 void md_bitmap_endwrite(struct bitmap *bitmap, sector_t offset,
[all …]
Dmd-cluster.c607 ret = md_bitmap_resize(mddev->bitmap, in process_recvd_msg()
1128 struct bitmap *bitmap = mddev->bitmap; in resize_bitmaps() local
1129 unsigned long my_pages = bitmap->counts.pages; in resize_bitmaps()
1144 bitmap = get_bitmap_from_slot(mddev, i); in resize_bitmaps()
1145 if (IS_ERR(bitmap)) { in resize_bitmaps()
1147 bitmap = NULL; in resize_bitmaps()
1150 counts = &bitmap->counts; in resize_bitmaps()
1174 md_bitmap_free(bitmap); in resize_bitmaps()
1179 md_bitmap_free(bitmap); in resize_bitmaps()
1194 struct bitmap *bitmap = mddev->bitmap; in cluster_check_sync_size() local
[all …]
/drivers/infiniband/hw/hns/
Dhns_roce_alloc.c39 int hns_roce_bitmap_alloc(struct hns_roce_bitmap *bitmap, unsigned long *obj) in hns_roce_bitmap_alloc() argument
43 spin_lock(&bitmap->lock); in hns_roce_bitmap_alloc()
44 *obj = find_next_zero_bit(bitmap->table, bitmap->max, bitmap->last); in hns_roce_bitmap_alloc()
45 if (*obj >= bitmap->max) { in hns_roce_bitmap_alloc()
46 bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) in hns_roce_bitmap_alloc()
47 & bitmap->mask; in hns_roce_bitmap_alloc()
48 *obj = find_first_zero_bit(bitmap->table, bitmap->max); in hns_roce_bitmap_alloc()
51 if (*obj < bitmap->max) { in hns_roce_bitmap_alloc()
52 set_bit(*obj, bitmap->table); in hns_roce_bitmap_alloc()
53 bitmap->last = (*obj + 1); in hns_roce_bitmap_alloc()
[all …]
Dhns_roce_srq.c110 ret = hns_roce_bitmap_alloc(&srq_table->bitmap, &srq->srqn); in alloc_srqc()
158 hns_roce_bitmap_free(&srq_table->bitmap, srq->srqn, BITMAP_NO_RR); in alloc_srqc()
179 hns_roce_bitmap_free(&srq_table->bitmap, srq->srqn, BITMAP_NO_RR); in free_srqc()
242 idx_que->bitmap = bitmap_zalloc(srq->wqe_cnt, GFP_KERNEL); in alloc_srq_idx()
243 if (!idx_que->bitmap) { in alloc_srq_idx()
261 bitmap_free(idx_que->bitmap); in free_srq_idx()
262 idx_que->bitmap = NULL; in free_srq_idx()
390 return hns_roce_bitmap_init(&srq_table->bitmap, hr_dev->caps.num_srqs, in hns_roce_init_srq_table()
397 hns_roce_bitmap_cleanup(&hr_dev->srq_table.bitmap); in hns_roce_cleanup_srq_table()
Dhns_roce_pd.c98 ret = hns_roce_bitmap_alloc(&hr_dev->uar_table.bitmap, &uar->logic_idx); in hns_roce_uar_alloc()
125 hns_roce_bitmap_free(&hr_dev->uar_table.bitmap, uar->logic_idx, in hns_roce_uar_free()
131 return hns_roce_bitmap_init(&hr_dev->uar_table.bitmap, in hns_roce_init_uar_table()
139 hns_roce_bitmap_cleanup(&hr_dev->uar_table.bitmap); in hns_roce_cleanup_uar_table()
/drivers/net/ethernet/mellanox/mlx4/
Dalloc.c44 u32 mlx4_bitmap_alloc(struct mlx4_bitmap *bitmap) in mlx4_bitmap_alloc() argument
48 spin_lock(&bitmap->lock); in mlx4_bitmap_alloc()
50 obj = find_next_zero_bit(bitmap->table, bitmap->max, bitmap->last); in mlx4_bitmap_alloc()
51 if (obj >= bitmap->max) { in mlx4_bitmap_alloc()
52 bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) in mlx4_bitmap_alloc()
53 & bitmap->mask; in mlx4_bitmap_alloc()
54 obj = find_first_zero_bit(bitmap->table, bitmap->max); in mlx4_bitmap_alloc()
57 if (obj < bitmap->max) { in mlx4_bitmap_alloc()
58 set_bit(obj, bitmap->table); in mlx4_bitmap_alloc()
59 bitmap->last = (obj + 1); in mlx4_bitmap_alloc()
[all …]
Dqp.c552 struct mlx4_bitmap (*bitmap)[MLX4_QP_TABLE_ZONE_NUM] = NULL; in mlx4_create_zones() local
563 bitmap = kmalloc(sizeof(*bitmap), GFP_KERNEL); in mlx4_create_zones()
565 if (NULL == bitmap) { in mlx4_create_zones()
570 err = mlx4_bitmap_init(*bitmap + MLX4_QP_TABLE_ZONE_GENERAL, dev->caps.num_qps, in mlx4_create_zones()
579 err = mlx4_zone_add_one(qp_table->zones, *bitmap + MLX4_QP_TABLE_ZONE_GENERAL, in mlx4_create_zones()
587 err = mlx4_bitmap_init(*bitmap + MLX4_QP_TABLE_ZONE_RSS, in mlx4_create_zones()
598 err = mlx4_zone_add_one(qp_table->zones, *bitmap + MLX4_QP_TABLE_ZONE_RSS, in mlx4_create_zones()
616 for (k = MLX4_QP_TABLE_ZONE_RSS + 1; k < sizeof(*bitmap)/sizeof((*bitmap)[0]); in mlx4_create_zones()
679 *bitmap + MLX4_QP_TABLE_ZONE_RSS, in mlx4_create_zones()
690 err = mlx4_bitmap_init(*bitmap + k, roundup_pow_of_two(size), in mlx4_create_zones()
[all …]
/drivers/s390/cio/
Didset.c16 unsigned long bitmap[]; member
32 memset(set->bitmap, 0, bitmap_size(num_ssid, num_id)); in idset_new()
44 memset(set->bitmap, 0xff, bitmap_size(set->num_ssid, set->num_id)); in idset_fill()
49 set_bit(ssid * set->num_id + id, set->bitmap); in idset_add()
54 clear_bit(ssid * set->num_id + id, set->bitmap); in idset_del()
59 return test_bit(ssid * set->num_id + id, set->bitmap); in idset_contains()
82 bitmap_clear(set->bitmap, pos, set->num_id - schid.sch_no); in idset_sch_del_subseq()
92 return bitmap_empty(set->bitmap, set->num_ssid * set->num_id); in idset_is_empty()
99 bitmap_or(to->bitmap, to->bitmap, from->bitmap, len); in idset_add_set()
/drivers/gpu/drm/i915/selftests/
Di915_syncmap.c62 for_each_set_bit(i, (unsigned long *)&p->bitmap, KSYNCMAP) { in __sync_print()
77 for_each_set_bit(i, (unsigned long *)&p->bitmap, KSYNCMAP) { in __sync_print()
80 last << 1 | !!(p->bitmap >> (i + 1)), in __sync_print()
183 if (hweight32((*sync)->bitmap) != 1) { in check_one()
185 (*sync)->bitmap, hweight32((*sync)->bitmap)); in check_one()
189 err = check_seqno((*sync), ilog2((*sync)->bitmap), seqno); in check_one()
252 if (hweight32((*sync)->bitmap) != 1) { in check_leaf()
254 context, (*sync)->bitmap, hweight32((*sync)->bitmap)); in check_leaf()
258 err = check_seqno((*sync), ilog2((*sync)->bitmap), seqno); in check_leaf()
314 if (hweight32(join->bitmap) != 2) { in igt_syncmap_join_above()
[all …]
/drivers/block/drbd/
Ddrbd_bitmap.c115 struct drbd_bitmap *b = device->bitmap; in __bm_print_lock_info()
126 struct drbd_bitmap *b = device->bitmap; in drbd_bm_lock()
153 struct drbd_bitmap *b = device->bitmap; in drbd_bm_unlock()
159 if (!(BM_LOCKED_MASK & device->bitmap->bm_flags)) in drbd_bm_unlock()
213 struct drbd_bitmap *b = device->bitmap; in bm_page_lock_io()
220 struct drbd_bitmap *b = device->bitmap; in bm_page_unlock_io()
223 wake_up(&device->bitmap->bm_io_wait); in bm_page_unlock_io()
242 device->bitmap->n_bitmap_hints = 0; in drbd_bm_reset_al_hints()
256 struct drbd_bitmap *b = device->bitmap; in drbd_bm_mark_for_writeout()
258 if (page_nr >= device->bitmap->bm_number_of_pages) { in drbd_bm_mark_for_writeout()
[all …]
/drivers/pci/endpoint/
Dpci-epc-mem.c52 unsigned long *bitmap = NULL; in pci_epc_multi_mem_init() local
84 bitmap = kzalloc(bitmap_size, GFP_KERNEL); in pci_epc_multi_mem_init()
85 if (!bitmap) { in pci_epc_multi_mem_init()
95 mem->bitmap = bitmap; in pci_epc_multi_mem_init()
109 kfree(mem->bitmap); in pci_epc_multi_mem_init()
148 kfree(mem->bitmap); in pci_epc_mem_exit()
185 pageno = bitmap_find_free_region(mem->bitmap, mem->pages, in pci_epc_mem_alloc_addr()
193 bitmap_release_region(mem->bitmap, in pci_epc_mem_alloc_addr()
256 bitmap_release_region(mem->bitmap, pageno, order); in pci_epc_mem_free_addr()
/drivers/gpu/drm/qxl/
Dqxl_image.c205 image->u.bitmap.format = SPICE_BITMAP_FMT_1BIT_BE; in qxl_image_init_helper()
208 image->u.bitmap.format = SPICE_BITMAP_FMT_24BIT; in qxl_image_init_helper()
211 image->u.bitmap.format = SPICE_BITMAP_FMT_32BIT; in qxl_image_init_helper()
218 image->u.bitmap.flags = QXL_BITMAP_TOP_DOWN; in qxl_image_init_helper()
219 image->u.bitmap.x = width; in qxl_image_init_helper()
220 image->u.bitmap.y = height; in qxl_image_init_helper()
221 image->u.bitmap.stride = chunk_stride; in qxl_image_init_helper()
222 image->u.bitmap.palette = 0; in qxl_image_init_helper()
223 image->u.bitmap.data = qxl_bo_physical_address(qdev, chunk_bo, 0); in qxl_image_init_helper()
/drivers/gpu/drm/vmwgfx/
Dvmwgfx_page_dirty.c72 unsigned long bitmap[]; member
93 offset, &dirty->bitmap[0], in vmw_bo_dirty_scan_pagetable()
107 offset, &dirty->bitmap[0], in vmw_bo_dirty_scan_pagetable()
148 &dirty->bitmap[0], in vmw_bo_dirty_scan_mkwrite()
150 bitmap_clear(&dirty->bitmap[0], 0, dirty->bitmap_size); in vmw_bo_dirty_scan_mkwrite()
152 bitmap_set(&dirty->bitmap[0], dirty->start, in vmw_bo_dirty_scan_mkwrite()
199 &dirty->bitmap[0], &dirty->start, in vmw_bo_dirty_pre_unmap()
279 &dirty->bitmap[0], in vmw_bo_dirty_add()
345 start = find_next_bit(&dirty->bitmap[0], res_end, cur); in vmw_bo_dirty_transfer_to_res()
349 end = find_next_zero_bit(&dirty->bitmap[0], res_end, start + 1); in vmw_bo_dirty_transfer_to_res()
[all …]
/drivers/gpu/drm/i915/
Di915_syncmap.c76 unsigned int bitmap; member
95 BUILD_BUG_ON(KSYNCMAP > BITS_PER_TYPE((*root)->bitmap)); in i915_syncmap_init()
192 if (!(p->bitmap & BIT(idx))) in i915_syncmap_is_later()
209 p->bitmap = 0; in __sync_alloc_leaf()
218 p->bitmap |= BIT(idx); in __sync_set_seqno()
226 p->bitmap |= BIT(idx); in __sync_set_child()
300 GEM_BUG_ON(!(p->parent->bitmap & BIT(idx))); in __sync_set()
374 while ((i = ffs(p->bitmap))) { in __sync_free()
375 p->bitmap &= ~0u << i; in __sync_free()
/drivers/net/ethernet/mellanox/mlx5/core/lib/
Dmpfs.c76 unsigned long *bitmap; member
83 *ix = find_first_zero_bit(l2table->bitmap, l2table->size); in alloc_l2table_index()
87 __set_bit(*ix, l2table->bitmap); in alloc_l2table_index()
94 __clear_bit(ix, l2table->bitmap); in free_l2table_index()
111 mpfs->bitmap = bitmap_zalloc(l2table_size, GFP_KERNEL); in mlx5_mpfs_init()
112 if (!mpfs->bitmap) { in mlx5_mpfs_init()
129 bitmap_free(mpfs->bitmap); in mlx5_mpfs_cleanup()
/drivers/net/ethernet/mellanox/mlx5/core/
Dalloc.c46 unsigned long *bitmap; member
190 pgdir->bitmap = bitmap_zalloc(db_per_page, GFP_KERNEL); in mlx5_alloc_db_pgdir()
191 if (!pgdir->bitmap) { in mlx5_alloc_db_pgdir()
196 bitmap_fill(pgdir->bitmap, db_per_page); in mlx5_alloc_db_pgdir()
201 bitmap_free(pgdir->bitmap); in mlx5_alloc_db_pgdir()
216 i = find_first_bit(pgdir->bitmap, db_per_page); in mlx5_alloc_db_from_pgdir()
220 __clear_bit(i, pgdir->bitmap); in mlx5_alloc_db_from_pgdir()
275 __set_bit(db->index, db->u.pgdir->bitmap); in mlx5_db_free()
277 if (bitmap_full(db->u.pgdir->bitmap, db_per_page)) { in mlx5_db_free()
281 bitmap_free(db->u.pgdir->bitmap); in mlx5_db_free()
Duar.c210 unsigned long *bitmap; in alloc_bfreg() local
236 bitmap = up->fp_bitmap; in alloc_bfreg()
239 bitmap = up->reg_bitmap; in alloc_bfreg()
242 dbi = find_first_bit(bitmap, up->bfregs); in alloc_bfreg()
243 clear_bit(dbi, bitmap); in alloc_bfreg()
297 unsigned long *bitmap; in mlx5_free_bfreg() local
313 bitmap = up->fp_bitmap; in mlx5_free_bfreg()
316 bitmap = up->reg_bitmap; in mlx5_free_bfreg()
320 set_bit(dbi, bitmap); in mlx5_free_bfreg()
/drivers/cpufreq/
Dspeedstep-lib.c39 u8 bitmap; /* power on configuration bits in pentium3_get_frequency() member
62 u8 bitmap; /* power on configuration bits [18: 19] in pentium3_get_frequency() member
82 while (msr_tmp != msr_decode_fsb[i].bitmap) { in pentium3_get_frequency()
83 if (msr_decode_fsb[i].bitmap == 0xff) in pentium3_get_frequency()
95 while (msr_lo != msr_decode_mult[j].bitmap) { in pentium3_get_frequency()
96 if (msr_decode_mult[j].bitmap == 0xff) in pentium3_get_frequency()
/drivers/staging/comedi/drivers/
Dni_usb6501.c170 unsigned int val, u8 *bitmap) in ni6501_port_command() argument
178 if (command != SET_PORT_DIR && !bitmap) in ni6501_port_command()
195 tx[17] = *bitmap; in ni6501_port_command()
233 *bitmap = devpriv->usb_rx_buf[14]; in ni6501_port_command()
367 u8 bitmap; in ni6501_dio_insn_bits() local
373 bitmap = (s->state >> port * 8) & 0xFF; in ni6501_dio_insn_bits()
375 port, &bitmap); in ni6501_dio_insn_bits()
384 ret = ni6501_port_command(dev, READ_PORT, port, &bitmap); in ni6501_dio_insn_bits()
387 data[1] |= bitmap << port * 8; in ni6501_dio_insn_bits()
/drivers/hid/
Dhid-picolcd_fb.c141 static int picolcd_fb_update_tile(u8 *vbitmap, const u8 *bitmap, int bpp, in picolcd_fb_update_tile() argument
150 const u8 *bdata = bitmap + tile * 256 + chip * 8 + b * 32; in picolcd_fb_update_tile()
158 const u8 *bdata = bitmap + (tile * 256 + chip * 8 + b * 32) * 8; in picolcd_fb_update_tile()
211 memset(fbdata->bitmap, 0, PICOLCDFB_SIZE*fbdata->bpp); in picolcd_fb_reset()
250 fbdata->vbitmap, fbdata->bitmap, in picolcd_fb_update()
386 o_fb = fbdata->bitmap; in picolcd_set_par()
538 fbdata->bitmap = vmalloc(PICOLCDFB_SIZE*8); in picolcd_init_framebuffer()
539 if (fbdata->bitmap == NULL) { in picolcd_init_framebuffer()
543 info->screen_base = (char __force __iomem *)fbdata->bitmap; in picolcd_init_framebuffer()
544 info->fix.smem_start = (unsigned long)fbdata->bitmap; in picolcd_init_framebuffer()
[all …]
/drivers/pci/controller/
Dpci-xgene-msi.c38 unsigned long *bitmap; member
202 msi_irq = bitmap_find_next_zero_area(msi->bitmap, NR_MSI_VEC, 0, in xgene_irq_domain_alloc()
205 bitmap_set(msi->bitmap, msi_irq, msi->num_cpus); in xgene_irq_domain_alloc()
231 bitmap_clear(msi->bitmap, hwirq, msi->num_cpus); in xgene_irq_domain_free()
274 xgene_msi->bitmap = kzalloc(size, GFP_KERNEL); in xgene_msi_init_allocator()
275 if (!xgene_msi->bitmap) in xgene_msi_init_allocator()
366 kfree(msi->bitmap); in xgene_msi_remove()
367 msi->bitmap = NULL; in xgene_msi_remove()
/drivers/staging/rtl8188eu/hal/
Drtl8188e_cmd.c111 void rtw_hal_add_ra_tid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi_level) in rtw_hal_add_ra_tid() argument
118 raid = (bitmap >> 28) & 0x0f; in rtw_hal_add_ra_tid()
119 bitmap &= 0x0fffffff; in rtw_hal_add_ra_tid()
122 bitmap = ODM_Get_Rate_Bitmap(odmpriv, macid, bitmap, rssi_level); in rtw_hal_add_ra_tid()
124 bitmap |= ((raid << 28) & 0xf0000000); in rtw_hal_add_ra_tid()
126 init_rate = get_highest_rate_idx(bitmap & 0x0fffffff) & 0x3f; in rtw_hal_add_ra_tid()
133 raid = (bitmap >> 28) & 0x0f; in rtw_hal_add_ra_tid()
135 bitmap &= 0x0fffffff; in rtw_hal_add_ra_tid()
138 __func__, macid, raid, bitmap, shortGIrate); in rtw_hal_add_ra_tid()
140 ODM_RA_UpdateRateInfo_8188E(odmpriv, macid, raid, bitmap, shortGIrate); in rtw_hal_add_ra_tid()
/drivers/vfio/
Dvfio_iommu_type1.c98 unsigned long *bitmap; member
221 dma->bitmap = kvzalloc(DIRTY_BITMAP_BYTES(npages) + sizeof(u64), in vfio_dma_bitmap_alloc()
223 if (!dma->bitmap) in vfio_dma_bitmap_alloc()
231 kfree(dma->bitmap); in vfio_dma_bitmap_free()
232 dma->bitmap = NULL; in vfio_dma_bitmap_free()
243 bitmap_set(dma->bitmap, (vpfn->iova - dma->iova) >> pgshift, 1); in vfio_dma_populate_bitmap()
255 bitmap_set(dma->bitmap, 0, dma->size >> pgshift); in vfio_iommu_populate_bitmap_full()
791 bitmap_set(dma->bitmap, in vfio_iommu_type1_pin_pages()
1064 static int update_user_bitmap(u64 __user *bitmap, struct vfio_iommu *iommu, in update_user_bitmap() argument
1080 bitmap_set(dma->bitmap, 0, nbits); in update_user_bitmap()
[all …]
/drivers/net/wireless/realtek/rtlwifi/
Dcam.c260 u32 bitmap = (rtlpriv->sec.hwsec_cam_bitmap) >> 4; in rtl_cam_get_free_entry() local
276 if ((bitmap & BIT(0)) == 0) { in rtl_cam_get_free_entry()
284 bitmap = bitmap >> 1; in rtl_cam_get_free_entry()
293 u32 bitmap; in rtl_cam_del_entry() local
308 bitmap = (rtlpriv->sec.hwsec_cam_bitmap) >> i; in rtl_cam_del_entry()
309 if (((bitmap & BIT(0)) == BIT(0)) && in rtl_cam_del_entry()

12345678