xtensa: Change unaligned access to use packed struct implementation
PATCH 3/4 xtensa: Change unaligned access to use packed struct implementation
---
There are only 3 arches that use the memmove-based implementation, there doesn't seem to be any obvious reason not to use the struct implementation.
Chris?
include/asm-xtensa/unaligned.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
include/asm-xtensa/unaligned.h +2 -2
@@ -11,13 +11,13 @@#define _ASM_XTENSA_UNALIGNED_H#ifdef __XTENSA_EL__ -# include <linux/unaligned/le_memmove.h> +# include <linux/unaligned/le_struct.h> # include <linux/unaligned/be_byteshift.h> # include <linux/unaligned/generic.h> # define get_unaligned __get_unaligned_le# define put_unaligned __put_unaligned_le#elif defined(__XTENSA_EB__) -# include <linux/unaligned/be_memmove.h> +# include <linux/unaligned/be_struct.h> # include <linux/unaligned/le_byteshift.h> # include <linux/unaligned/generic.h> # define get_unaligned __get_unaligned_be
Signature · 1 line
1.6.0.2.471.g47a76
Hi Harvey,
Please allow me a couple of days to look into it. I don't know the historic reasons why the memmove variant was chosen.
Thanks,
-Chris
Quoted 30 lines · Harvey Harrison
Signed-off-by Harvey Harrison <[email protected]>---
There are only 3 arches that use the memmove-based implementation, there doesn't seem to be any obvious reason not to use the struct implementation.Chris?
include/asm-xtensa/unaligned.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)include/asm-xtensa/unaligned.h +2
-2@@ -11,13 +11,13 @@#define _ASM_XTENSA_UNALIGNED_H#ifdef __XTENSA_EL__ -# include <linux/unaligned/le_memmove.h> +# include <linux/unaligned/le_struct.h> # include <linux/unaligned/be_byteshift.h> # include <linux/unaligned/generic.h> # define get_unaligned __get_unaligned_le# define put_unaligned __put_unaligned_le#elif defined(__XTENSA_EB__) -# include <linux/unaligned/be_memmove.h> +# include <linux/unaligned/be_struct.h> # include <linux/unaligned/le_byteshift.h> # include <linux/unaligned/generic.h> # define get_unaligned __get_unaligned_be
Quoted 8 lines · Chris Zankel
Hi Harvey,
Please allow me a couple of days to look into it. I don't know the historic reasons why the memmove variant was chosen.
Thanks,
-Chris
Sure, from the comments in the original version, it looks like it was done this way to avoid __builtin_memcpy from being generated. But maybe there was another reason?
Harvey