linux-hardened/include/asm-avr32/unaligned.h
Haavard Skinnemoen e122eaf694 [AVR32] Remove optimization of unaligned word loads
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>
2007-07-18 20:45:51 +02:00

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 */