Skip to content

Commit

Permalink
asm-generic: use asm-generic/unaligned.h for most architectures
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnd Bergmann committed May 10, 2021
1 parent 6efb943 commit 637be91
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 119 deletions.
12 changes: 0 additions & 12 deletions arch/alpha/include/asm/unaligned.h

This file was deleted.

12 changes: 0 additions & 12 deletions arch/ia64/include/asm/unaligned.h

This file was deleted.

9 changes: 1 addition & 8 deletions arch/m68k/include/asm/unaligned.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
27 changes: 0 additions & 27 deletions arch/microblaze/include/asm/unaligned.h

This file was deleted.

6 changes: 1 addition & 5 deletions arch/parisc/include/asm/unaligned.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 0 additions & 11 deletions arch/sparc/include/asm/unaligned.h

This file was deleted.

15 changes: 0 additions & 15 deletions arch/x86/include/asm/unaligned.h

This file was deleted.

29 changes: 0 additions & 29 deletions arch/xtensa/include/asm/unaligned.h

This file was deleted.

0 comments on commit 637be91

Please sign in to comment.