Home
last modified time | relevance | path

Searched refs:bitmap (Results 1 – 25 of 199) 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.c606 ret = md_bitmap_resize(mddev->bitmap, in process_recvd_msg()
1127 struct bitmap *bitmap = mddev->bitmap; in resize_bitmaps() local
1128 unsigned long my_pages = bitmap->counts.pages; in resize_bitmaps()
1143 bitmap = get_bitmap_from_slot(mddev, i); in resize_bitmaps()
1144 if (IS_ERR(bitmap)) { in resize_bitmaps()
1146 bitmap = NULL; in resize_bitmaps()
1149 counts = &bitmap->counts; in resize_bitmaps()
1173 md_bitmap_free(bitmap); in resize_bitmaps()
1178 md_bitmap_free(bitmap); in resize_bitmaps()
1193 struct bitmap *bitmap = mddev->bitmap; in cluster_check_sync_size() local
[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.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/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/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/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()
363 kfree(msi->bitmap); in xgene_msi_remove()
364 msi->bitmap = NULL; in xgene_msi_remove()
/drivers/vfio/
Dvfio_iommu_type1.c102 unsigned long *bitmap; member
255 dma->bitmap = kvzalloc(DIRTY_BITMAP_BYTES(npages) + sizeof(u64), in vfio_dma_bitmap_alloc()
257 if (!dma->bitmap) in vfio_dma_bitmap_alloc()
265 kfree(dma->bitmap); in vfio_dma_bitmap_free()
266 dma->bitmap = NULL; in vfio_dma_bitmap_free()
277 bitmap_set(dma->bitmap, (vpfn->iova - dma->iova) >> pgshift, 1); in vfio_dma_populate_bitmap()
289 bitmap_set(dma->bitmap, 0, dma->size >> pgshift); in vfio_iommu_populate_bitmap_full()
950 bitmap_set(dma->bitmap, in vfio_iommu_type1_pin_pages()
1227 static int update_user_bitmap(u64 __user *bitmap, struct vfio_iommu *iommu, in update_user_bitmap() argument
1243 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()
/drivers/pci/pcie/
Drcec.c26 unsigned long bitmap = rcec->rcec_ea->bitmap; in rcec_assoc_rciep() local
34 for_each_set_bit(devn, &bitmap, 32) in rcec_assoc_rciep()
168 &rcec_ea->bitmap); in pci_rcec_init()
/drivers/irqchip/
Dirq-partition-percpu.c21 unsigned long *bitmap; member
122 for_each_set_bit(hwirq, part->bitmap, part->nr_parts) { in partition_handle_irq()
151 set_bit(hwirq, part->bitmap); in partition_domain_alloc()
218 desc->bitmap = bitmap_zalloc(nr_parts, GFP_KERNEL); in partition_create_desc()
219 if (WARN_ON(!desc->bitmap)) in partition_create_desc()
/drivers/gpu/drm/omapdrm/
Dtcm-sita.c169 ret = r2l_b2t_1d(num_slots, &pos, tcm->bitmap, tcm->map_size); in sita_reserve_1d()
189 ret = l2r_t2b(w, h, align, offset, &pos, slot_bytes, tcm->bitmap, in sita_reserve_2d()
223 free_slots(pos, w, h, tcm->bitmap, tcm->width); in sita_free()
249 tcm->bitmap = (unsigned long *)(tcm + 1); in sita_init()
250 bitmap_clear(tcm->bitmap, 0, width*height); in sita_init()

12345678