Home
last modified time | relevance | path

Searched full:alignment (Results 1 – 25 of 3540) sorted by relevance

12345678910>>...142

/kernel/linux/linux-5.10/fs/btrfs/tests/
Dfree-space-tree-tests.c153 u32 alignment) in test_empty_block_group() argument
167 u32 alignment) in test_remove_all() argument
188 u32 alignment) in test_remove_beginning() argument
191 {cache->start + alignment, cache->length - alignment}, in test_remove_beginning()
196 cache->start, alignment); in test_remove_beginning()
211 u32 alignment) in test_remove_end() argument
214 {cache->start, cache->length - alignment}, in test_remove_end()
219 cache->start + cache->length - alignment, in test_remove_end()
220 alignment); in test_remove_end()
234 u32 alignment) in test_remove_middle() argument
[all …]
/kernel/linux/linux-4.19/fs/btrfs/tests/
Dfree-space-tree-tests.c154 u32 alignment) in test_empty_block_group() argument
168 u32 alignment) in test_remove_all() argument
189 u32 alignment) in test_remove_beginning() argument
192 {cache->key.objectid + alignment, in test_remove_beginning()
193 cache->key.offset - alignment}, in test_remove_beginning()
198 cache->key.objectid, alignment); in test_remove_beginning()
213 u32 alignment) in test_remove_end() argument
216 {cache->key.objectid, cache->key.offset - alignment}, in test_remove_end()
222 cache->key.offset - alignment, in test_remove_end()
223 alignment); in test_remove_end()
[all …]
/kernel/linux/linux-5.10/tools/testing/selftests/exec/
Dload_address.c11 unsigned long long alignment; member
25 stats->alignment = 0; in ExtractStatistics()
31 if (info->dlpi_phdr[i].p_align > stats->alignment) in ExtractStatistics()
32 stats->alignment = info->dlpi_phdr[i].p_align; in ExtractStatistics()
50 if (extracted.alignment == 0) { in main()
51 fprintf(stderr, "No alignment found\n"); in main()
53 } else if (extracted.alignment & (extracted.alignment - 1)) { in main()
54 fprintf(stderr, "Alignment is not a power of 2\n"); in main()
58 misalign = extracted.load_address & (extracted.alignment - 1); in main()
60 printf("alignment = %llu, load_address = %llu\n", in main()
[all …]
/kernel/linux/linux-4.19/arch/mips/include/asm/octeon/
Dcvmx-bootmem.h41 /* minimum alignment of bootmem alloced blocks */
154 * @alignment: Alignment required - must be power of 2
158 extern void *cvmx_bootmem_alloc(uint64_t size, uint64_t alignment);
170 * @alignment: Alignment required - must be power of 2
174 uint64_t alignment);
186 * @alignment: Alignment required - must be power of 2
189 extern void *cvmx_bootmem_alloc_range(uint64_t size, uint64_t alignment,
209 * @alignment: Alignment required - must be power of 2
214 extern void *cvmx_bootmem_alloc_named(uint64_t size, uint64_t alignment,
249 * @align: Alignment of memory to be allocated. (must be a power of 2)
[all …]
/kernel/linux/linux-5.10/drivers/misc/
Dpci_endpoint_test.c117 size_t alignment; member
123 size_t alignment; member
353 size_t alignment = test->alignment; in pci_endpoint_test_copy() local
366 if (size > SIZE_MAX - alignment) in pci_endpoint_test_copy()
378 orig_src_addr = kzalloc(size + alignment, GFP_KERNEL); in pci_endpoint_test_copy()
385 get_random_bytes(orig_src_addr, size + alignment); in pci_endpoint_test_copy()
387 size + alignment, DMA_TO_DEVICE); in pci_endpoint_test_copy()
394 if (alignment && !IS_ALIGNED(orig_src_phys_addr, alignment)) { in pci_endpoint_test_copy()
395 src_phys_addr = PTR_ALIGN(orig_src_phys_addr, alignment); in pci_endpoint_test_copy()
411 orig_dst_addr = kzalloc(size + alignment, GFP_KERNEL); in pci_endpoint_test_copy()
[all …]
/kernel/linux/linux-5.10/arch/mips/include/asm/octeon/
Dcvmx-bootmem.h41 /* minimum alignment of bootmem alloced blocks */
158 * @alignment: Alignment required - must be power of 2
162 uint64_t alignment);
181 * @alignment: Alignment required - must be power of 2
186 extern void *cvmx_bootmem_alloc_named(uint64_t size, uint64_t alignment,
200 * @align: Alignment of memory to be allocated. (must be a power of 2)
221 * @param align Alignment of memory to be allocated. (must be a power of 2)
251 * (optional) requested address and alignment.
261 * @alignment: Requested alignment of the block. If this alignment
263 * power of 2. (Note: Alignment of
[all …]
/kernel/linux/linux-4.19/drivers/misc/
Dpci_endpoint_test.c117 size_t alignment; member
122 size_t alignment; member
347 size_t alignment = test->alignment; in pci_endpoint_test_copy() local
352 if (size > SIZE_MAX - alignment) in pci_endpoint_test_copy()
360 orig_src_addr = dma_alloc_coherent(dev, size + alignment, in pci_endpoint_test_copy()
368 if (alignment && !IS_ALIGNED(orig_src_phys_addr, alignment)) { in pci_endpoint_test_copy()
369 src_phys_addr = PTR_ALIGN(orig_src_phys_addr, alignment); in pci_endpoint_test_copy()
386 orig_dst_addr = dma_alloc_coherent(dev, size + alignment, in pci_endpoint_test_copy()
394 if (alignment && !IS_ALIGNED(orig_dst_phys_addr, alignment)) { in pci_endpoint_test_copy()
395 dst_phys_addr = PTR_ALIGN(orig_dst_phys_addr, alignment); in pci_endpoint_test_copy()
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/
Di915_gem_gtt.c164 * @alignment: required alignment of starting offset, may be 0 but
175 * is can insert the node. The hole address is aligned to @alignment and
194 u64 size, u64 alignment, unsigned long color, in i915_gem_gtt_insert() argument
205 GEM_BUG_ON(alignment && !is_power_of_2(alignment)); in i915_gem_gtt_insert()
206 GEM_BUG_ON(alignment && !IS_ALIGNED(alignment, I915_GTT_MIN_ALIGNMENT)); in i915_gem_gtt_insert()
216 if (unlikely(round_up(start, alignment) > round_down(end - size, alignment))) in i915_gem_gtt_insert()
226 * so we know that we always have a minimum alignment of 4096. in i915_gem_gtt_insert()
228 * with zero alignment, so where possible use the optimal in i915_gem_gtt_insert()
232 if (alignment <= I915_GTT_MIN_ALIGNMENT) in i915_gem_gtt_insert()
233 alignment = 0; in i915_gem_gtt_insert()
[all …]
/kernel/linux/linux-5.10/Documentation/ABI/testing/
Dsysfs-bus-iio-dma-buffer5 DMA buffers tend to have a alignment requirement for the
6 buffers. If this alignment requirement is not met samples might
9 This property reports the alignment requirements in bytes.
13 The alignment requirements in number of sample sets will depend
15 that the alignment requirement in samples sets might change
17 the alignment requirement reported in bytes by this property
/kernel/linux/linux-5.10/mm/
Dcma.c173 phys_addr_t alignment; in cma_init_reserved_mem() local
184 /* ensure minimal alignment required by mm core */ in cma_init_reserved_mem()
185 alignment = PAGE_SIZE << in cma_init_reserved_mem()
188 /* alignment should be aligned with order_per_bit */ in cma_init_reserved_mem()
189 if (!IS_ALIGNED(alignment >> PAGE_SHIFT, 1 << order_per_bit)) in cma_init_reserved_mem()
192 if (ALIGN(base, alignment) != base || ALIGN(size, alignment) != size) in cma_init_reserved_mem()
221 * @alignment: Alignment for the CMA area, should be power of 2 or zero
238 phys_addr_t alignment, unsigned int order_per_bit, in cma_declare_contiguous_nid() argument
253 pr_debug("%s(size %pa, base %pa, limit %pa alignment %pa)\n", in cma_declare_contiguous_nid()
254 __func__, &size, &base, &limit, &alignment); in cma_declare_contiguous_nid()
[all …]
/kernel/linux/linux-4.19/mm/
Dcma.c184 phys_addr_t alignment; in cma_init_reserved_mem() local
195 /* ensure minimal alignment required by mm core */ in cma_init_reserved_mem()
196 alignment = PAGE_SIZE << in cma_init_reserved_mem()
199 /* alignment should be aligned with order_per_bit */ in cma_init_reserved_mem()
200 if (!IS_ALIGNED(alignment >> PAGE_SHIFT, 1 << order_per_bit)) in cma_init_reserved_mem()
203 if (ALIGN(base, alignment) != base || ALIGN(size, alignment) != size) in cma_init_reserved_mem()
233 * @alignment: Alignment for the CMA area, should be power of 2 or zero
249 phys_addr_t alignment, unsigned int order_per_bit, in cma_declare_contiguous() argument
263 pr_debug("%s(size %pa, base %pa, limit %pa alignment %pa)\n", in cma_declare_contiguous()
264 __func__, &size, &base, &limit, &alignment); in cma_declare_contiguous()
[all …]
/kernel/linux/linux-4.19/Documentation/arm/
Dmem_alignment2 kernel code lately. Therefore the alignment fixup is now unconditionally
9 Of course this is a bad idea to rely on the alignment trap to perform
12 alignment trap can fixup misaligned access for the exception cases, but at
15 Now for user space applications, it is possible to configure the alignment
26 To change the alignment trap behavior, simply echo a number into
27 /proc/cpu/alignment. The number is made up from various bits:
51 echo 1 > /proc/cpu/alignment
/kernel/linux/linux-5.10/Documentation/arm/
Dmem_alignment.rst2 Memory alignment
6 kernel code lately. Therefore the alignment fixup is now unconditionally
13 Of course this is a bad idea to rely on the alignment trap to perform
16 alignment trap can fixup misaligned access for the exception cases, but at
19 Now for user space applications, it is possible to configure the alignment
30 To change the alignment trap behavior, simply echo a number into
31 /proc/cpu/alignment. The number is made up from various bits:
56 echo 1 > /proc/cpu/alignment
/kernel/linux/linux-4.19/arch/mips/cavium-octeon/executive/
Dcvmx-bootmem.c125 void *cvmx_bootmem_alloc_range(uint64_t size, uint64_t alignment, in cvmx_bootmem_alloc_range() argument
130 cvmx_bootmem_phy_alloc(size, min_addr, max_addr, alignment, 0); in cvmx_bootmem_alloc_range()
139 uint64_t alignment) in cvmx_bootmem_alloc_address() argument
141 return cvmx_bootmem_alloc_range(size, alignment, address, in cvmx_bootmem_alloc_address()
145 void *cvmx_bootmem_alloc(uint64_t size, uint64_t alignment) in cvmx_bootmem_alloc() argument
147 return cvmx_bootmem_alloc_range(size, alignment, 0, 0); in cvmx_bootmem_alloc()
207 void *cvmx_bootmem_alloc_named(uint64_t size, uint64_t alignment, char *name) in cvmx_bootmem_alloc_named() argument
209 return cvmx_bootmem_alloc_named_range(size, 0, 0, alignment, name); in cvmx_bootmem_alloc_named()
271 uint64_t address_max, uint64_t alignment, in cvmx_bootmem_phy_alloc() argument
288 (unsigned long long)alignment); in cvmx_bootmem_phy_alloc()
[all …]
/kernel/linux/linux-5.10/arch/mips/cavium-octeon/executive/
Dcvmx-bootmem.c128 * @alignment: Alignment required - must be power of 2
131 static void *cvmx_bootmem_alloc_range(uint64_t size, uint64_t alignment, in cvmx_bootmem_alloc_range() argument
136 cvmx_bootmem_phy_alloc(size, min_addr, max_addr, alignment, 0); in cvmx_bootmem_alloc_range()
145 uint64_t alignment) in cvmx_bootmem_alloc_address() argument
147 return cvmx_bootmem_alloc_range(size, alignment, address, in cvmx_bootmem_alloc_address()
165 void *cvmx_bootmem_alloc_named(uint64_t size, uint64_t alignment, char *name) in cvmx_bootmem_alloc_named() argument
167 return cvmx_bootmem_alloc_named_range(size, 0, 0, alignment, name); in cvmx_bootmem_alloc_named()
218 uint64_t address_max, uint64_t alignment, in cvmx_bootmem_phy_alloc() argument
235 (unsigned long long)alignment); in cvmx_bootmem_phy_alloc()
259 /* Round req_size up to mult of minimum alignment bytes */ in cvmx_bootmem_phy_alloc()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/lib/
Drheap.c253 rh_info_t *rh_create(unsigned int alignment) in rh_create() argument
257 /* Alignment must be a power of two */ in rh_create()
258 if ((alignment & (alignment - 1)) != 0) in rh_create()
265 info->alignment = alignment; in rh_create()
300 void rh_init(rh_info_t * info, unsigned int alignment, int max_blocks, in rh_init() argument
306 /* Alignment must be a power of two */ in rh_init()
307 if ((alignment & (alignment - 1)) != 0) in rh_init()
310 info->alignment = alignment; in rh_init()
338 m = info->alignment - 1; in rh_attach_region()
383 m = info->alignment - 1; in rh_detach_region()
[all …]
/kernel/linux/linux-4.19/arch/powerpc/lib/
Drheap.c253 rh_info_t *rh_create(unsigned int alignment) in rh_create() argument
257 /* Alignment must be a power of two */ in rh_create()
258 if ((alignment & (alignment - 1)) != 0) in rh_create()
265 info->alignment = alignment; in rh_create()
300 void rh_init(rh_info_t * info, unsigned int alignment, int max_blocks, in rh_init() argument
306 /* Alignment must be a power of two */ in rh_init()
307 if ((alignment & (alignment - 1)) != 0) in rh_init()
310 info->alignment = alignment; in rh_init()
338 m = info->alignment - 1; in rh_attach_region()
383 m = info->alignment - 1; in rh_detach_region()
[all …]
/kernel/linux/linux-5.10/drivers/firmware/efi/libstub/
Drelocate.c11 * @align: minimum alignment of the allocated memory area. It should
45 * Enforce minimum alignment that EFI or Linux requires when in efi_low_alloc_above()
48 * alignment constraints. in efi_low_alloc_above()
105 * @alignment: minimum alignment of the allocated memory area. It
110 * to @alignment but at least EFI_ALLOC_ALIGN. If the preferred address
123 unsigned long alignment, in efi_relocate_kernel() argument
145 * as possible while respecting the required alignment. in efi_relocate_kernel()
156 status = efi_low_alloc_above(alloc_size, alignment, &new_addr, in efi_relocate_kernel()
/kernel/liteos_a/compat/posix/src/
Dposix_memalign.c36 int posix_memalign(void **memAddr, size_t alignment, size_t size) in posix_memalign() argument
38 …if ((alignment == 0) || ((alignment & (alignment - 1)) != 0) || ((alignment % sizeof(void *)) != 0… in posix_memalign()
42 *memAddr = LOS_MemAllocAlign(OS_SYS_MEM_ADDR, size, alignment); in posix_memalign()
/kernel/linux/linux-5.10/Documentation/core-api/
Dunaligned-memory-access.rst36 Natural alignment
39 The rule mentioned above forms what we refer to as natural alignment:
43 When writing code, assume the target architecture has natural alignment
46 In reality, only a few architectures require natural alignment on all sizes
48 writing code that satisfies natural alignment requirements is the easiest way
100 Fortunately, the compiler understands the alignment constraints, so in the
126 For a natural alignment scheme, the compiler would only have to add a single
128 to satisfy alignment constraints for arrays of these structures.
137 architectural alignment requirements. However, again, the compiler is aware
138 of the alignment constraints and will generate extra instructions to perform
[all …]
/kernel/linux/linux-4.19/Documentation/
Dunaligned-memory-access.txt36 Natural alignment
39 The rule mentioned above forms what we refer to as natural alignment:
43 When writing code, assume the target architecture has natural alignment
46 In reality, only a few architectures require natural alignment on all sizes
48 writing code that satisfies natural alignment requirements is the easiest way
100 Fortunately, the compiler understands the alignment constraints, so in the
126 For a natural alignment scheme, the compiler would only have to add a single
128 to satisfy alignment constraints for arrays of these structures.
137 architectural alignment requirements. However, again, the compiler is aware
138 of the alignment constraints and will generate extra instructions to perform
[all …]
/kernel/liteos_m/targets/riscv_nuclei_gd32vf103_soc_gcc/SoC/gd32vf103/Common/Source/Drivers/
Dgd32vf103_dac.c166 \param[in] dac_align: data alignment
168 \arg DAC_ALIGN_8B_R: data right 8 bit alignment
169 \arg DAC_ALIGN_12B_R: data right 12 bit alignment
170 \arg DAC_ALIGN_12B_L: data left 12 bit alignment
179 /* data right 12 bit alignment */ in dac_data_set()
183 /* data left 12 bit alignment */ in dac_data_set()
187 /* data right 8 bit alignment */ in dac_data_set()
196 /* data right 12 bit alignment */ in dac_data_set()
200 /* data left 12 bit alignment */ in dac_data_set()
204 /* data right 8 bit alignment */ in dac_data_set()
[all …]
/kernel/linux/linux-5.10/arch/um/drivers/
Dcow_user.c58 * Add alignment field so that different alignments can be used for the
65 * by the bitmap alignment.
67 * by the alignment field. This is to allow COW files to be
69 * /dev/raw, with a 512 byte alignment restriction. This also
79 * align size to 8-byte alignment. This shifted all fields above (no padding
92 __u32 alignment; member
104 __u32 alignment; member
198 int sectorsize, int alignment, unsigned long long *size) in write_cow_header() argument
252 header->alignment = htobe32(alignment); in write_cow_header()
347 *align_out = be32toh(header->v3.alignment); in read_cow_header()
[all …]
/kernel/linux/linux-4.19/arch/um/drivers/
Dcow_user.c57 * Add alignment field so that different alignments can be used for the
64 * by the bitmap alignment.
66 * by the alignment field. This is to allow COW files to be
68 * /dev/raw, with a 512 byte alignment restriction. This also
78 * align size to 8-byte alignment. This shifted all fields above (no padding
91 __u32 alignment; member
103 __u32 alignment; member
197 int sectorsize, int alignment, unsigned long long *size) in write_cow_header() argument
251 header->alignment = htobe32(alignment); in write_cow_header()
346 *align_out = be32toh(header->v3.alignment); in read_cow_header()
[all …]
/kernel/linux/linux-5.10/arch/arm64/lib/
Dmemcmp.S18 * alignment handled by the hardware)
59 * The input source addresses are at alignment boundary.
94 * alignment boundary. Round down the addresses and then mask off
102 * We can not add limit with alignment offset(tmp1) here. Since the
112 lsl tmp1, tmp1, #3/* Bytes beyond alignment -> bits.*/
113 neg tmp1, tmp1/* Bits to alignment -64. */
124 /*src1 and src2 have different alignment offset.*/
160 add src1, src1, tmp3 /*backwards src1 to alignment boundary*/
173 /*How far is the current SRC2 from the alignment boundary...*/
181 * to an alignment boundary,load eight bytes and compare from
[all …]

12345678910>>...142