Home
last modified time | relevance | path

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

123456789

/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 …]
/drivers/vfio/
Diova_bitmap.c102 u8 __user *bitmap; member
126 static unsigned long iova_bitmap_offset_to_index(struct iova_bitmap *bitmap, in iova_bitmap_offset_to_index() argument
129 unsigned long pgsize = 1 << bitmap->mapped.pgshift; in iova_bitmap_offset_to_index()
131 return iova / (BITS_PER_TYPE(*bitmap->bitmap) * pgsize); in iova_bitmap_offset_to_index()
137 static unsigned long iova_bitmap_index_to_offset(struct iova_bitmap *bitmap, in iova_bitmap_index_to_offset() argument
140 unsigned long pgshift = bitmap->mapped.pgshift; in iova_bitmap_index_to_offset()
142 return (index * BITS_PER_TYPE(*bitmap->bitmap)) << pgshift; in iova_bitmap_index_to_offset()
148 static unsigned long iova_bitmap_mapped_iova(struct iova_bitmap *bitmap) in iova_bitmap_mapped_iova() argument
150 unsigned long skip = bitmap->mapped_base_index; in iova_bitmap_mapped_iova()
152 return bitmap->iova + iova_bitmap_index_to_offset(bitmap, skip); in iova_bitmap_mapped_iova()
[all …]
Dvfio_iommu_type1.c102 unsigned long *bitmap; member
251 dma->bitmap = kvzalloc(DIRTY_BITMAP_BYTES(npages) + sizeof(u64), in vfio_dma_bitmap_alloc()
253 if (!dma->bitmap) in vfio_dma_bitmap_alloc()
261 kvfree(dma->bitmap); in vfio_dma_bitmap_free()
262 dma->bitmap = NULL; in vfio_dma_bitmap_free()
273 bitmap_set(dma->bitmap, (vpfn->iova - dma->iova) >> pgshift, 1); in vfio_dma_populate_bitmap()
285 bitmap_set(dma->bitmap, 0, dma->size >> pgshift); in vfio_iommu_populate_bitmap_full()
960 bitmap_set(dma->bitmap, in vfio_iommu_type1_pin_pages()
1233 static int update_user_bitmap(u64 __user *bitmap, struct vfio_iommu *iommu, in update_user_bitmap() argument
1249 bitmap_set(dma->bitmap, 0, nbits); in update_user_bitmap()
[all …]
/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/net/ethernet/mellanox/mlx5/core/steering/
Ddr_buddy.c21 buddy->bitmap = kcalloc(buddy->max_order + 1, in mlx5dr_buddy_init()
22 sizeof(*buddy->bitmap), in mlx5dr_buddy_init()
28 if (!buddy->bitmap || !buddy->num_free) in mlx5dr_buddy_init()
36 buddy->bitmap[i] = bitmap_zalloc(size, GFP_KERNEL); in mlx5dr_buddy_init()
37 if (!buddy->bitmap[i]) in mlx5dr_buddy_init()
45 bitmap_set(buddy->bitmap[buddy->max_order], 0, 1); in mlx5dr_buddy_init()
53 bitmap_free(buddy->bitmap[i]); in mlx5dr_buddy_init()
57 kfree(buddy->bitmap); in mlx5dr_buddy_init()
68 bitmap_free(buddy->bitmap[i]); in mlx5dr_buddy_cleanup()
71 kfree(buddy->bitmap); in mlx5dr_buddy_cleanup()
[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/vmwgfx/
Dvmwgfx_page_dirty.c70 unsigned long bitmap[]; member
91 offset, &dirty->bitmap[0], in vmw_bo_dirty_scan_pagetable()
105 offset, &dirty->bitmap[0], in vmw_bo_dirty_scan_pagetable()
146 &dirty->bitmap[0], in vmw_bo_dirty_scan_mkwrite()
148 bitmap_clear(&dirty->bitmap[0], 0, dirty->bitmap_size); in vmw_bo_dirty_scan_mkwrite()
150 bitmap_set(&dirty->bitmap[0], dirty->start, in vmw_bo_dirty_scan_mkwrite()
197 &dirty->bitmap[0], &dirty->start, in vmw_bo_dirty_pre_unmap()
265 &dirty->bitmap[0], in vmw_bo_dirty_add()
327 start = find_next_bit(&dirty->bitmap[0], res_end, cur); in vmw_bo_dirty_transfer_to_res()
331 end = find_next_zero_bit(&dirty->bitmap[0], res_end, start + 1); in vmw_bo_dirty_transfer_to_res()
[all …]
/drivers/net/ethernet/mellanox/mlx5/core/
Dalloc.c46 unsigned long *bitmap; member
143 pgdir->bitmap = bitmap_zalloc_node(db_per_page, GFP_KERNEL, node); in mlx5_alloc_db_pgdir()
144 if (!pgdir->bitmap) { in mlx5_alloc_db_pgdir()
149 bitmap_fill(pgdir->bitmap, db_per_page); in mlx5_alloc_db_pgdir()
154 bitmap_free(pgdir->bitmap); in mlx5_alloc_db_pgdir()
169 i = find_first_bit(pgdir->bitmap, db_per_page); in mlx5_alloc_db_from_pgdir()
173 __clear_bit(i, pgdir->bitmap); in mlx5_alloc_db_from_pgdir()
222 __set_bit(db->index, db->u.pgdir->bitmap); in mlx5_db_free()
224 if (bitmap_full(db->u.pgdir->bitmap, db_per_page)) { in mlx5_db_free()
228 bitmap_free(db->u.pgdir->bitmap); in mlx5_db_free()
Duar.c211 unsigned long *bitmap; in alloc_bfreg() local
237 bitmap = up->fp_bitmap; in alloc_bfreg()
240 bitmap = up->reg_bitmap; in alloc_bfreg()
243 dbi = find_first_bit(bitmap, up->bfregs); in alloc_bfreg()
244 clear_bit(dbi, bitmap); in alloc_bfreg()
298 unsigned long *bitmap; in mlx5_free_bfreg() local
314 bitmap = up->fp_bitmap; in mlx5_free_bfreg()
317 bitmap = up->reg_bitmap; in mlx5_free_bfreg()
321 set_bit(dbi, bitmap); in mlx5_free_bfreg()
/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/tee/optee/
Dnotif.c53 if (test_bit(key, optee->notif.bitmap)) { in optee_notif_wait()
54 clear_bit(key, optee->notif.bitmap); in optee_notif_wait()
102 set_bit(key, optee->notif.bitmap); in optee_notif_send()
113 optee->notif.bitmap = bitmap_zalloc(max_key, GFP_KERNEL); in optee_notif_init()
114 if (!optee->notif.bitmap) in optee_notif_init()
124 bitmap_free(optee->notif.bitmap); in optee_notif_uninit()
/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/wireless/ath/wcn36xx/
Dfirmware.c81 void wcn36xx_firmware_set_feat_caps(u32 *bitmap, in wcn36xx_firmware_set_feat_caps() argument
93 bitmap[arr_idx] |= (1 << bit_idx); in wcn36xx_firmware_set_feat_caps()
96 int wcn36xx_firmware_get_feat_caps(u32 *bitmap, in wcn36xx_firmware_get_feat_caps() argument
109 return (bitmap[arr_idx] & (1 << bit_idx)) ? 1 : 0; in wcn36xx_firmware_get_feat_caps()
112 void wcn36xx_firmware_clear_feat_caps(u32 *bitmap, in wcn36xx_firmware_clear_feat_caps() argument
124 bitmap[arr_idx] &= ~(1 << bit_idx); in wcn36xx_firmware_clear_feat_caps()
Dfirmware.h74 void wcn36xx_firmware_set_feat_caps(u32 *bitmap,
76 int wcn36xx_firmware_get_feat_caps(u32 *bitmap,
78 void wcn36xx_firmware_clear_feat_caps(u32 *bitmap,
/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/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/comedi/drivers/
Dni_usb6501.c169 unsigned int val, u8 *bitmap) in ni6501_port_command() argument
177 if (command != SET_PORT_DIR && !bitmap) in ni6501_port_command()
194 tx[17] = *bitmap; in ni6501_port_command()
232 *bitmap = devpriv->usb_rx_buf[14]; in ni6501_port_command()
366 u8 bitmap; in ni6501_dio_insn_bits() local
372 bitmap = (s->state >> port * 8) & 0xFF; in ni6501_dio_insn_bits()
374 port, &bitmap); in ni6501_dio_insn_bits()
383 ret = ni6501_port_command(dev, READ_PORT, port, &bitmap); in ni6501_dio_insn_bits()
386 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()
539 fbdata->bitmap = vmalloc(PICOLCDFB_SIZE*8); in picolcd_init_framebuffer()
540 if (fbdata->bitmap == NULL) { in picolcd_init_framebuffer()
544 info->screen_base = (char __force __iomem *)fbdata->bitmap; in picolcd_init_framebuffer()
545 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()
272 xgene_msi->bitmap = bitmap_zalloc(NR_MSI_VEC, GFP_KERNEL); in xgene_msi_init_allocator()
273 if (!xgene_msi->bitmap) in xgene_msi_init_allocator()
361 bitmap_free(msi->bitmap); in xgene_msi_remove()
362 msi->bitmap = NULL; in xgene_msi_remove()
/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()

123456789