/drivers/gpu/drm/nouveau/core/subdev/fb/ |
D | ramgk20a.c | 53 gk20a_ram_get(struct nouveau_fb *pfb, u64 size, u32 align, u32 ncmin, in gk20a_ram_get() argument 63 align, ncmin); in gk20a_ram_get() 69 if (align == 0) in gk20a_ram_get() 70 align = PAGE_SIZE; in gk20a_ram_get() 71 align >>= PAGE_SHIFT; in gk20a_ram_get() 74 order = fls(align); in gk20a_ram_get() 75 if ((align & (align - 1)) == 0) in gk20a_ram_get() 77 align = BIT(order); in gk20a_ram_get() 80 npages = max(align, npages); in gk20a_ram_get() 105 align <<= PAGE_SHIFT; in gk20a_ram_get() [all …]
|
/drivers/gpu/drm/radeon/ |
D | radeon_sa.c | 52 unsigned size, u32 align, u32 domain, u32 flags) in radeon_sa_bo_manager_init() argument 60 sa_manager->align = align; in radeon_sa_bo_manager_init() 67 r = radeon_bo_create(rdev, size, align, true, in radeon_sa_bo_manager_init() 192 unsigned size, unsigned align) in radeon_sa_bo_try_alloc() argument 198 wasted = (align - (soffset % align)) % align; in radeon_sa_bo_try_alloc() 225 unsigned size, unsigned align) in radeon_sa_event() argument 238 wasted = (align - (soffset % align)) % align; in radeon_sa_event() 315 unsigned size, unsigned align) in radeon_sa_bo_new() argument 321 BUG_ON(align > sa_manager->align); in radeon_sa_bo_new() 344 size, align)) { in radeon_sa_bo_new() [all …]
|
/drivers/gpu/drm/omapdrm/ |
D | tcm-sita.c | 25 #define ALIGN_DOWN(value, align) ((value) & ~((align) - 1)) argument 34 static s32 sita_reserve_2d(struct tcm *tcm, u16 h, u16 w, u8 align, 43 static s32 scan_areas_and_find_fit(struct tcm *tcm, u16 w, u16 h, u16 align, 46 static s32 scan_l2r_t2b(struct tcm *tcm, u16 w, u16 h, u16 align, 49 static s32 scan_r2l_t2b(struct tcm *tcm, u16 w, u16 h, u16 align, 208 static s32 sita_reserve_2d(struct tcm *tcm, u16 h, u16 w, u8 align, in sita_reserve_2d() argument 215 if (align > 64) in sita_reserve_2d() 219 align = align <= 1 ? 1 : align <= 32 ? 32 : 64; in sita_reserve_2d() 222 ret = scan_areas_and_find_fit(tcm, w, h, align, area); in sita_reserve_2d() 274 static s32 scan_r2l_t2b(struct tcm *tcm, u16 w, u16 h, u16 align, in scan_r2l_t2b() argument [all …]
|
D | tcm.h | 71 s32 (*reserve_2d)(struct tcm *tcm, u16 height, u16 width, u8 align, 132 u16 align, struct tcm_area *area) in tcm_reserve_2d() argument 138 (align & (align - 1))) ? -EINVAL : in tcm_reserve_2d() 143 res = tcm->reserve_2d(tcm, height, width, align, area); in tcm_reserve_2d()
|
/drivers/staging/fwserial/ |
D | dma_fifo.c | 67 int dma_fifo_alloc(struct dma_fifo *fifo, int size, unsigned align, in dma_fifo_alloc() argument 72 if (!is_power_of_2(align) || size < 0) in dma_fifo_alloc() 75 size = round_up(size, align); in dma_fifo_alloc() 76 capacity = size + align * open_limit + align * DMA_FIFO_GUARD; in dma_fifo_alloc() 86 fifo->align = align; in dma_fifo_alloc() 87 fifo->tx_limit = max_t(int, round_down(tx_limit, align), align); in dma_fifo_alloc() 90 fifo->guard = size + align * open_limit; in dma_fifo_alloc() 221 fifo->out += round_up(n, fifo->align); in dma_fifo_out_pend() 238 if (FAIL(fifo, fifo->out & (fifo->align - 1), in dma_fifo_out_pend() 240 fifo->out, fifo->align)) in dma_fifo_out_pend()
|
D | dma_fifo.h | 58 unsigned align; /* must be power of 2 */ member 85 int dma_fifo_alloc(struct dma_fifo *fifo, int size, unsigned align, 121 tx_limit = round_down(tx_limit, fifo->align); in dma_fifo_change_tx_limit() 122 fifo->tx_limit = max_t(int, tx_limit, fifo->align); in dma_fifo_change_tx_limit()
|
/drivers/net/wireless/rt2x00/ |
D | rt2x00crypto.c | 160 unsigned int align = ALIGN_SIZE(skb, header_length); in rt2x00crypto_rx_insert_iv() local 201 skb_push(skb, iv_len - align); in rt2x00crypto_rx_insert_iv() 206 skb->data + transfer + (iv_len - align), in rt2x00crypto_rx_insert_iv() 210 skb_push(skb, iv_len + align); in rt2x00crypto_rx_insert_iv() 211 if (align < icv_len) in rt2x00crypto_rx_insert_iv() 212 skb_put(skb, icv_len - align); in rt2x00crypto_rx_insert_iv() 213 else if (align > icv_len) in rt2x00crypto_rx_insert_iv() 218 skb->data + transfer + iv_len + align, in rt2x00crypto_rx_insert_iv() 233 skb->data + transfer + align, in rt2x00crypto_rx_insert_iv()
|
/drivers/pcmcia/ |
D | rsrc_iodyn.c | 31 resource_size_t size, resource_size_t align) in pcmcia_align() argument 60 unsigned long align) in __iodyn_find_io_region() argument 68 data.mask = align - 1; in __iodyn_find_io_region() 89 unsigned int align, struct resource **parent) in iodyn_find_io() argument 104 if ((s->io[i].res->start & (align-1)) == *base) in iodyn_find_io() 117 if (align == 0) in iodyn_find_io() 118 align = 0x10000; in iodyn_find_io() 121 num, align); in iodyn_find_io()
|
D | pcmcia_resource.c | 49 struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align, in pcmcia_find_mem_region() argument 53 return s->resource_ops->find_mem(base, num, align, low, s); in pcmcia_find_mem_region() 103 unsigned int align; in alloc_io_space() local 113 align = base ? (lines ? 1<<lines : 0) : 1; in alloc_io_space() 114 if (align && (align < num)) { in alloc_io_space() 117 align = 0; in alloc_io_space() 119 while (align && (align < num)) in alloc_io_space() 120 align <<= 1; in alloc_io_space() 122 if (base & ~(align-1)) { in alloc_io_space() 124 align = 0; in alloc_io_space() [all …]
|
/drivers/base/ |
D | dma-contiguous.c | 191 unsigned int align) in dma_alloc_from_contiguous() argument 193 if (align > CONFIG_CMA_ALIGNMENT) in dma_alloc_from_contiguous() 194 align = CONFIG_CMA_ALIGNMENT; in dma_alloc_from_contiguous() 196 return cma_alloc(dev_get_cma_area(dev), count, align); in dma_alloc_from_contiguous() 245 phys_addr_t align = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order); in rmem_cma_setup() local 246 phys_addr_t mask = align - 1; in rmem_cma_setup()
|
/drivers/pci/ |
D | setup-bus.c | 158 resource_size_t align; in pdev_sort_resources() local 160 align = pci_resource_alignment(dev_res->dev, in pdev_sort_resources() 163 if (r_align > align) { in pdev_sort_resources() 247 resource_size_t align = add_res->min_align; in reassign_resources_sorted() local 251 add_size, align)) in reassign_resources_sorted() 766 resource_size_t align) in calculate_iosize() argument 777 size = ALIGN(size + size1, align); in calculate_iosize() 787 resource_size_t align) in calculate_memsize() argument 795 size = ALIGN(size + size1, align); in calculate_memsize() 812 resource_size_t align = 1, arch_align; in window_alignment() local [all …]
|
D | setup-res.c | 201 int resno, resource_size_t size, resource_size_t align) in __pci_assign_resource() argument 216 ret = pci_bus_alloc_resource(bus, res, size, align, min, in __pci_assign_resource() 228 ret = pci_bus_alloc_resource(bus, res, size, align, min, in __pci_assign_resource() 242 ret = pci_bus_alloc_resource(bus, res, size, align, min, 0, in __pci_assign_resource() 267 resource_size_t align, size; in pci_assign_resource() local 271 align = pci_resource_alignment(dev, res); in pci_assign_resource() 272 if (!align) { in pci_assign_resource() 279 ret = _pci_assign_resource(dev, resno, size, align); in pci_assign_resource()
|
D | bus.c | 133 resource_size_t size, resource_size_t align, in pci_bus_alloc_from_region() argument 180 align, alignf, alignf_data); in pci_bus_alloc_from_region() 203 resource_size_t size, resource_size_t align, in pci_bus_alloc_resource() argument 215 rc = pci_bus_alloc_from_region(bus, res, size, align, min, in pci_bus_alloc_resource() 221 return pci_bus_alloc_from_region(bus, res, size, align, min, in pci_bus_alloc_resource() 227 return pci_bus_alloc_from_region(bus, res, size, align, min, in pci_bus_alloc_resource()
|
/drivers/of/ |
D | of_reserved_mem.c | 31 phys_addr_t align, phys_addr_t start, phys_addr_t end, bool nomap, in early_init_dt_alloc_reserved_memory_arch() argument 40 base = __memblock_alloc_base(size, align, end); in early_init_dt_alloc_reserved_memory_arch() 59 phys_addr_t align, phys_addr_t start, phys_addr_t end, bool nomap, in early_init_dt_alloc_reserved_memory_arch() argument 99 phys_addr_t base = 0, align = 0, size; in __reserved_mem_alloc_size() local 125 align = dt_mem_next_cell(dt_root_addr_cells, &prop); in __reserved_mem_alloc_size() 145 align, start, end, nomap, &base); in __reserved_mem_alloc_size() 156 ret = early_init_dt_alloc_reserved_memory_arch(size, align, in __reserved_mem_alloc_size()
|
/drivers/gpu/drm/nouveau/core/core/ |
D | gpuobj.c | 58 u32 size, u32 align, u32 flags, in nouveau_gpuobj_create_() argument 86 ret = imem->alloc(imem, parent, size, align, &parent); in nouveau_gpuobj_create_() 119 max(align, (u32)1), &gpuobj->node); in nouveau_gpuobj_create_() 143 u32 align; member 158 args->size, args->align, args->flags, in _nouveau_gpuobj_ctor() 220 u32 size, u32 align, u32 flags, in nouveau_gpuobj_new() argument 227 .align = align, in nouveau_gpuobj_new()
|
/drivers/mmc/host/ |
D | tmio_mmc_dma.c | 56 unsigned int align = (1 << pdata->dma->alignment_shift) - 1; in tmio_mmc_start_dma_rx() local 59 if (sg_tmp->offset & align) in tmio_mmc_start_dma_rx() 61 if (sg_tmp->length & align) { in tmio_mmc_start_dma_rx() 68 (align & PAGE_MASK))) || !multiple) { in tmio_mmc_start_dma_rx() 133 unsigned int align = (1 << pdata->dma->alignment_shift) - 1; in tmio_mmc_start_dma_tx() local 136 if (sg_tmp->offset & align) in tmio_mmc_start_dma_tx() 138 if (sg_tmp->length & align) { in tmio_mmc_start_dma_tx() 145 (align & PAGE_MASK))) || !multiple) { in tmio_mmc_start_dma_tx()
|
/drivers/gpu/drm/rcar-du/ |
D | rcar_du_kms.c | 119 unsigned int align; in rcar_du_dumb_create() local 125 align = 128; in rcar_du_dumb_create() 127 align = 16 * args->bpp / 8; in rcar_du_dumb_create() 129 args->pitch = roundup(max(args->pitch, min_pitch), align); in rcar_du_dumb_create() 141 unsigned int align; in rcar_du_fb_create() local 159 align = 128; in rcar_du_fb_create() 161 align = 16 * bpp; in rcar_du_fb_create() 163 if (mode_cmd->pitches[0] & (align - 1) || in rcar_du_fb_create()
|
/drivers/dma/ |
D | dmatest.c | 487 u8 align = 0; in dmatest_func() local 493 align = dev->copy_align; in dmatest_func() 495 align = dev->xor_align; in dmatest_func() 497 align = dev->pq_align; in dmatest_func() 499 if (1 << align > params->buf_size) { in dmatest_func() 501 params->buf_size, 1 << align); in dmatest_func() 511 len = (len >> align) << align; in dmatest_func() 513 len = 1 << align; in dmatest_func() 517 src_off = (src_off >> align) << align; in dmatest_func() 518 dst_off = (dst_off >> align) << align; in dmatest_func() [all …]
|
/drivers/firmware/efi/libstub/ |
D | efi-stub-helper.c | 142 unsigned long size, unsigned long align, in efi_high_alloc() argument 162 if (align < EFI_ALLOC_ALIGN) in efi_high_alloc() 163 align = EFI_ALLOC_ALIGN; in efi_high_alloc() 188 if (round_down(end - size, align) < start) in efi_high_alloc() 191 start = round_down(end - size, align); in efi_high_alloc() 228 unsigned long size, unsigned long align, in efi_low_alloc() argument 247 if (align < EFI_ALLOC_ALIGN) in efi_low_alloc() 248 align = EFI_ALLOC_ALIGN; in efi_low_alloc() 275 start = round_up(start, align); in efi_low_alloc()
|
/drivers/staging/android/ion/ |
D | compat_ion.c | 27 compat_size_t align; member 60 err |= get_user(s, &data32->align); in compat_get_ion_allocation_data() 61 err |= put_user(s, &data->align); in compat_get_ion_allocation_data() 96 err |= get_user(s, &data->align); in compat_put_ion_allocation_data() 97 err |= put_user(s, &data32->align); in compat_put_ion_allocation_data()
|
D | ion_carveout_heap.c | 36 unsigned long align) in ion_carveout_allocate() argument 74 unsigned long size, unsigned long align, in ion_carveout_heap_allocate() argument 81 if (align > PAGE_SIZE) in ion_carveout_heap_allocate() 91 paddr = ion_carveout_allocate(heap, size, align); in ion_carveout_heap_allocate()
|
/drivers/staging/android/ |
D | binder_alloc_selftest.c | 260 int align; in binder_selftest_alloc_offset() local 272 for (align = SAME_PAGE_UNALIGNED; align < LOOP_END; align++) { in binder_selftest_alloc_offset() 273 if (align % 2) in binder_selftest_alloc_offset()
|
/drivers/gpu/drm/exynos/ |
D | exynos_drm_rotator.c | 69 u32 align; member 181 mask = ~((1 << limit->align) - 1); in rotator_align_size() 184 val = ROT_ALIGN(*hsize, limit->align, mask); in rotator_align_size() 193 val = ROT_ALIGN(*vsize, limit->align, mask); in rotator_align_size() 633 .align = 3, 640 .align = 2, 650 .align = 3, 657 .align = 2, 667 .align = 3, 674 .align = 1,
|
/drivers/scsi/dpt/ |
D | dptsig.h | 69 #pragma options align=packed 76 #pragma options align=mac68k 324 #pragma options align=reset 333 #pragma options align=reset
|
/drivers/parisc/ |
D | ccio-dma.c | 1430 unsigned long min, unsigned long max, unsigned long align) in new_ioc_area() argument 1435 res->start = (max - size + 1) &~ (align - 1); in new_ioc_area() 1445 return new_ioc_area(res, size, min, max - size, align); in new_ioc_area() 1449 unsigned long min, unsigned long max, unsigned long align) in expand_ioc_area() argument 1454 return new_ioc_area(res, size, min, max, align); in expand_ioc_area() 1456 start = (res->start - size) &~ (align - 1); in expand_ioc_area() 1464 len = ((size + res->end + align) &~ (align - 1)) - start; in expand_ioc_area() 1482 unsigned long min, unsigned long max, unsigned long align) in ccio_allocate_resource() argument 1491 !allocate_resource(parent, res, size, min, max, align, NULL, NULL)) in ccio_allocate_resource() 1495 !allocate_resource(parent + 1, res, size, min, max, align, in ccio_allocate_resource() [all …]
|