mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
![Haavard Skinnemoen](/assets/img/avatar_default.png)
If we let unaligned word loads bypass the generic unaligned handling, gcc may combine it with a swap.b instruction and turn it into a ldwsp instruction, which does not work with unaligned addresses. Revert the optimization to prevent the RNDIS driver from crashing. Hopefully we'll figure something out later (it may be better to do the optimization in gcc.) Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
16 lines
470 B
C
16 lines
470 B
C
#ifndef __ASM_AVR32_UNALIGNED_H
|
|
#define __ASM_AVR32_UNALIGNED_H
|
|
|
|
/*
|
|
* AVR32 can handle some unaligned accesses, depending on the
|
|
* implementation. The AVR32 AP implementation can handle unaligned
|
|
* words, but halfwords must be halfword-aligned, and doublewords must
|
|
* be word-aligned.
|
|
*
|
|
* However, swapped word loads must be word-aligned so we can't
|
|
* optimize word loads in general.
|
|
*/
|
|
|
|
#include <asm-generic/unaligned.h>
|
|
|
|
#endif /* __ASM_AVR32_UNALIGNED_H */
|