Lines Matching refs:unaligned

6 unaligned accesses, why you need to write code that doesn't cause them,
10 The definition of an unaligned access
16 reading 4 bytes of data from address 0x10005 would be an unaligned memory
43 Why unaligned access is bad
46 The effects of performing an unaligned memory access vary from architecture
50 - Some architectures are able to perform unaligned memory accesses
52 - Some architectures raise processor exceptions when unaligned accesses
53 happen. The exception handler is able to correct the unaligned access,
55 - Some architectures raise processor exceptions when unaligned accesses
57 unaligned access to be corrected.
58 - Some architectures are not capable of unaligned memory access, but will
62 It should be obvious from the above that if your code causes unaligned
67 Code that does not cause unaligned access
86 not be unreasonable to expect that accessing field2 would cause an unaligned
102 will never cause an unaligned access, because all memory addresses are evenly
127 lead to unaligned accesses when accessing fields that do not satisfy
130 the memory access in a way that does not cause unaligned access. Of course,
136 Code that causes unaligned access
140 that can cause an unaligned memory access. The following function taken
158 In the above function, when the hardware has efficient unaligned access
164 (Hint: it'd be an unaligned access.)
166 Despite the potential unaligned access problems with the above function, it
174 Here is another example of some code that could cause unaligned accesses:
182 This code will cause unaligned accesses every time the data parameter points
185 In summary, the 2 main scenarios where you may run into unaligned access
191 Avoiding unaligned accesses
194 The easiest way to avoid unaligned access is to use the get_unaligned() and
195 put_unaligned() macros provided by the <asm/unaligned.h> header file.
197 Going back to an earlier example of code that potentially causes unaligned
207 To avoid the unaligned memory access, you would rewrite it as follows:
218 memory and you wish to avoid unaligned access, its usage is as follows:
224 aligned memory, using these macros to access unaligned memory can be costly in
229 Due to the byte-wise nature of this operation, unaligned accesses are avoided.
241 here is powerpc which defines NET_IP_ALIGN to 0 because DMA to unaligned
242 addresses can be very expensive and dwarf the cost of unaligned loads.
244 For some ethernet hardware that cannot DMA to unaligned addresses like
247 unnecessary on architectures that can do unaligned accesses, the code can be