| /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/rust/zerocopy/src/ |
| H A D | impls.rs | 27 // - `Unaligned`: `()` has alignment 1. 32 unsafe_impl!((): Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes, Unaligned); 41 // - `Unaligned` (`u8` and `i8` only): The reference [2] specifies the size of 68 unsafe_impl!(u8: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes, Unaligned); 69 unsafe_impl!(i8: Immutable, TryFromBytes, FromZeros, FromBytes, IntoBytes, Unaligned); 96 // - `Unaligned`: Per the reference [1], "[a]n object with the boolean type has 101 const _: () = unsafe { unsafe_impl!(bool: Immutable, FromZeros, IntoBytes, Unaligned) }; 151 // - `FromZeros`, `IntoBytes`, `Unaligned`: `[u8]` is `FromZeros`, `IntoBytes`, 152 // and `Unaligned`. 165 const _: () = unsafe { unsafe_impl!(str: Immutable, FromZeros, IntoBytes, Unaligned) }; [all …]
|
| H A D | deprecated.rs | 62 T: Unaligned + KnownLayout + Immutable + ?Sized, 66 …note = "use `Ref::from_bytes`; for `T: Unaligned`, the returned `CastError` implements `Into<SizeE… 79 T: Unaligned + KnownLayout + Immutable + ?Sized, 83 …note = "use `Ref::from_prefix`; for `T: Unaligned`, the returned `CastError` implements `Into<Size… 96 T: Unaligned + KnownLayout + Immutable + ?Sized, 100 …note = "use `Ref::from_suffix`; for `T: Unaligned`, the returned `CastError` implements `Into<Size… 126 T: Unaligned + Immutable, 130 …note = "`Ref::from_bytes` now supports slices; for `T: Unaligned`, the returned `CastError` implem… 190 T: Unaligned + Immutable, 194 …note = "use `Ref::from_prefix_with_elems`; for `T: Unaligned`, the returned `CastError` implements… [all …]
|
| H A D | wrappers.rs | 34 /// - (where `T: Unaligned`) infallibly by reference, using [`Deref::deref`] or 49 /// and thus implement [`Unaligned`]. `EtherType` is `#[repr(u16)]` and so 50 /// cannot implement `Unaligned`. We use `Unalign` to relax `EtherType`'s 52 /// and can implement `Unaligned`. 57 /// # #[derive(FromBytes, KnownLayout, Immutable, Unaligned)] #[repr(C)] struct Mac([u8; 6]); 71 /// #[derive(TryFromBytes, KnownLayout, Immutable, Unaligned)] 116 #[cfg_attr(any(feature = "derive", test), derive(Immutable, FromBytes, IntoBytes, Unaligned))] 140 // Unaligned`. 150 impl_or_verify!(T => Unaligned for Unalign<T>); 199 /// If `T: Unaligned`, then `Unalign<T>` implements [`Deref`], and callers [all …]
|
| H A D | error.rs | 34 //! ## [`Unaligned`] destination types 36 //! For [`Unaligned`] destination types, alignment errors are impossible. All 38 //! [`From`] so long as `Dst: Unaligned`. For example, see [`<SizeError as 130 use crate::{util::SendSyncPhantomData, KnownLayout, TryFromBytes, Unaligned}; 164 impl<Src, Dst: ?Sized + Unaligned, S, V> From<ConvertError<AlignmentError<Src, Dst>, S, V>> 168 /// `Dst` is unaligned. 170 /// Since [`Dst: Unaligned`], it is impossible to encounter an alignment 174 /// [`Dst: Unaligned`]: crate::Unaligned 183 /// #[derive(TryFromBytes, KnownLayout, Unaligned, Immutable)] 193 /// // Since `Bools: Unaligned`, we can infallibly discard [all …]
|
| H A D | ref.rs | 40 /// #[derive(FromBytes, IntoBytes, KnownLayout, Immutable, Unaligned)] 49 /// #[derive(FromBytes, IntoBytes, KnownLayout, Immutable, Unaligned)] 201 invariant::{Aligned, BecauseExclusive, Initialized, Unaligned, Valid}, 280 /// [`T: Unaligned`][t-unaligned], you can [infallibly discard the alignment 286 /// [t-unaligned]: crate::Unaligned 334 /// this returns `Err`. If [`T: Unaligned`][t-unaligned], you can 340 /// [t-unaligned]: crate::Unaligned 399 /// Unaligned`][t-unaligned], you can [infallibly discard the alignment 405 /// [t-unaligned]: crate::Unaligned 465 /// aligned, this returns `Err`. If [`T: Unaligned`][t-unaligned], you can [all …]
|
| H A D | lib.rs | 62 //! - [`Unaligned`] indicates that a type's alignment requirement is 1 1786 /// Unaligned`][self-unaligned], you can [infallibly discard the alignment 1792 /// [self-unaligned]: Unaligned 1907 /// If [`Self: Unaligned`][self-unaligned], you can [infallibly discard the 1913 /// [self-unaligned]: Unaligned 2017 /// `Self`, this returns `Err`. If [`Self: Unaligned`][self-unaligned], you 2023 /// [self-unaligned]: Unaligned 2127 /// Unaligned`][self-unaligned], you can [infallibly discard the alignment 2133 /// [self-unaligned]: Unaligned 2233 /// [`Self: Unaligned`][self-unaligned], you can [infallibly discard the [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/rust/zerocopy-derive/derive/ |
| H A D | unaligned.rs | 19 /// A struct is `Unaligned` if: 22 /// - all fields `Unaligned` 39 Ok(ImplBlockBuilder::new(ctx, strct, Trait::Unaligned, field_bounds).build()) in derive_unaligned_struct() 42 /// An enum is `Unaligned` if: 56 Ok(ImplBlockBuilder::new(ctx, enm, Trait::Unaligned, FieldBounds::ALL_SELF).build()) in derive_unaligned_enum() 59 /// Like structs, a union is `Unaligned` if: 62 /// - all fields `Unaligned` 79 Ok(ImplBlockBuilder::new(ctx, unn, Trait::Unaligned, field_type_trait_bounds).build()) in derive_unaligned_union()
|
| /linux/arch/riscv/ |
| H A D | Kconfig | 961 bool "Request firmware delegation of unaligned access exceptions" 976 Saying N here will not worsen emulation support for unaligned accesses 983 prompt "Unaligned Accesses Support" 986 This determines the level of support for unaligned accesses. This 992 bool "Probe for hardware unaligned access support" 996 speed of unaligned accesses. This probing will dynamically determine 997 the speed of unaligned accesses on the underlying system. If unaligned 999 system, the kernel will emulate the unaligned accesses to preserve the 1003 bool "Emulate unaligned access where system support is missing" 1006 If unaligned memory accesses trap into the kernel as they are not [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/arch/riscv/kernel/ |
| H A D | unaligned_access_speed.c | 16 #include "copy-unaligned.h" 65 * 1 if unaligned accesses are fast 66 * 0 if unaligned accesses are slow 81 /* Make an unaligned destination buffer. */ in compare_unaligned_access() 92 pr_warn("cpu%d: rdtime lacks granularity needed to measure %s unaligned access speed\n", in compare_unaligned_access() 101 pr_info("cpu%d: %s unaligned word access speed is %d.%02dx byte access speed (%s)\n", in compare_unaligned_access() 147 /* Measure unaligned access speed on all CPUs present at boot in parallel. */ 353 pr_info("scalar unaligned access speed set to '%s' (%lu) by command line\n", in check_unaligned_access_all_cpus() 367 pr_info("vector unaligned access speed set to '%s' (%lu) by command line\n", in check_unaligned_access_all_cpus()
|
| /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/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 | 62 bool unaligned = umem->flags & XDP_UMEM_UNALIGNED_CHUNK_FLAG; in xp_create_and_assign_umem() local 67 entries = unaligned ? umem->chunks : 0; in xp_create_and_assign_umem() 87 pool->unaligned = unaligned; in xp_create_and_assign_umem() 111 if (pool->unaligned) in xp_create_and_assign_umem() 444 if (!pool->unaligned) { in xp_init_dma_info() 501 if (pool->unaligned) in xp_dma_map() 540 if (pool->unaligned) { in xp_get_xskb() 567 ok = pool->unaligned ? xp_check_unaligned(pool, &addr) : in __xp_alloc() 627 ok = pool->unaligned ? xp_check_unaligned(pool, &addr) : in xp_alloc_new_from_fq() 735 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/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.
|