/linux/Documentation/core-api/ |
H A D | unaligned-memory-access.rst | 2 Unaligned Memory Accesses 15 unaligned accesses, why you need to write code that doesn't cause them, 19 The definition of an unaligned access 22 Unaligned memory accesses occur when you try to read N bytes of data starting 25 reading 4 bytes of data from address 0x10005 would be an unaligned memory 52 Why unaligned access is bad 55 The effects of performing an unaligned memory access vary from architecture 59 - Some architectures are able to perform unaligned memory accesses 61 - Some architectures raise processor exceptions when unaligned accesses 62 happen. The exception handler is able to correct the unaligned access, [all …]
|
/linux/tools/perf/pmu-events/arch/powerpc/power10/ |
H A D | others.json | 45 …scription": "Load instructions in LD0 port that are either unaligned, or treated as unaligned and … 50 …scription": "Load instructions in LD1 port that are either unaligned, or treated as unaligned and … 55 …cription": "Store instructions in ST0 port that are either unaligned, or treated as unaligned and … 60 …cription": "Store instructions in ST1 port that are either unaligned, or treated as unaligned and …
|
/linux/Documentation/arch/arm/ |
H A D | mem_alignment.rst | 14 unaligned memory access in general. If those access are predictable, you 15 are better to use the macros provided by include/linux/unaligned.h. The 20 trap to SIGBUS any code performing unaligned access (good for debugging bad 27 real bad - it changes the behaviour of all unaligned instructions in user 36 0 A user process performing an unaligned memory access 42 performing the unaligned access. This is of course 47 performing the unaligned access. 59 information on unaligned access occurrences plus the current mode of
|
/linux/arch/riscv/kernel/ |
H A D | unaligned_access_speed.c | 17 #include "copy-unaligned.h" 49 /* Make an unaligned destination buffer. */ in check_unaligned_access() 98 pr_warn("cpu%d: rdtime lacks granularity needed to measure unaligned access speed\n", in check_unaligned_access() 108 …pr_info("cpu%d: Ratio of byte access time to unaligned word access is %d.%02d, unaligned accesses … in check_unaligned_access() 137 /* Measure unaligned access speed on all CPUs present at boot in parallel. */ 212 * result of unaligned access speed for all CPUs will be available. in set_unaligned_access_static_branches() 303 /* Make an unaligned destination buffer. */ in check_vector_unaligned_access() 356 pr_warn("cpu%d: rdtime lacks granularity needed to measure unaligned vector access speed\n", in check_vector_unaligned_access() 366 …nfo("cpu%d: Ratio of vector byte access time to vector unaligned word access is %d.%02d, unaligned… in check_vector_unaligned_access() 378 /* Measure unaligned access speed on all CPUs present at boot in parallel. */ [all …]
|
/linux/tools/perf/pmu-events/arch/arm64/arm/neoverse-n1/ |
H A D | spec_operation.json | 16 …"PublicDescription": "Counts unaligned memory read operations issued by the CPU. This event counts… 20 …"PublicDescription": "Counts unaligned memory write operations issued by the CPU. This event count… 24 …"PublicDescription": "Counts unaligned memory operations issued by the CPU. This event counts unal…
|
/linux/tools/perf/pmu-events/arch/arm64/arm/neoverse-v1/ |
H A D | spec_operation.json | 20 …"PublicDescription": "Counts unaligned memory read operations issued by the CPU. This event counts… 24 …"PublicDescription": "Counts unaligned memory write operations issued by the CPU. This event count… 28 …"PublicDescription": "Counts unaligned memory operations issued by the CPU. This event counts unal…
|
/linux/tools/testing/selftests/powerpc/ptrace/ |
H A D | ptrace-hwbreak.c | 46 __u8 b[B_LEN]; /* double word unaligned */ 175 /* PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED, WO test */ in test_workload() 178 /* PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED, RO test */ in test_workload() 181 /* PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED, RW test */ in test_workload() 187 /* PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED, DAR OUTSIDE, RW test */ in test_workload() 202 /* PPC_PTRACE_SETHWDEBUG 2, MODE_RANGE, DW UNALIGNED, RO test */ in test_workload() 438 char *name2 = "PPC_PTRACE_SETHWDEBUG 2, MODE_RANGE, DW UNALIGNED"; in test_multi_sethwdebug_range() 452 /* PPC_PTRACE_SETHWDEBUG 2, MODE_RANGE, DW UNALIGNED, RO test */ in test_multi_sethwdebug_range() 500 char *name = "PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED"; in test_sethwdebug_range_unaligned() 504 /* PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED, WO test */ in test_sethwdebug_range_unaligned() [all …]
|
/linux/include/rdma/ |
H A D | ib_hdrs.h | 10 #include <linux/unaligned.h> 49 __be64 vaddr; /* potentially unaligned */ 55 __be64 vaddr; /* potentially unaligned */ 57 __be64 swap_data; /* potentially unaligned */ 58 __be64 compare_data; /* potentially unaligned */ 74 __be64 atomic_ack_eth; /* potentially unaligned */ 108 /* accessors for unaligned __be64 items */
|
/linux/arch/mips/kernel/ |
H A D | unaligned.c | 2 * Handle unaligned accesses by emulation. 17 * Putting data to unaligned addresses is a bad practice even on Intel where 92 #include <asm/unaligned-emul.h> 340 * would blow up, so for now we don't handle unaligned 64-bit in emulate_load_store_insn() 363 * would blow up, so for now we don't handle unaligned 64-bit in emulate_load_store_insn() 418 * would blow up, so for now we don't handle unaligned 64-bit in emulate_load_store_insn() 444 die_if_kernel("Unaligned FP access in kernel code", regs); in emulate_load_store_insn() 592 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_insn() 598 die_if_kernel("Unhandled kernel unaligned access", regs); in emulate_load_store_insn() 605 ("Unhandled kernel unaligned access or invalid instruction", regs); in emulate_load_store_insn() [all …]
|
/linux/tools/usb/ |
H A D | hcd-tests.sh | 117 echo "test 21: control writes, unaligned" 132 echo "test 17: $COUNT transfers, unaligned DMA map by core" 135 echo "test 19: $COUNT transfers, unaligned DMA map by usb_alloc_coherent" 193 echo "test 18: $COUNT transfers, unaligned DMA map by core" 196 echo "test 20: $COUNT transfers, unaligned DMA map by usb_alloc_coherent" 228 echo "test 23: $COUNT transfers, unaligned"
|
/linux/arch/alpha/kernel/ |
H A D | traps.c | 25 #include <linux/unaligned.h> 355 * to handle floating-point regs), user-mode unaligned accesses are 359 * on a gp-register unaligned load/store, something is _very_ wrong 369 } unaligned[2]; variable 385 unaligned[0].count++; in do_entUna() 386 unaligned[0].va = (unsigned long) va; in do_entUna() 387 unaligned[0].pc = pc; in do_entUna() 389 /* We don't want to use the generic get/put unaligned macros as in do_entUna() 518 printk("Bad unaligned kernel access at %016lx: %p %lx %lu\n", in do_entUna() 529 printk("Forwarding unaligned exception at %lx (%lx)\n", in do_entUna() [all …]
|
/linux/arch/sparc/kernel/ |
H A D | unaligned_32.c | 3 * unaligned.c: Unaligned load/store trap handling with special 60 printk("Impossible unaligned trap. insn=%08x\n", insn); in decode_access_size() 61 die_if_kernel("Byte sized unaligned access?!?!", current->thread.kregs); in decode_access_size() 246 printk("Unsupported unaligned load/store trap for kernel at <%08lx>.\n", in kernel_unaligned_trap() 248 unaligned_panic("Wheee. Kernel does fpu/atomic unaligned load/store."); in kernel_unaligned_trap() 267 panic("Impossible kernel unaligned trap."); in kernel_unaligned_trap()
|
/linux/arch/mips/loongson64/ |
H A D | cop2-ex.c | 26 #include <asm/unaligned-emul.h> 193 die_if_kernel("Unaligned FP access in kernel code", regs); in loongson_cu2_call() 209 die_if_kernel("Unaligned FP access in kernel code", regs); in loongson_cu2_call() 276 die_if_kernel("Unaligned FP access in kernel code", regs); in loongson_cu2_call() 294 die_if_kernel("Unaligned FP access in kernel code", regs); in loongson_cu2_call() 325 die_if_kernel("Unhandled kernel unaligned access", regs); in loongson_cu2_call() 331 die_if_kernel("Unhandled kernel unaligned access", regs); in loongson_cu2_call()
|
/linux/arch/parisc/kernel/ |
H A D | unaligned.c | 3 * Unaligned memory access handler 15 #include <linux/unaligned.h> 19 #include "unaligned.h" 41 /* skip LDB - never unaligned (index) */ 49 /* skip LDB - never unaligned (short) */ 57 /* skip STB - never unaligned */ 61 /* skip STBY - never unaligned */ 62 /* skip STDBY - never unaligned */ 392 printk(KERN_WARNING "%s(%d): unaligned access to " RFMT in handle_unaligned() 408 pr_warn("Kernel: unaligned access to " RFMT " in %pS " in handle_unaligned() [all …]
|
/linux/arch/arc/lib/ |
H A D | strchr-700.S | 41 breq r7,0,.Loop ; For speed, we want this branch to be unaligned. 45 breq r12,0,.Loop ; For speed, we want this branch to be unaligned. 51 ; /* We require this code address to be unaligned for speed... */ 67 breq r7,0,.Loop /* ... so that this branch is unaligned. */
|
/linux/net/xdp/ |
H A D | xsk_buff_pool.c | 60 bool unaligned = umem->flags & XDP_UMEM_UNALIGNED_CHUNK_FLAG; in xp_create_and_assign_umem() local 65 entries = unaligned ? umem->chunks : 0; in xp_create_and_assign_umem() 85 pool->unaligned = unaligned; in xp_create_and_assign_umem() 108 if (pool->unaligned) in xp_create_and_assign_umem() 422 if (!pool->unaligned) { in xp_init_dma_info() 478 if (pool->unaligned) in xp_dma_map() 517 if (pool->unaligned) { in xp_get_xskb() 544 ok = pool->unaligned ? xp_check_unaligned(pool, &addr) : in __xp_alloc() 604 ok = pool->unaligned ? xp_check_unaligned(pool, &addr) : in xp_alloc_new_from_fq() 712 return pool->unaligned ? xp_unaligned_add_offset_to_addr(addr) : addr; in __xp_raw_get_addr()
|
/linux/Documentation/devicetree/bindings/pci/ |
H A D | ti-pci.txt | 36 - ti,syscon-unaligned-access: phandle to the syscon DT node. The 1st argument 39 for setting the bit to enable unaligned 54 - ti,syscon-unaligned-access: phandle to the syscon DT node. The 1st argument 57 for setting the bit to enable unaligned
|
/linux/arch/xtensa/include/asm/ |
H A D | uaccess.h | 89 * unaligned exception and an MMU-related exception (unaligned 94 * Unaligned exception occurs. 95 * Unaligned exception handler tries to make aligned accesses. 100 * The kernel currently prohibits user unaligned accesses. We use the 101 * __check_align_* macros to check for unaligned addresses before
|
/linux/arch/microblaze/include/asm/ |
H A D | flat.h | 11 #include <linux/unaligned.h> 23 * relocated. rp is a potentially unaligned pointer to the 52 * unaligned.
|
/linux/arch/xtensa/lib/ |
H A D | memcopy.S | 32 * If destination is unaligned, align it by conditionally 37 * else (if source is unaligned), 85 * Destination is unaligned 189 * Destination is aligned, Source is unaligned 195 # copy 16 bytes per iteration for word-aligned dst and unaligned src 339 * Destination is unaligned 452 * Destination is aligned, Source is unaligned 458 # copy 16 bytes per iteration for word-aligned dst and unaligned src
|
H A D | usercopy.S | 33 * If destination is aligned and source unaligned, 35 * If destination is unaligned, align it by conditionally 86 * Destination is unaligned 198 * Destination is aligned, Source is unaligned 205 # copy 16 bytes per iteration for word-aligned dst and unaligned src
|
/linux/drivers/net/ethernet/aquantia/atlantic/hw_atl2/ |
H A D | hw_atl2_utils_fw.c | 22 "Unaligned write " # ITEM);\ 24 "Unaligned write length " # ITEM);\ 34 "Unaligned get " # ITEM);\ 36 "Unaligned get length " # ITEM);\ 50 "Unaligned read " # ITEM);\ 52 "Unaligned read length " # ITEM);\ 64 "Unaligned read_safe " # ITEM);\ 67 "Unaligned read_safe length " # ITEM);\
|
/linux/arch/loongarch/ |
H A D | Kconfig | 549 bool "Enable -mstrict-align to prevent unaligned accesses" if EXPERT 552 Not all LoongArch cores support h/w unaligned access, we can use 553 -mstrict-align build parameter to prevent unaligned accesses. 555 CPUs with h/w unaligned access support: 559 CPUs without h/w unaligned access support: 562 If you want to make sure whether to support unaligned memory access 567 to run kernel only on systems with h/w unaligned access support in
|
/linux/tools/testing/selftests/bpf/progs/ |
H A D | verifier_xadd.c | 16 __description("xadd/w check unaligned stack") 30 __description("xadd/w check unaligned map") 54 __description("xadd/w check unaligned pkt")
|
/linux/tools/testing/selftests/mm/ |
H A D | hugetlb_dio.c | 7 * unaligned user buffer offsets (w.r.t page boundary), ensuring the hugepage 118 /* start is unaligned and end is aligned */ in main() 121 /* both start and end are unaligned */ in main()
|