Commit 74d96f01 authored by Harvey Harrison's avatar Harvey Harrison Committed by Linus Torvalds

byteorder: make swab.h include asm/swab.h like a regular header

Add swab.h to kbuild.asm and remove the individual entries from
each arch, mark as unifdef as some arches have some kernel-only
bits inside.
Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent aa0effbd
...@@ -9,4 +9,3 @@ unifdef-y += console.h ...@@ -9,4 +9,3 @@ unifdef-y += console.h
unifdef-y += fpu.h unifdef-y += fpu.h
unifdef-y += sysinfo.h unifdef-y += sysinfo.h
unifdef-y += compiler.h unifdef-y += compiler.h
unifdef-y += swab.h
#ifndef _ALPHA_BYTEORDER_H #ifndef _ALPHA_BYTEORDER_H
#define _ALPHA_BYTEORDER_H #define _ALPHA_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/little_endian.h> #include <linux/byteorder/little_endian.h>
#endif /* _ALPHA_BYTEORDER_H */ #endif /* _ALPHA_BYTEORDER_H */
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
unifdef-y += hwcap.h unifdef-y += hwcap.h
unifdef-y += swab.h
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
#ifndef __ASM_ARM_BYTEORDER_H #ifndef __ASM_ARM_BYTEORDER_H
#define __ASM_ARM_BYTEORDER_H #define __ASM_ARM_BYTEORDER_H
#include <asm/swab.h>
#ifdef __ARMEB__ #ifdef __ARMEB__
#include <linux/byteorder/big_endian.h> #include <linux/byteorder/big_endian.h>
#else #else
......
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
header-y += swab.h
header-y += cachectl.h header-y += cachectl.h
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
#ifndef __ASM_AVR32_BYTEORDER_H #ifndef __ASM_AVR32_BYTEORDER_H
#define __ASM_AVR32_BYTEORDER_H #define __ASM_AVR32_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/big_endian.h> #include <linux/byteorder/big_endian.h>
#endif /* __ASM_AVR32_BYTEORDER_H */ #endif /* __ASM_AVR32_BYTEORDER_H */
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
unifdef-y += fixed_code.h unifdef-y += fixed_code.h
unifdef-y += swab.h
#ifndef _BLACKFIN_BYTEORDER_H #ifndef _BLACKFIN_BYTEORDER_H
#define _BLACKFIN_BYTEORDER_H #define _BLACKFIN_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/little_endian.h> #include <linux/byteorder/little_endian.h>
#endif /* _BLACKFIN_BYTEORDER_H */ #endif /* _BLACKFIN_BYTEORDER_H */
...@@ -9,4 +9,3 @@ header-y += sync_serial.h ...@@ -9,4 +9,3 @@ header-y += sync_serial.h
unifdef-y += etraxgpio.h unifdef-y += etraxgpio.h
unifdef-y += rs485.h unifdef-y += rs485.h
unifdef-y += swab.h
#ifndef _CRIS_BYTEORDER_H #ifndef _CRIS_BYTEORDER_H
#define _CRIS_BYTEORDER_H #define _CRIS_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/little_endian.h> #include <linux/byteorder/little_endian.h>
#endif #endif
......
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
unifdef-y += swab.h
#ifndef _H8300_BYTEORDER_H #ifndef _H8300_BYTEORDER_H
#define _H8300_BYTEORDER_H #define _H8300_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/big_endian.h> #include <linux/byteorder/big_endian.h>
#endif /* _H8300_BYTEORDER_H */ #endif /* _H8300_BYTEORDER_H */
...@@ -14,4 +14,3 @@ unifdef-y += gcc_intrin.h ...@@ -14,4 +14,3 @@ unifdef-y += gcc_intrin.h
unifdef-y += intrinsics.h unifdef-y += intrinsics.h
unifdef-y += perfmon.h unifdef-y += perfmon.h
unifdef-y += ustack.h unifdef-y += ustack.h
unifdef-y += swab.h
#ifndef _ASM_IA64_BYTEORDER_H #ifndef _ASM_IA64_BYTEORDER_H
#define _ASM_IA64_BYTEORDER_H #define _ASM_IA64_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/little_endian.h> #include <linux/byteorder/little_endian.h>
#endif /* _ASM_IA64_BYTEORDER_H */ #endif /* _ASM_IA64_BYTEORDER_H */
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
unifdef-y += swab.h
#ifndef _M68KNOMMU_BYTEORDER_H #ifndef _M68KNOMMU_BYTEORDER_H
#define _M68KNOMMU_BYTEORDER_H #define _M68KNOMMU_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/big_endian.h> #include <linux/byteorder/big_endian.h>
#endif /* _M68KNOMMU_BYTEORDER_H */ #endif /* _M68KNOMMU_BYTEORDER_H */
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
header-y += cachectl.h sgidefs.h sysmips.h header-y += cachectl.h sgidefs.h sysmips.h
header-y += swab.h
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
#ifndef _ASM_BYTEORDER_H #ifndef _ASM_BYTEORDER_H
#define _ASM_BYTEORDER_H #define _ASM_BYTEORDER_H
#include <asm/swab.h>
#if defined(__MIPSEB__) #if defined(__MIPSEB__)
#include <linux/byteorder/big_endian.h> #include <linux/byteorder/big_endian.h>
#elif defined(__MIPSEL__) #elif defined(__MIPSEL__)
......
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
unifdef-y += pdc.h unifdef-y += pdc.h
unifdef-y += swab.h
#ifndef _PARISC_BYTEORDER_H #ifndef _PARISC_BYTEORDER_H
#define _PARISC_BYTEORDER_H #define _PARISC_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/big_endian.h> #include <linux/byteorder/big_endian.h>
#endif /* _PARISC_BYTEORDER_H */ #endif /* _PARISC_BYTEORDER_H */
...@@ -35,4 +35,3 @@ unifdef-y += spu_info.h ...@@ -35,4 +35,3 @@ unifdef-y += spu_info.h
unifdef-y += termios.h unifdef-y += termios.h
unifdef-y += types.h unifdef-y += types.h
unifdef-y += unistd.h unifdef-y += unistd.h
unifdef-y += swab.h
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
* as published by the Free Software Foundation; either version * as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#include <asm/swab.h>
#include <linux/byteorder/big_endian.h> #include <linux/byteorder/big_endian.h>
#endif /* _ASM_POWERPC_BYTEORDER_H */ #endif /* _ASM_POWERPC_BYTEORDER_H */
...@@ -13,4 +13,3 @@ unifdef-y += cmb.h ...@@ -13,4 +13,3 @@ unifdef-y += cmb.h
unifdef-y += debug.h unifdef-y += debug.h
unifdef-y += chpid.h unifdef-y += chpid.h
unifdef-y += schid.h unifdef-y += schid.h
unifdef-y += swab.h
#ifndef _S390_BYTEORDER_H #ifndef _S390_BYTEORDER_H
#define _S390_BYTEORDER_H #define _S390_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/big_endian.h> #include <linux/byteorder/big_endian.h>
#endif /* _S390_BYTEORDER_H */ #endif /* _S390_BYTEORDER_H */
...@@ -6,4 +6,3 @@ unifdef-y += unistd_32.h ...@@ -6,4 +6,3 @@ unifdef-y += unistd_32.h
unifdef-y += unistd_64.h unifdef-y += unistd_64.h
unifdef-y += posix_types_32.h unifdef-y += posix_types_32.h
unifdef-y += posix_types_64.h unifdef-y += posix_types_64.h
unifdef-y += swab.h
#ifndef __ASM_SH_BYTEORDER_H #ifndef __ASM_SH_BYTEORDER_H
#define __ASM_SH_BYTEORDER_H #define __ASM_SH_BYTEORDER_H
#include <asm/swab.h>
#ifdef __LITTLE_ENDIAN__ #ifdef __LITTLE_ENDIAN__
#include <linux/byteorder/little_endian.h> #include <linux/byteorder/little_endian.h>
#else #else
......
...@@ -17,4 +17,3 @@ header-y += traps.h ...@@ -17,4 +17,3 @@ header-y += traps.h
header-y += uctx.h header-y += uctx.h
header-y += utrap.h header-y += utrap.h
header-y += watchdog.h header-y += watchdog.h
header-y += swab.h
#ifndef _SPARC_BYTEORDER_H #ifndef _SPARC_BYTEORDER_H
#define _SPARC_BYTEORDER_H #define _SPARC_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/big_endian.h> #include <linux/byteorder/big_endian.h>
#endif /* _SPARC_BYTEORDER_H */ #endif /* _SPARC_BYTEORDER_H */
...@@ -22,4 +22,3 @@ unifdef-y += unistd_32.h ...@@ -22,4 +22,3 @@ unifdef-y += unistd_32.h
unifdef-y += unistd_64.h unifdef-y += unistd_64.h
unifdef-y += vm86.h unifdef-y += vm86.h
unifdef-y += vsyscall.h unifdef-y += vsyscall.h
unifdef-y += swab.h
#ifndef _ASM_X86_BYTEORDER_H #ifndef _ASM_X86_BYTEORDER_H
#define _ASM_X86_BYTEORDER_H #define _ASM_X86_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/little_endian.h> #include <linux/byteorder/little_endian.h>
#endif /* _ASM_X86_BYTEORDER_H */ #endif /* _ASM_X86_BYTEORDER_H */
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
unifdef-y += swab.h
#ifndef _XTENSA_BYTEORDER_H #ifndef _XTENSA_BYTEORDER_H
#define _XTENSA_BYTEORDER_H #define _XTENSA_BYTEORDER_H
#include <asm/swab.h>
#ifdef __XTENSA_EL__ #ifdef __XTENSA_EL__
#include <linux/byteorder/little_endian.h> #include <linux/byteorder/little_endian.h>
#elif defined(__XTENSA_EB__) #elif defined(__XTENSA_EB__)
......
...@@ -3,4 +3,3 @@ include include/asm-generic/Kbuild.asm ...@@ -3,4 +3,3 @@ include include/asm-generic/Kbuild.asm
header-y += registers.h header-y += registers.h
unifdef-y += termios.h unifdef-y += termios.h
unifdef-y += swab.h
#ifndef _ASM_BYTEORDER_H #ifndef _ASM_BYTEORDER_H
#define _ASM_BYTEORDER_H #define _ASM_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/big_endian.h> #include <linux/byteorder/big_endian.h>
#endif /* _ASM_BYTEORDER_H */ #endif /* _ASM_BYTEORDER_H */
...@@ -31,6 +31,7 @@ unifdef-y += socket.h ...@@ -31,6 +31,7 @@ unifdef-y += socket.h
unifdef-y += sockios.h unifdef-y += sockios.h
unifdef-y += stat.h unifdef-y += stat.h
unifdef-y += statfs.h unifdef-y += statfs.h
unifdef-y += swab.h
unifdef-y += termbits.h unifdef-y += termbits.h
unifdef-y += termios.h unifdef-y += termios.h
unifdef-y += types.h unifdef-y += types.h
......
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
unifdef-y += swab.h
#ifndef _ASM_M32R_BYTEORDER_H #ifndef _ASM_M32R_BYTEORDER_H
#define _ASM_M32R_BYTEORDER_H #define _ASM_M32R_BYTEORDER_H
#include <asm/swab.h>
#if defined(__LITTLE_ENDIAN__) #if defined(__LITTLE_ENDIAN__)
# include <linux/byteorder/little_endian.h> # include <linux/byteorder/little_endian.h>
#else #else
......
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
header-y += cachectl.h header-y += cachectl.h
unifdef-y += swab.h
#ifndef _M68K_BYTEORDER_H #ifndef _M68K_BYTEORDER_H
#define _M68K_BYTEORDER_H #define _M68K_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/big_endian.h> #include <linux/byteorder/big_endian.h>
#endif /* _M68K_BYTEORDER_H */ #endif /* _M68K_BYTEORDER_H */
include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
unifdef-y += swab.h
#ifndef _ASM_BYTEORDER_H #ifndef _ASM_BYTEORDER_H
#define _ASM_BYTEORDER_H #define _ASM_BYTEORDER_H
#include <asm/swab.h>
#include <linux/byteorder/little_endian.h> #include <linux/byteorder/little_endian.h>
#endif /* _ASM_BYTEORDER_H */ #endif /* _ASM_BYTEORDER_H */
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/compiler.h> #include <linux/compiler.h>
#include <asm/byteorder.h> #include <asm/swab.h>
/* /*
* casts are necessary for constants, because we never know how for sure * casts are necessary for constants, because we never know how for sure
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment