Home
last modified time | relevance | path

Searched refs:align (Results 1 – 25 of 300) sorted by relevance

12345678910>>...12

/drivers/clk/tegra/
Dcvb.c26 const struct rail_alignment *align) in round_cvb_voltage() argument
30 int step = (align->step_uv ? : 1000) * v_scale; in round_cvb_voltage()
31 int offset = align->offset_uv * v_scale; in round_cvb_voltage()
34 uv = DIV_ROUND_UP(uv, step) * align->step_uv + align->offset_uv; in round_cvb_voltage()
43 static int round_voltage(int mv, const struct rail_alignment *align, int up) in round_voltage() argument
45 if (align->step_uv) { in round_voltage()
48 uv = max(mv * 1000, align->offset_uv) - align->offset_uv; in round_voltage()
49 uv = (uv + (up ? align->step_uv - 1 : 0)) / align->step_uv; in round_voltage()
50 return (uv * align->step_uv + align->offset_uv) / 1000; in round_voltage()
56 struct rail_alignment *align, in build_opp_table() argument
[all …]
Dclk-tegra124-dfll-fcpu.c524 struct rail_alignment *align) in get_alignment_from_dt() argument
528 &align->step_uv)) in get_alignment_from_dt()
529 align->step_uv = 0; in get_alignment_from_dt()
533 &align->offset_uv)) in get_alignment_from_dt()
534 align->offset_uv = 0; in get_alignment_from_dt()
538 struct rail_alignment *align) in get_alignment_from_regulator() argument
545 align->offset_uv = regulator_list_voltage(reg, 0); in get_alignment_from_regulator()
546 align->step_uv = regulator_get_linear_step(reg); in get_alignment_from_regulator()
558 struct rail_alignment align; in tegra124_dfll_fcpu_probe() local
585 get_alignment_from_dt(&pdev->dev, &align); in tegra124_dfll_fcpu_probe()
[all …]
/drivers/dax/
Ddax-private.h36 unsigned int align; member
66 unsigned int align; member
94 static inline bool dax_align_valid(unsigned long align) in dax_align_valid() argument
96 if (align == PUD_SIZE && IS_ENABLED(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD)) in dax_align_valid()
98 if (align == PMD_SIZE && has_transparent_hugepage()) in dax_align_valid()
100 if (align == PAGE_SIZE) in dax_align_valid()
105 static inline bool dax_align_valid(unsigned long align) in dax_align_valid() argument
107 return align == PAGE_SIZE; in dax_align_valid()
Ddevice.c34 mask = dev_dax->align - 1; in check_vma()
86 if (dev_dax->align > PAGE_SIZE) { in __dev_dax_pte_fault()
88 dev_dax->align, fault_size); in __dev_dax_pte_fault()
92 if (fault_size != dev_dax->align) in __dev_dax_pte_fault()
118 if (dev_dax->align > PMD_SIZE) { in __dev_dax_pmd_fault()
120 dev_dax->align, fault_size); in __dev_dax_pmd_fault()
124 if (fault_size < dev_dax->align) in __dev_dax_pmd_fault()
126 else if (fault_size > dev_dax->align) in __dev_dax_pmd_fault()
160 if (dev_dax->align > PUD_SIZE) { in __dev_dax_pud_fault()
162 dev_dax->align, fault_size); in __dev_dax_pud_fault()
[all …]
/drivers/nvdimm/
Dpfn_devs.c92 return sprintf(buf, "%ld\n", nd_pfn->align); in align_show()
129 rc = nd_size_select_store(dev, buf, &nd_pfn->align, in align_store()
138 static DEVICE_ATTR_RW(align);
304 nd_pfn->align = nd_pfn_default_alignment(); in nd_pfn_devinit()
422 static bool nd_supported_alignment(unsigned long align) in nd_supported_alignment() argument
427 if (align == 0) in nd_supported_alignment()
432 if (align == supported[i]) in nd_supported_alignment()
452 unsigned long align, start_pad; in nd_pfn_validate() local
484 pfn_sb->align = 0; in nd_pfn_validate()
499 align = le32_to_cpu(pfn_sb->align); in nd_pfn_validate()
[all …]
Ddimm_devs.c721 if (dev_WARN_ONCE(dev, !nd_region->ndr_mappings || nd_region->align in dpa_align()
724 nd_region->align, nd_region->ndr_mappings)) in dpa_align()
726 return nd_region->align / nd_region->ndr_mappings; in dpa_align()
737 unsigned long align; in alias_dpa_busy() local
775 align = dpa_align(nd_region); in alias_dpa_busy()
776 if (!align) in alias_dpa_busy()
785 start = ALIGN_DOWN(res->start, align); in alias_dpa_busy()
786 end = ALIGN(res->end + 1, align) - 1; in alias_dpa_busy()
829 unsigned long align; in nd_blk_available_dpa() local
837 align = dpa_align(nd_region); in nd_blk_available_dpa()
[all …]
/drivers/firmware/efi/libstub/
Drandomalloc.c21 unsigned long align = 1UL << align_shift; in get_entry_num_slots() local
36 first_slot = round_up(md->phys_addr, align); in get_entry_num_slots()
37 last_slot = round_down(region_end - size + 1, align); in get_entry_num_slots()
54 unsigned long align, in efi_random_alloc() argument
76 if (align < EFI_ALLOC_ALIGN) in efi_random_alloc()
77 align = EFI_ALLOC_ALIGN; in efi_random_alloc()
86 slots = get_entry_num_slots(md, size, ilog2(align)); in efi_random_alloc()
115 target = round_up(md->phys_addr, align) + target_slot * align; in efi_random_alloc()
Dalignedmem.c25 unsigned long max, unsigned long align) in efi_allocate_pages_aligned() argument
31 if (align < EFI_ALLOC_ALIGN) in efi_allocate_pages_aligned()
32 align = EFI_ALLOC_ALIGN; in efi_allocate_pages_aligned()
34 alloc_addr = ALIGN_DOWN(max + 1, align) - 1; in efi_allocate_pages_aligned()
36 slack = align / EFI_PAGE_SIZE - 1; in efi_allocate_pages_aligned()
44 *addr = ALIGN((unsigned long)alloc_addr, align); in efi_allocate_pages_aligned()
47 int l = (alloc_addr & (align - 1)) / EFI_PAGE_SIZE; in efi_allocate_pages_aligned()
/drivers/gpu/drm/radeon/
Dradeon_sa.c52 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/amd/amdgpu/
Damdgpu_sa.c52 unsigned size, u32 align, u32 domain) in amdgpu_sa_bo_manager_init() argument
60 sa_manager->align = align; in amdgpu_sa_bo_manager_init()
66 r = amdgpu_bo_create_kernel(adev, size, align, domain, &sa_manager->bo, in amdgpu_sa_bo_manager_init()
153 unsigned size, unsigned align) in amdgpu_sa_bo_try_alloc() argument
159 wasted = (align - (soffset % align)) % align; in amdgpu_sa_bo_try_alloc()
186 unsigned size, unsigned align) in amdgpu_sa_event() argument
197 wasted = (align - (soffset % align)) % align; in amdgpu_sa_event()
277 unsigned size, unsigned align) in amdgpu_sa_bo_new() argument
285 if (WARN_ON_ONCE(align > sa_manager->align)) in amdgpu_sa_bo_new()
308 size, align)) { in amdgpu_sa_bo_new()
[all …]
/drivers/pci/
Dsetup-bus.c163 resource_size_t align; in pdev_sort_resources() local
165 align = pci_resource_alignment(dev_res->dev, in pdev_sort_resources()
168 if (r_align > align) { in pdev_sort_resources()
221 resource_size_t add_size, align; in reassign_resources_sorted() local
244 align = add_res->min_align; in reassign_resources_sorted()
246 res->start = align; in reassign_resources_sorted()
254 add_size, align)) in reassign_resources_sorted()
375 resource_size_t add_align, align; in __assign_resources_sorted() local
419 align = pci_resource_alignment(dev_res2->dev, in __assign_resources_sorted()
421 if (add_align > align) { in __assign_resources_sorted()
[all …]
Dsetup-res.c252 resource_size_t align) in pcibios_align_resource() argument
258 int resno, resource_size_t size, resource_size_t align) in __pci_assign_resource() argument
273 ret = pci_bus_alloc_resource(bus, res, size, align, min, in __pci_assign_resource()
285 ret = pci_bus_alloc_resource(bus, res, size, align, min, in __pci_assign_resource()
299 ret = pci_bus_alloc_resource(bus, res, size, align, min, 0, in __pci_assign_resource()
324 resource_size_t align, size; in pci_assign_resource() local
331 align = pci_resource_alignment(dev, res); in pci_assign_resource()
332 if (!align) { in pci_assign_resource()
339 ret = _pci_assign_resource(dev, resno, size, align); in pci_assign_resource()
/drivers/staging/fwserial/
Ddma_fifo.c58 int dma_fifo_alloc(struct dma_fifo *fifo, int size, unsigned int align, in dma_fifo_alloc() argument
63 if (!is_power_of_2(align) || size < 0) in dma_fifo_alloc()
66 size = round_up(size, align); in dma_fifo_alloc()
67 capacity = size + align * open_limit + align * DMA_FIFO_GUARD; in dma_fifo_alloc()
77 fifo->align = align; in dma_fifo_alloc()
78 fifo->tx_limit = max_t(int, round_down(tx_limit, align), align); in dma_fifo_alloc()
81 fifo->guard = size + align * open_limit; in dma_fifo_alloc()
212 fifo->out += round_up(n, fifo->align); in dma_fifo_out_pend()
229 if (FAIL(fifo, fifo->out & (fifo->align - 1), in dma_fifo_out_pend()
231 fifo->out, fifo->align)) in dma_fifo_out_pend()
Ddma_fifo.h49 unsigned int align; /* must be power of 2 */ member
76 int dma_fifo_alloc(struct dma_fifo *fifo, int size, unsigned int align,
112 tx_limit = round_down(tx_limit, fifo->align); in dma_fifo_change_tx_limit()
113 fifo->tx_limit = max_t(int, tx_limit, fifo->align); in dma_fifo_change_tx_limit()
/drivers/net/wireless/ralink/rt2x00/
Drt2x00crypto.c149 unsigned int align = ALIGN_SIZE(skb, header_length); in rt2x00crypto_rx_insert_iv() local
190 skb_push(skb, iv_len - align); in rt2x00crypto_rx_insert_iv()
195 skb->data + transfer + (iv_len - align), in rt2x00crypto_rx_insert_iv()
199 skb_push(skb, iv_len + align); in rt2x00crypto_rx_insert_iv()
200 if (align < icv_len) in rt2x00crypto_rx_insert_iv()
201 skb_put(skb, icv_len - align); in rt2x00crypto_rx_insert_iv()
202 else if (align > icv_len) in rt2x00crypto_rx_insert_iv()
207 skb->data + transfer + iv_len + align, in rt2x00crypto_rx_insert_iv()
222 skb->data + transfer + align, in rt2x00crypto_rx_insert_iv()
/drivers/pcmcia/
Drsrc_iodyn.c28 resource_size_t size, resource_size_t align) in pcmcia_align() argument
57 unsigned long align) in __iodyn_find_io_region() argument
65 data.mask = align - 1; in __iodyn_find_io_region()
86 unsigned int align, struct resource **parent) in iodyn_find_io() argument
101 if ((s->io[i].res->start & (align-1)) == *base) in iodyn_find_io()
114 if (align == 0) in iodyn_find_io()
115 align = 0x10000; in iodyn_find_io()
118 num, align); in iodyn_find_io()
Dpcmcia_resource.c45 struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align, in pcmcia_find_mem_region() argument
49 return s->resource_ops->find_mem(base, num, align, low, s); in pcmcia_find_mem_region()
99 unsigned int align; in alloc_io_space() local
109 align = base ? (lines ? 1<<lines : 0) : 1; in alloc_io_space()
110 if (align && (align < num)) { in alloc_io_space()
113 align = 0; in alloc_io_space()
115 while (align && (align < num)) in alloc_io_space()
116 align <<= 1; in alloc_io_space()
118 if (base & ~(align-1)) { in alloc_io_space()
120 align = 0; in alloc_io_space()
[all …]
/drivers/gpu/drm/exynos/
Dexynos_drm_rotator.c362 { IPP_SIZE_LIMIT(AREA, .h.align = 2, .v.align = 2) },
367 { IPP_SIZE_LIMIT(AREA, .h.align = 4, .v.align = 4) },
372 { IPP_SIZE_LIMIT(AREA, .h.align = 4, .v.align = 4) },
377 { IPP_SIZE_LIMIT(AREA, .h.align = 2, .v.align = 2) },
382 { IPP_SIZE_LIMIT(AREA, .h.align = 8, .v.align = 8) },
387 { IPP_SIZE_LIMIT(AREA, .h.align = 8, .v.align = 8) },
392 { IPP_SIZE_LIMIT(AREA, .h.align = 8, .v.align = 8) },
/drivers/gpu/drm/i915/selftests/
Di915_random.c94 u64 len, u64 align) in igt_random_offset() argument
99 BUG_ON(round_up(start, align) > round_down(end - len, align)); in igt_random_offset()
101 range = round_down(end - len, align) - round_up(start, align); in igt_random_offset()
108 return round_up(start, align); in igt_random_offset()
/drivers/of/
Dof_reserved_mem.c33 phys_addr_t align, phys_addr_t start, phys_addr_t end, bool nomap, in early_init_dt_alloc_reserved_memory_arch() argument
40 align = !align ? SMP_CACHE_BYTES : align; in early_init_dt_alloc_reserved_memory_arch()
41 base = memblock_phys_alloc_range(size, align, start, end); in early_init_dt_alloc_reserved_memory_arch()
88 phys_addr_t base = 0, align = 0, size; in __reserved_mem_alloc_size() local
111 align = dt_mem_next_cell(dt_root_addr_cells, &prop); in __reserved_mem_alloc_size()
124 align = max(align, (phys_addr_t)PAGE_SIZE << order); in __reserved_mem_alloc_size()
144 align, start, end, nomap, &base); in __reserved_mem_alloc_size()
155 ret = early_init_dt_alloc_reserved_memory_arch(size, align, in __reserved_mem_alloc_size()
/drivers/net/ethernet/marvell/octeontx2/af/
Dcommon.h43 u8 align; member
71 qmem->align = (aligned_addr - qmem->iova); in qmem_alloc()
72 qmem->base += qmem->align; in qmem_alloc()
73 qmem->iova += qmem->align; in qmem_alloc()
84 qmem->base - qmem->align, in qmem_free()
85 qmem->iova - qmem->align, in qmem_free()
/drivers/pci/endpoint/functions/
Dpci-epf-ntb.c501 size_t align; in epf_ntb_configure_msix() local
517 align = epc_features->align; in epf_ntb_configure_msix()
524 msg_addr = ALIGN_DOWN(msix_tbl[i].msg_addr, align); in epf_ntb_configure_msix()
536 peer_ctrl->db_offset[i] = msix_tbl[i].msg_addr & (align - 1); in epf_ntb_configure_msix()
998 size_t msix_table_size, pba_size, align; in epf_ntb_config_spad_bar_alloc() local
1016 align = epc_features->align; in epf_ntb_config_spad_bar_alloc()
1024 if ((!IS_ALIGNED(size, align))) in epf_ntb_config_spad_bar_alloc()
1043 if (!align) { in epf_ntb_config_spad_bar_alloc()
1047 ctrl_size = ALIGN(ctrl_size, align); in epf_ntb_config_spad_bar_alloc()
1048 spad_size = ALIGN(spad_size, align); in epf_ntb_config_spad_bar_alloc()
[all …]
/drivers/gpu/drm/nouveau/nvkm/core/
Dgpuobj.c172 nvkm_gpuobj_ctor(struct nvkm_device *device, u32 size, int align, bool zero, in nvkm_gpuobj_ctor() argument
179 if (align >= 0) { in nvkm_gpuobj_ctor()
181 max(align, 1), &gpuobj->node); in nvkm_gpuobj_ctor()
184 -align, &gpuobj->node); in nvkm_gpuobj_ctor()
202 abs(align), zero, &gpuobj->memory); in nvkm_gpuobj_ctor()
229 nvkm_gpuobj_new(struct nvkm_device *device, u32 size, int align, bool zero, in nvkm_gpuobj_new() argument
238 ret = nvkm_gpuobj_ctor(device, size, align, zero, parent, gpuobj); in nvkm_gpuobj_new()
/drivers/gpu/drm/i915/
Di915_gem_gtt.c127 static u64 random_offset(u64 start, u64 end, u64 len, u64 align) in random_offset() argument
132 GEM_BUG_ON(round_up(start, align) > round_down(end - len, align)); in random_offset()
134 range = round_down(end - len, align) - round_up(start, align); in random_offset()
149 return round_up(start, align); in random_offset()
/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/
Dgk20a.c383 gk20a_instobj_ctor_dma(struct gk20a_instmem *imem, u32 npages, u32 align, in gk20a_instobj_ctor_dma() argument
406 if (unlikely(node->handle & (align - 1))) in gk20a_instobj_ctor_dma()
409 &node->handle, align); in gk20a_instobj_ctor_dma()
421 gk20a_instobj_ctor_iommu(struct gk20a_instmem *imem, u32 npages, u32 align, in gk20a_instobj_ctor_iommu() argument
466 align >> imem->iommu_pgshift, &r); in gk20a_instobj_ctor_iommu()
514 gk20a_instobj_new(struct nvkm_instmem *base, u32 size, u32 align, bool zero, in gk20a_instobj_new() argument
523 imem->domain ? "IOMMU" : "DMA", size, align); in gk20a_instobj_new()
527 align = max(roundup(align, PAGE_SIZE), PAGE_SIZE); in gk20a_instobj_new()
531 align, &node); in gk20a_instobj_new()
534 align, &node); in gk20a_instobj_new()
[all …]

12345678910>>...12