asm-generic: use asm-generic/unaligned.h for most architectures
There are several architectures that just duplicate the contents of asm-generic/unaligned.h, so change those over to use the file directly, to make future modifications easier. The exceptions are: - arm32 sets HAVE_EFFICIENT_UNALIGNED_ACCESS, but wants the unaligned-struct version - ppc64le disables HAVE_EFFICIENT_UNALIGNED_ACCESS but includes the access-ok version - most m68k also uses the access-ok version without setting HAVE_EFFICIENT_UNALIGNED_ACCESS. - sh4a has a custom inline asm version - openrisc is the only one using the memmove version that generally leads to worse code. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
parent
6efb943b86
commit
637be9183e
|
@ -1,12 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_ALPHA_UNALIGNED_H
|
||||
#define _ASM_ALPHA_UNALIGNED_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
|
||||
|
||||
#endif /* _ASM_ALPHA_UNALIGNED_H */
|
|
@ -1,12 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_IA64_UNALIGNED_H
|
||||
#define _ASM_IA64_UNALIGNED_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
|
||||
|
||||
#endif /* _ASM_IA64_UNALIGNED_H */
|
|
@ -2,15 +2,8 @@
|
|||
#ifndef _ASM_M68K_UNALIGNED_H
|
||||
#define _ASM_M68K_UNALIGNED_H
|
||||
|
||||
|
||||
#ifdef CONFIG_CPU_HAS_NO_UNALIGNED
|
||||
#include <linux/unaligned/be_struct.h>
|
||||
#include <linux/unaligned/le_byteshift.h>
|
||||
#include <linux/unaligned/generic.h>
|
||||
|
||||
#define get_unaligned __get_unaligned_be
|
||||
#define put_unaligned __put_unaligned_be
|
||||
|
||||
#include <asm-generic/unaligned.h>
|
||||
#else
|
||||
/*
|
||||
* The m68k can do unaligned accesses itself.
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (C) 2008 Michal Simek <monstr@monstr.eu>
|
||||
* Copyright (C) 2006 Atmark Techno, Inc.
|
||||
*/
|
||||
|
||||
#ifndef _ASM_MICROBLAZE_UNALIGNED_H
|
||||
#define _ASM_MICROBLAZE_UNALIGNED_H
|
||||
|
||||
# ifdef __KERNEL__
|
||||
|
||||
# ifdef __MICROBLAZEEL__
|
||||
# include <linux/unaligned/le_struct.h>
|
||||
# include <linux/unaligned/be_byteshift.h>
|
||||
# define get_unaligned __get_unaligned_le
|
||||
# define put_unaligned __put_unaligned_le
|
||||
# else
|
||||
# include <linux/unaligned/be_struct.h>
|
||||
# include <linux/unaligned/le_byteshift.h>
|
||||
# define get_unaligned __get_unaligned_be
|
||||
# define put_unaligned __put_unaligned_be
|
||||
# endif
|
||||
|
||||
# include <linux/unaligned/generic.h>
|
||||
|
||||
# endif /* __KERNEL__ */
|
||||
#endif /* _ASM_MICROBLAZE_UNALIGNED_H */
|
|
@ -2,11 +2,7 @@
|
|||
#ifndef _ASM_PARISC_UNALIGNED_H
|
||||
#define _ASM_PARISC_UNALIGNED_H
|
||||
|
||||
#include <linux/unaligned/be_struct.h>
|
||||
#include <linux/unaligned/le_byteshift.h>
|
||||
#include <linux/unaligned/generic.h>
|
||||
#define get_unaligned __get_unaligned_be
|
||||
#define put_unaligned __put_unaligned_be
|
||||
#include <asm-generic/unaligned.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
struct pt_regs;
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_SPARC_UNALIGNED_H
|
||||
#define _ASM_SPARC_UNALIGNED_H
|
||||
|
||||
#include <linux/unaligned/be_struct.h>
|
||||
#include <linux/unaligned/le_byteshift.h>
|
||||
#include <linux/unaligned/generic.h>
|
||||
#define get_unaligned __get_unaligned_be
|
||||
#define put_unaligned __put_unaligned_be
|
||||
|
||||
#endif /* _ASM_SPARC_UNALIGNED_H */
|
|
@ -1,15 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_X86_UNALIGNED_H
|
||||
#define _ASM_X86_UNALIGNED_H
|
||||
|
||||
/*
|
||||
* The x86 can do unaligned accesses itself.
|
||||
*/
|
||||
|
||||
#include <linux/unaligned/access_ok.h>
|
||||
#include <linux/unaligned/generic.h>
|
||||
|
||||
#define get_unaligned __get_unaligned_le
|
||||
#define put_unaligned __put_unaligned_le
|
||||
|
||||
#endif /* _ASM_X86_UNALIGNED_H */
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Xtensa doesn't handle unaligned accesses efficiently.
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2001 - 2005 Tensilica Inc.
|
||||
*/
|
||||
#ifndef _ASM_XTENSA_UNALIGNED_H
|
||||
#define _ASM_XTENSA_UNALIGNED_H
|
||||
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
# 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
|
||||
#else
|
||||
# include <linux/unaligned/be_struct.h>
|
||||
# include <linux/unaligned/le_byteshift.h>
|
||||
# include <linux/unaligned/generic.h>
|
||||
# define get_unaligned __get_unaligned_be
|
||||
# define put_unaligned __put_unaligned_be
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_XTENSA_UNALIGNED_H */
|
Loading…
Reference in New Issue