/drivers/s390/cio/ |
D | itcw.c | 181 void *chunk; in itcw_init() local 193 chunk = fit_chunk(&start, end, sizeof(struct itcw), 1, 0); in itcw_init() 194 if (IS_ERR(chunk)) in itcw_init() 195 return chunk; in itcw_init() 196 itcw = chunk; in itcw_init() 209 chunk = fit_chunk(&start, end, sizeof(struct tcw), 64, 0); in itcw_init() 210 if (IS_ERR(chunk)) in itcw_init() 211 return chunk; in itcw_init() 212 itcw->tcw = chunk; in itcw_init() 217 chunk = fit_chunk(&start, end, sizeof(struct tcw), 64, 0); in itcw_init() [all …]
|
/drivers/net/ethernet/mellanox/mlx4/ |
D | icm.c | 54 static void mlx4_free_icm_pages(struct mlx4_dev *dev, struct mlx4_icm_chunk *chunk) in mlx4_free_icm_pages() argument 58 if (chunk->nsg > 0) in mlx4_free_icm_pages() 59 pci_unmap_sg(dev->persist->pdev, chunk->mem, chunk->npages, in mlx4_free_icm_pages() 62 for (i = 0; i < chunk->npages; ++i) in mlx4_free_icm_pages() 63 __free_pages(sg_page(&chunk->mem[i]), in mlx4_free_icm_pages() 64 get_order(chunk->mem[i].length)); in mlx4_free_icm_pages() 67 static void mlx4_free_icm_coherent(struct mlx4_dev *dev, struct mlx4_icm_chunk *chunk) in mlx4_free_icm_coherent() argument 71 for (i = 0; i < chunk->npages; ++i) in mlx4_free_icm_coherent() 73 chunk->mem[i].length, in mlx4_free_icm_coherent() 74 lowmem_page_address(sg_page(&chunk->mem[i])), in mlx4_free_icm_coherent() [all …]
|
D | icm.h | 64 struct mlx4_icm_chunk *chunk; member 91 iter->chunk = list_empty(&icm->chunk_list) ? in mlx4_icm_first() 99 return !iter->chunk; in mlx4_icm_last() 104 if (++iter->page_idx >= iter->chunk->nsg) { in mlx4_icm_next() 105 if (iter->chunk->list.next == &iter->icm->chunk_list) { in mlx4_icm_next() 106 iter->chunk = NULL; in mlx4_icm_next() 110 iter->chunk = list_entry(iter->chunk->list.next, in mlx4_icm_next() 118 return sg_dma_address(&iter->chunk->mem[iter->page_idx]); in mlx4_icm_addr() 123 return sg_dma_len(&iter->chunk->mem[iter->page_idx]); in mlx4_icm_size()
|
/drivers/infiniband/hw/i40iw/ |
D | i40iw_pble.c | 53 static void i40iw_free_vmalloc_mem(struct i40iw_hw *hw, struct i40iw_chunk *chunk); 63 struct i40iw_chunk *chunk; in i40iw_destroy_pble_pool() local 68 chunk = list_entry(clist, struct i40iw_chunk, list); in i40iw_destroy_pble_pool() 69 if (chunk->type == I40IW_VMALLOC) in i40iw_destroy_pble_pool() 70 i40iw_free_vmalloc_mem(dev->hw, chunk); in i40iw_destroy_pble_pool() 71 kfree(chunk); in i40iw_destroy_pble_pool() 138 struct i40iw_chunk *chunk = info->chunk; in add_sd_direct() local 151 chunk->type = I40IW_DMA_COHERENT; in add_sd_direct() 155 chunk->size = info->pages << I40IW_HMC_PAGED_BP_SHIFT; in add_sd_direct() 156 chunk->vaddr = ((u8 *)sd_entry->u.bp.addr.va + offset); in add_sd_direct() [all …]
|
/drivers/infiniband/hw/mthca/ |
D | mthca_memfree.c | 64 static void mthca_free_icm_pages(struct mthca_dev *dev, struct mthca_icm_chunk *chunk) in mthca_free_icm_pages() argument 68 if (chunk->nsg > 0) in mthca_free_icm_pages() 69 pci_unmap_sg(dev->pdev, chunk->mem, chunk->npages, in mthca_free_icm_pages() 72 for (i = 0; i < chunk->npages; ++i) in mthca_free_icm_pages() 73 __free_pages(sg_page(&chunk->mem[i]), in mthca_free_icm_pages() 74 get_order(chunk->mem[i].length)); in mthca_free_icm_pages() 77 static void mthca_free_icm_coherent(struct mthca_dev *dev, struct mthca_icm_chunk *chunk) in mthca_free_icm_coherent() argument 81 for (i = 0; i < chunk->npages; ++i) { in mthca_free_icm_coherent() 82 dma_free_coherent(&dev->pdev->dev, chunk->mem[i].length, in mthca_free_icm_coherent() 83 lowmem_page_address(sg_page(&chunk->mem[i])), in mthca_free_icm_coherent() [all …]
|
D | mthca_memfree.h | 76 struct mthca_icm_chunk *chunk; member 103 iter->chunk = list_empty(&icm->chunk_list) ? in mthca_icm_first() 111 return !iter->chunk; in mthca_icm_last() 116 if (++iter->page_idx >= iter->chunk->nsg) { in mthca_icm_next() 117 if (iter->chunk->list.next == &iter->icm->chunk_list) { in mthca_icm_next() 118 iter->chunk = NULL; in mthca_icm_next() 122 iter->chunk = list_entry(iter->chunk->list.next, in mthca_icm_next() 130 return sg_dma_address(&iter->chunk->mem[iter->page_idx]); in mthca_icm_addr() 135 return sg_dma_len(&iter->chunk->mem[iter->page_idx]); in mthca_icm_size()
|
/drivers/infiniband/hw/hns/ |
D | hns_roce_hem.c | 48 struct hns_roce_hem_chunk *chunk = NULL; in hns_roce_alloc_hem() local 67 if (!chunk) { in hns_roce_alloc_hem() 68 chunk = kmalloc(sizeof(*chunk), in hns_roce_alloc_hem() 70 if (!chunk) in hns_roce_alloc_hem() 73 sg_init_table(chunk->mem, HNS_ROCE_HEM_CHUNK_LEN); in hns_roce_alloc_hem() 74 chunk->npages = 0; in hns_roce_alloc_hem() 75 chunk->nsg = 0; in hns_roce_alloc_hem() 76 list_add_tail(&chunk->list, &hem->chunk_list); in hns_roce_alloc_hem() 86 mem = &chunk->mem[chunk->npages]; in hns_roce_alloc_hem() 96 ++chunk->npages; in hns_roce_alloc_hem() [all …]
|
D | hns_roce_hem.h | 76 struct hns_roce_hem_chunk *chunk; member 105 iter->chunk = list_empty(&hem->chunk_list) ? NULL : in hns_roce_hem_first() 113 return !iter->chunk; in hns_roce_hem_last() 118 if (++iter->page_idx >= iter->chunk->nsg) { in hns_roce_hem_next() 119 if (iter->chunk->list.next == &iter->hem->chunk_list) { in hns_roce_hem_next() 120 iter->chunk = NULL; in hns_roce_hem_next() 124 iter->chunk = list_entry(iter->chunk->list.next, in hns_roce_hem_next() 132 return sg_dma_address(&iter->chunk->mem[iter->page_idx]); in hns_roce_hem_addr()
|
/drivers/gpu/drm/qxl/ |
D | qxl_image.c | 38 struct qxl_drm_chunk *chunk; in qxl_allocate_chunk() local 41 chunk = kmalloc(sizeof(struct qxl_drm_chunk), GFP_KERNEL); in qxl_allocate_chunk() 42 if (!chunk) in qxl_allocate_chunk() 45 ret = qxl_alloc_bo_reserved(qdev, release, chunk_size, &chunk->bo); in qxl_allocate_chunk() 47 kfree(chunk); in qxl_allocate_chunk() 51 list_add_tail(&chunk->head, &image->chunk_list); in qxl_allocate_chunk() 88 struct qxl_drm_chunk *chunk, *tmp; in qxl_image_free_objects() local 90 list_for_each_entry_safe(chunk, tmp, &dimage->chunk_list, head) { in qxl_image_free_objects() 91 qxl_bo_unref(&chunk->bo); in qxl_image_free_objects() 92 kfree(chunk); in qxl_image_free_objects() [all …]
|
/drivers/infiniband/hw/usnic/ |
D | usnic_vnic.c | 96 struct usnic_vnic_res_chunk *chunk; in usnic_vnic_dump() local 119 chunk = &vnic->chunks[i]; in usnic_vnic_dump() 120 for (j = 0; j < chunk->cnt; j++) { in usnic_vnic_dump() 121 res = chunk->res[j]; in usnic_vnic_dump() 279 void usnic_vnic_put_resources(struct usnic_vnic_res_chunk *chunk) in usnic_vnic_put_resources() argument 284 struct usnic_vnic *vnic = chunk->vnic; in usnic_vnic_put_resources() 286 if (chunk->cnt > 0) { in usnic_vnic_put_resources() 288 while ((i = --chunk->cnt) >= 0) { in usnic_vnic_put_resources() 289 res = chunk->res[i]; in usnic_vnic_put_resources() 290 chunk->res[i] = NULL; in usnic_vnic_put_resources() [all …]
|
D | usnic_uiom.c | 80 struct usnic_uiom_chunk *chunk, *tmp; in usnic_uiom_put_pages() local 86 list_for_each_entry_safe(chunk, tmp, chunk_list, list) { in usnic_uiom_put_pages() 87 for_each_sg(chunk->page_list, sg, chunk->nents, i) { in usnic_uiom_put_pages() 95 kfree(chunk); in usnic_uiom_put_pages() 104 struct usnic_uiom_chunk *chunk; in usnic_uiom_get_pages() local 157 chunk = kmalloc(sizeof(*chunk) + in usnic_uiom_get_pages() 161 if (!chunk) { in usnic_uiom_get_pages() 166 chunk->nents = min_t(int, ret, USNIC_UIOM_PAGE_CHUNK); in usnic_uiom_get_pages() 167 sg_init_table(chunk->page_list, chunk->nents); in usnic_uiom_get_pages() 168 for_each_sg(chunk->page_list, sg, chunk->nents, i) { in usnic_uiom_get_pages() [all …]
|
D | usnic_ib_verbs.c | 64 struct usnic_vnic_res_chunk *chunk; in usnic_ib_fill_create_qp_resp() local 89 chunk = usnic_ib_qp_grp_get_chunk(qp_grp, USNIC_VNIC_RES_TYPE_RQ); in usnic_ib_fill_create_qp_resp() 90 if (IS_ERR_OR_NULL(chunk)) { in usnic_ib_fill_create_qp_resp() 94 PTR_ERR(chunk)); in usnic_ib_fill_create_qp_resp() 95 return chunk ? PTR_ERR(chunk) : -ENOMEM; in usnic_ib_fill_create_qp_resp() 98 WARN_ON(chunk->type != USNIC_VNIC_RES_TYPE_RQ); in usnic_ib_fill_create_qp_resp() 99 resp.rq_cnt = chunk->cnt; in usnic_ib_fill_create_qp_resp() 100 for (i = 0; i < chunk->cnt; i++) in usnic_ib_fill_create_qp_resp() 101 resp.rq_idx[i] = chunk->res[i]->vnic_idx; in usnic_ib_fill_create_qp_resp() 103 chunk = usnic_ib_qp_grp_get_chunk(qp_grp, USNIC_VNIC_RES_TYPE_WQ); in usnic_ib_fill_create_qp_resp() [all …]
|
/drivers/s390/block/ |
D | dasd_int.h | 596 struct dasd_mchunk *chunk; in dasd_init_chunklist() local 599 chunk = (struct dasd_mchunk *) mem; in dasd_init_chunklist() 600 chunk->size = size - sizeof(struct dasd_mchunk); in dasd_init_chunklist() 601 list_add(&chunk->list, chunk_list); in dasd_init_chunklist() 607 struct dasd_mchunk *chunk, *tmp; in dasd_alloc_chunk() local 610 list_for_each_entry(chunk, chunk_list, list) { in dasd_alloc_chunk() 611 if (chunk->size < size) in dasd_alloc_chunk() 613 if (chunk->size > size + sizeof(struct dasd_mchunk)) { in dasd_alloc_chunk() 614 char *endaddr = (char *) (chunk + 1) + chunk->size; in dasd_alloc_chunk() 617 chunk->size -= size + sizeof(struct dasd_mchunk); in dasd_alloc_chunk() [all …]
|
/drivers/media/usb/usbtv/ |
D | usbtv.h | 63 #define USBTV_MAGIC_OK(chunk) ((be32_to_cpu(chunk[0]) & 0xff000000) \ argument 65 #define USBTV_FRAME_ID(chunk) ((be32_to_cpu(chunk[0]) & 0x00ff0000) >> 16) argument 66 #define USBTV_ODD(chunk) ((be32_to_cpu(chunk[0]) & 0x0000f000) >> 15) argument 67 #define USBTV_CHUNK_NO(chunk) (be32_to_cpu(chunk[0]) & 0x00000fff) argument
|
/drivers/media/usb/go7007/ |
D | go7007-fw.c | 378 int size = 0, i, off = 0, chunk; in gen_mjpeghdr_to_package() local 388 chunk = mjpeg_frame_header(go, buf + size, 1); in gen_mjpeghdr_to_package() 389 memmove(buf + size, buf + size + 80, chunk - 80); in gen_mjpeghdr_to_package() 390 size += chunk - 80; in gen_mjpeghdr_to_package() 392 for (i = 0; i < size; i += chunk * 2) { in gen_mjpeghdr_to_package() 400 chunk = 28; in gen_mjpeghdr_to_package() 401 if (mem + chunk > 0x4000) in gen_mjpeghdr_to_package() 402 chunk = 0x4000 - mem; in gen_mjpeghdr_to_package() 403 if (i + 2 * chunk > size) in gen_mjpeghdr_to_package() 404 chunk = (size - i) / 2; in gen_mjpeghdr_to_package() [all …]
|
/drivers/dma/sh/ |
D | rcar-dmac.c | 347 struct rcar_dmac_xfer_chunk *chunk; in rcar_dmac_chan_start_xfer() local 371 chunk = list_first_entry(&desc->chunks, in rcar_dmac_chan_start_xfer() 374 chunk->dst_addr & 0xffffffff); in rcar_dmac_chan_start_xfer() 404 struct rcar_dmac_xfer_chunk *chunk = desc->running; in rcar_dmac_chan_start_xfer() local 408 chan->index, chunk, chunk->size, &chunk->src_addr, in rcar_dmac_chan_start_xfer() 409 &chunk->dst_addr); in rcar_dmac_chan_start_xfer() 413 chunk->src_addr >> 32); in rcar_dmac_chan_start_xfer() 415 chunk->dst_addr >> 32); in rcar_dmac_chan_start_xfer() 418 chunk->src_addr & 0xffffffff); in rcar_dmac_chan_start_xfer() 420 chunk->dst_addr & 0xffffffff); in rcar_dmac_chan_start_xfer() [all …]
|
D | shdma-base.c | 75 struct shdma_desc *chunk, *c, *desc = in shdma_tx_submit() local 89 list_for_each_entry_safe(chunk, c, desc->node.prev, node) { in shdma_tx_submit() 94 if (chunk != desc && (chunk->mark == DESC_IDLE || in shdma_tx_submit() 95 chunk->async_tx.cookie > 0 || in shdma_tx_submit() 96 chunk->async_tx.cookie == -EBUSY || in shdma_tx_submit() 97 &chunk->node == &schan->ld_free)) in shdma_tx_submit() 99 chunk->mark = DESC_SUBMITTED; in shdma_tx_submit() 100 if (chunk->chunks == 1) { in shdma_tx_submit() 101 chunk->async_tx.callback = callback; in shdma_tx_submit() 102 chunk->async_tx.callback_param = tx->callback_param; in shdma_tx_submit() [all …]
|
/drivers/md/ |
D | dm-snap.c | 164 chunk_t chunk) in chunk_to_sector() argument 166 return chunk << store->chunk_shift; in chunk_to_sector() 221 chunk_t chunk; member 236 static void track_chunk(struct dm_snapshot *s, struct bio *bio, chunk_t chunk) in track_chunk() argument 240 c->chunk = chunk; in track_chunk() 244 &s->tracked_chunk_hash[DM_TRACKED_CHUNK_HASH(chunk)]); in track_chunk() 258 static int __chunk_is_tracked(struct dm_snapshot *s, chunk_t chunk) in __chunk_is_tracked() argument 266 &s->tracked_chunk_hash[DM_TRACKED_CHUNK_HASH(chunk)], node) { in __chunk_is_tracked() 267 if (c->chunk == chunk) { in __chunk_is_tracked() 282 static void __check_for_conflicting_io(struct dm_snapshot *s, chunk_t chunk) in __check_for_conflicting_io() argument [all …]
|
D | dm-stripe.c | 216 sector_t chunk = dm_target_offset(sc->ti, sector); in stripe_map_sector() local 220 chunk_offset = sector_div(chunk, sc->chunk_size); in stripe_map_sector() 222 chunk_offset = chunk & (sc->chunk_size - 1); in stripe_map_sector() 223 chunk >>= sc->chunk_size_shift; in stripe_map_sector() 227 *stripe = sector_div(chunk, sc->stripes); in stripe_map_sector() 229 *stripe = chunk & (sc->stripes - 1); in stripe_map_sector() 230 chunk >>= sc->stripes_shift; in stripe_map_sector() 234 chunk *= sc->chunk_size; in stripe_map_sector() 236 chunk <<= sc->chunk_size_shift; in stripe_map_sector() 238 *result = chunk + chunk_offset; in stripe_map_sector()
|
D | dm-exception-store.h | 142 static inline chunk_t dm_chunk_number(chunk_t chunk) in dm_chunk_number() argument 144 return chunk & (chunk_t)((1ULL << DM_CHUNK_NUMBER_BITS) - 1ULL); in dm_chunk_number() 169 static inline chunk_t dm_chunk_number(chunk_t chunk) in dm_chunk_number() argument 171 return chunk; in dm_chunk_number()
|
/drivers/atm/ |
D | fore200e.c | 178 fore200e_chunk_alloc(struct fore200e* fore200e, struct chunk* chunk, int size, int alignment, int d… in fore200e_chunk_alloc() argument 185 chunk->alloc_size = size + alignment; in fore200e_chunk_alloc() 186 chunk->align_size = size; in fore200e_chunk_alloc() 187 chunk->direction = direction; in fore200e_chunk_alloc() 189 chunk->alloc_addr = kzalloc(chunk->alloc_size, GFP_KERNEL | GFP_DMA); in fore200e_chunk_alloc() 190 if (chunk->alloc_addr == NULL) in fore200e_chunk_alloc() 194 offset = FORE200E_ALIGN(chunk->alloc_addr, alignment); in fore200e_chunk_alloc() 196 chunk->align_addr = chunk->alloc_addr + offset; in fore200e_chunk_alloc() 198 …chunk->dma_addr = fore200e->bus->dma_map(fore200e, chunk->align_addr, chunk->align_size, direction… in fore200e_chunk_alloc() 207 fore200e_chunk_free(struct fore200e* fore200e, struct chunk* chunk) in fore200e_chunk_free() argument [all …]
|
D | fore200e.h | 563 typedef struct chunk { struct 581 struct chunk data; /* data buffer */ 603 struct chunk status; /* array of completion status */ 613 … struct chunk tpd; /* array of tpds */ 614 … struct chunk status; /* arry of completion status */ 624 …struct chunk rpd; /* array of rpds */ 625 …struct chunk status; /* array of completion status */ 634 …struct chunk rbd_block; /* array of rbds … 635 …struct chunk status; /* array of completion status … 811 int (*dma_chunk_alloc)(struct fore200e*, struct chunk*, int, int, int); [all …]
|
/drivers/infiniband/hw/cxgb4/ |
D | resource.c | 419 unsigned start, chunk, top; in c4iw_ocqp_pool_create() local 426 chunk = rdev->lldi.vr->ocq.size; in c4iw_ocqp_pool_create() 427 top = start + chunk; in c4iw_ocqp_pool_create() 430 chunk = min(top - start + 1, chunk); in c4iw_ocqp_pool_create() 431 if (gen_pool_add(rdev->ocqp_pool, start, chunk, -1)) { in c4iw_ocqp_pool_create() 433 __func__, start, chunk); in c4iw_ocqp_pool_create() 434 if (chunk <= 1024 << MIN_OCQP_SHIFT) { in c4iw_ocqp_pool_create() 440 chunk >>= 1; in c4iw_ocqp_pool_create() 443 __func__, start, chunk); in c4iw_ocqp_pool_create() 444 start += chunk; in c4iw_ocqp_pool_create()
|
/drivers/crypto/ |
D | n2_core.c | 674 struct n2_crypto_chunk chunk; member 877 struct n2_crypto_chunk *chunk; in n2_compute_chunks() local 890 chunk = &rctx->chunk; in n2_compute_chunks() 891 INIT_LIST_HEAD(&chunk->entry); in n2_compute_chunks() 893 chunk->iv_paddr = 0UL; in n2_compute_chunks() 894 chunk->arr_len = 0; in n2_compute_chunks() 895 chunk->dest_paddr = 0UL; in n2_compute_chunks() 913 if (chunk->arr_len != 0) { in n2_compute_chunks() 917 chunk->arr_len == N2_CHUNK_ARR_LEN || in n2_compute_chunks() 919 chunk->dest_final = dest_prev; in n2_compute_chunks() [all …]
|
/drivers/net/wireless/ti/wlcore/ |
D | boot.c | 179 u8 *p, *chunk; in wl1271_boot_upload_firmware_chunk() local 194 chunk = kmalloc(CHUNK_SIZE, GFP_KERNEL); in wl1271_boot_upload_firmware_chunk() 195 if (!chunk) { in wl1271_boot_upload_firmware_chunk() 226 memcpy(chunk, p, CHUNK_SIZE); in wl1271_boot_upload_firmware_chunk() 229 ret = wlcore_write(wl, addr, chunk, CHUNK_SIZE, false); in wl1271_boot_upload_firmware_chunk() 239 memcpy(chunk, p, fw_data_len % CHUNK_SIZE); in wl1271_boot_upload_firmware_chunk() 242 ret = wlcore_write(wl, addr, chunk, fw_data_len % CHUNK_SIZE, false); in wl1271_boot_upload_firmware_chunk() 245 kfree(chunk); in wl1271_boot_upload_firmware_chunk()
|