Home
last modified time | relevance | path

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

12345678910>>...93

/openbmc/linux/fs/btrfs/tests/
H A 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->start + alignment, cache->length - alignment}, in test_remove_beginning()
197 cache->start, alignment); in test_remove_beginning()
212 u32 alignment) in test_remove_end() argument
215 {cache->start, cache->length - alignment}, in test_remove_end()
220 cache->start + cache->length - alignment, in test_remove_end()
221 alignment); in test_remove_end()
235 u32 alignment) in test_remove_middle() argument
[all …]
/openbmc/linux/tools/testing/selftests/exec/
H A 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 …]
/openbmc/linux/drivers/misc/
H A Dpci_endpoint_test.c121 size_t alignment; member
127 size_t alignment; member
332 struct pci_endpoint_test_xfer_param *param, size_t alignment) in pci_endpoint_test_validate_xfer_params() argument
339 if (param->size > SIZE_MAX - alignment) { in pci_endpoint_test_validate_xfer_params()
366 size_t alignment = test->alignment; in pci_endpoint_test_copy() local
378 err = pci_endpoint_test_validate_xfer_params(dev, &param, alignment); in pci_endpoint_test_copy()
393 orig_src_addr = kzalloc(size + alignment, GFP_KERNEL); in pci_endpoint_test_copy()
400 get_random_bytes(orig_src_addr, size + alignment); in pci_endpoint_test_copy()
402 size + alignment, DMA_TO_DEVICE); in pci_endpoint_test_copy()
409 if (alignment && !IS_ALIGNED(orig_src_phys_addr, alignment)) { in pci_endpoint_test_copy()
[all …]
/openbmc/qemu/util/
H A Dmemalign.c32 void *qemu_try_memalign(size_t alignment, size_t size) in qemu_try_memalign() argument
36 if (alignment < sizeof(void*)) { in qemu_try_memalign()
37 alignment = sizeof(void*); in qemu_try_memalign()
39 g_assert(is_power_of_2(alignment)); in qemu_try_memalign()
53 ret = posix_memalign(&ptr, alignment, size); in qemu_try_memalign()
59 ptr = _aligned_malloc(size, alignment); in qemu_try_memalign()
63 ptr = memalign(alignment, size); in qemu_try_memalign()
67 trace_qemu_memalign(alignment, size, ptr); in qemu_try_memalign()
71 void *qemu_memalign(size_t alignment, size_t size) in qemu_memalign() argument
73 void *p = qemu_try_memalign(alignment, size); in qemu_memalign()
[all …]
/openbmc/linux/arch/mips/include/asm/octeon/
H A 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 …]
/openbmc/linux/drivers/gpu/drm/i915/
H A Di915_gem_gtt.c162 * @alignment: required alignment of starting offset, may be 0 but
173 * is can insert the node. The hole address is aligned to @alignment and
193 u64 size, u64 alignment, unsigned long color, in i915_gem_gtt_insert() argument
204 GEM_BUG_ON(alignment && !is_power_of_2(alignment)); in i915_gem_gtt_insert()
205 GEM_BUG_ON(alignment && !IS_ALIGNED(alignment, I915_GTT_MIN_ALIGNMENT)); in i915_gem_gtt_insert()
215 if (unlikely(round_up(start, alignment) > round_down(end - size, alignment))) in i915_gem_gtt_insert()
225 * so we know that we always have a minimum alignment of 4096. in i915_gem_gtt_insert()
227 * with zero alignment, so where possible use the optimal in i915_gem_gtt_insert()
231 if (alignment <= I915_GTT_MIN_ALIGNMENT) in i915_gem_gtt_insert()
232 alignment = 0; in i915_gem_gtt_insert()
[all …]
/openbmc/qemu/include/qemu/
H A Dmemalign.h13 * @alignment: required alignment, in bytes
17 * address will be an exact multiple of @alignment).
18 * @alignment must be a power of 2, or the function will assert().
24 void *qemu_try_memalign(size_t alignment, size_t size);
27 * @alignment: required alignment, in bytes
36 void *qemu_memalign(size_t alignment, size_t size);
/openbmc/linux/Documentation/ABI/testing/
H A 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
/openbmc/qemu/include/exec/
H A Dmemop.h47 * MO_UNALN accesses are never checked for alignment.
54 * but less strictly than the natural alignment.
56 * MO_ALIGN supposes the alignment size is the size of a memory access.
60 * - an alignment to the size of an access (MO_ALIGN);
61 * - an alignment to a specified size, which may be more or less than
91 * Depending on alignment, one or both will be single-copy atomic.
94 * by the alignment. E.g. if the address is 0 mod 4, then each
171 * Extract the alignment size from the memop.
178 /* No alignment required. */ in memop_alignment_bits()
181 /* A natural alignment requirement. */ in memop_alignment_bits()
[all …]
/openbmc/linux/arch/mips/cavium-octeon/executive/
H A 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 …]
/openbmc/linux/drivers/gpu/drm/i915/display/
H A Dintel_fb_pin.c31 u32 alignment; in intel_pin_fb_obj_dpt() local
43 alignment = 4096 * 512; in intel_pin_fb_obj_dpt()
79 if (i915_vma_misplaced(vma, 0, alignment, 0)) { in intel_pin_fb_obj_dpt()
85 ret = i915_vma_pin_ww(vma, &ww, 0, alignment, PIN_GLOBAL); in intel_pin_fb_obj_dpt()
94 vma->display_alignment = max(vma->display_alignment, alignment); in intel_pin_fb_obj_dpt()
119 u32 alignment; in intel_pin_and_fence_fb_obj() local
126 alignment = intel_cursor_alignment(dev_priv); in intel_pin_and_fence_fb_obj()
128 alignment = intel_surf_alignment(fb, 0); in intel_pin_and_fence_fb_obj()
129 if (drm_WARN_ON(dev, alignment && !is_power_of_2(alignment))) in intel_pin_and_fence_fb_obj()
137 if (intel_scanout_needs_vtd_wa(dev_priv) && alignment < 256 * 1024) in intel_pin_and_fence_fb_obj()
[all …]
/openbmc/linux/Documentation/arch/arm/
H A 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
/openbmc/linux/arch/powerpc/lib/
H A 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 …]
/openbmc/linux/arch/parisc/include/asm/
H A Dldcw.h5 /* Because kmalloc only guarantees 8-byte alignment for kmalloc'd data,
6 and GCC only guarantees 8-byte alignment for stack locals, we can't
7 be assured of 16-byte alignment for atomic lock data even if we
16 16-byte alignment requirement for ldcw and ldcd is relaxed, and instead
17 they only require "natural" alignment (4-byte for ldcw, 8-byte for
22 require 16-byte alignment. If the address is unaligned, the operation
25 This hid the problem for years. So, restore the 16-byte alignment dropped
/openbmc/linux/drivers/firmware/efi/libstub/
H A Drelocate.c11 * @align: minimum alignment of the allocated memory area. It should
36 * Enforce minimum alignment that EFI or Linux requires when in efi_low_alloc_above()
39 * alignment constraints. in efi_low_alloc_above()
99 * @alignment: minimum alignment of the allocated memory area. It
104 * to @alignment but at least EFI_ALLOC_ALIGN. If the preferred address
117 unsigned long alignment, in efi_relocate_kernel() argument
139 * as possible while respecting the required alignment. in efi_relocate_kernel()
150 status = efi_low_alloc_above(alloc_size, alignment, &new_addr, in efi_relocate_kernel()
/openbmc/u-boot/doc/
H A DREADME.unaligned-memory-access.txt2 really only the section about "Alignment vs. Networking" removed.
30 Natural alignment
33 The rule mentioned above forms what we refer to as natural alignment:
37 When writing code, assume the target architecture has natural alignment
40 In reality, only a few architectures require natural alignment on all sizes
42 writing code that satisfies natural alignment requirements is the easiest way
94 Fortunately, the compiler understands the alignment constraints, so in the
120 For a natural alignment scheme, the compiler would only have to add a single
122 to satisfy alignment constraints for arrays of these structures.
131 architectural alignment requirements. However, again, the compiler is aware
[all …]
/openbmc/linux/Documentation/core-api/
H A 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 …]
/openbmc/qemu/tests/qemu-iotests/
H A D24149 # raw file (either because the server doesn't advertise alignment too
56 echo "=== Exporting unaligned raw image, natural alignment ==="
67 echo "=== Exporting unaligned raw image, forced server sector alignment ==="
71 # sector alignment, here at the server.
81 echo "=== Exporting unaligned raw image, forced client sector alignment ==="
84 # Now force sector alignment at the client.
95 # However, since qemu as server always rounds up to a sector alignment,
/openbmc/linux/block/
H A Dblk-settings.c373 * blk_queue_alignment_offset - set physical block alignment offset
375 * @offset: alignment offset in bytes
494 unsigned int alignment = sector_div(sector, granularity >> SECTOR_SHIFT) in queue_limit_alignment_offset() local
497 return (granularity + lim->alignment_offset - alignment) % granularity; in queue_limit_alignment_offset()
503 unsigned int alignment, granularity, offset; in queue_limit_discard_alignment() local
509 alignment = lim->discard_alignment >> SECTOR_SHIFT; in queue_limit_discard_alignment()
518 offset = (granularity + alignment - offset) % granularity; in queue_limit_discard_alignment()
544 * attempt to combine the values and ensure proper alignment.
547 * top device's block sizes and alignment offsets may be adjusted to
548 * ensure alignment with the bottom device. If no compatible sizes
[all …]
/openbmc/linux/arch/um/drivers/
H A 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 …]
/openbmc/linux/mm/
H A Dcma.c190 /* ensure minimal alignment required by mm core */ in cma_init_reserved_mem()
220 * @alignment: Alignment for the CMA area, should be power of 2 or zero
237 phys_addr_t alignment, unsigned int order_per_bit, in cma_declare_contiguous_nid() argument
252 pr_debug("%s(size %pa, base %pa, limit %pa alignment %pa)\n", in cma_declare_contiguous_nid()
253 __func__, &size, &base, &limit, &alignment); in cma_declare_contiguous_nid()
263 if (alignment && !is_power_of_2(alignment)) in cma_declare_contiguous_nid()
270 alignment = max_t(phys_addr_t, alignment, CMA_MIN_ALIGNMENT_BYTES); in cma_declare_contiguous_nid()
271 if (fixed && base & (alignment - 1)) { in cma_declare_contiguous_nid()
274 &base, &alignment); in cma_declare_contiguous_nid()
277 base = ALIGN(base, alignment); in cma_declare_contiguous_nid()
[all …]
/openbmc/linux/arch/x86/
H A DMakefile34 # For gcc stack alignment is specified with -mpreferred-stack-boundary,
35 # clang has the option -mstack-alignment for that purpose.
39 else ifneq ($(call cc-option, -mstack-alignment=16),)
40 cc_stack_align4 := -mstack-alignment=4
41 cc_stack_align8 := -mstack-alignment=8
103 # alignment of 16 bytes. This reduces stack usage and the number of
104 # alignment instructions.
140 # By default gcc and clang use a stack alignment of 16 bytes for x86.
143 # alignment it will generate extra alignment instructions for the
144 # default alignment which keep the stack *mis*aligned.
[all …]
/openbmc/linux/arch/xtensa/lib/
H A Dmemset.S30 * the alignment labels).
45 movi a6, 3 # for alignment tests
57 .align 4 # 1 mod 4 alignment for LOOPNEZ
58 .byte 0 # (0 mod 4 alignment for LBEG)
106 bbci.l a5, 0, .L20 # branch if dst alignment half-aligned
126 .byte 0 # 1 mod 4 alignment for LOOPNEZ
127 # (0 mod 4 alignment for LBEG)
/openbmc/linux/drivers/bluetooth/
H A Dhci_h4.c159 u8 alignment = hu->alignment ? hu->alignment : 1; in h4_recv_buf() local
255 hu->padding = (skb->len + 1) % alignment; in h4_recv_buf()
256 hu->padding = (alignment - hu->padding) % alignment; in h4_recv_buf()
263 hu->padding = (skb->len + 1) % alignment; in h4_recv_buf()
264 hu->padding = (alignment - hu->padding) % alignment; in h4_recv_buf()
/openbmc/linux/arch/powerpc/include/asm/
H A Drheap.h27 unsigned int alignment; member
50 extern rh_info_t *rh_create(unsigned int alignment);
56 extern void rh_init(rh_info_t * info, unsigned int alignment, int max_blocks,
65 /* Allocate the given size from the remote heap (with alignment) */
66 extern unsigned long rh_alloc_align(rh_info_t * info, int size, int alignment,

12345678910>>...93