arch: include <asm-generic/int-ll64.h> from <asm/types.h>
Subsystems (6)
PATCH 1/1 arch: include <asm-generic/int-ll64.h> from <asm/types.h>
Many architectures duplicate the same fixed type definitions as in <asm-generic/int-ll64.h>.
Include <asm-generic/int-ll64.h> from <asm/types.h>, and remove the duplicated code.
Note:
Linux commit 0c79a8e29b5f ("asm/types.h: Remove include/asm-generic/int-l64.h") unified the kernel space definition into int-ll64.h. Barebox also adopts int-ll64.
---
arch/arm/include/asm/types.h | 48 +------------------ arch/nios2/include/asm/int-ll64.h | 78 ------------------------------- arch/nios2/include/asm/types.h | 2 +- arch/openrisc/include/asm/types.h | 48 +------------------ arch/powerpc/include/asm/types.h | 35 +------------- arch/riscv/include/asm/types.h | 42 +---------------- arch/sandbox/include/asm/types.h | 42 +---------------- arch/x86/include/asm/types.h | 42 +---------------- 8 files changed, 11 insertions(+), 326 deletions(-) delete mode 100644 arch/nios2/include/asm/int-ll64.h
arch/arm/include/asm/types.h +1 -47
@@ -1,52 +1,6 @@#ifndef __ASM_ARM_TYPES_H#define __ASM_ARM_TYPES_H -#ifndef __ASSEMBLY__ - -/* -* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the -* header files exported to user space -*/ - -typedef __signed__ char __s8; -typedef unsigned char __u8 ; - -typedef __signed__ short __s16 ; -typedef unsigned short __u16 ; - -typedef __signed__ int __s32; -typedef unsigned int __u32 ; - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; -#endif - -#endif /* __ASSEMBLY__ */ - -/* -* These aren't exported outside the kernel to avoid name space clashes -*/ -#ifdef __KERNEL__ - -#include <asm/bitsperlong.h> - -#ifndef __ASSEMBLY__ - -typedef signed char s8 ; -typedef unsigned char u8 ; - -typedef signed short s16 ; -typedef unsigned short u16 ; - -typedef signed int s32 ; -typedef unsigned int u32 ; - -typedef signed long long s64 ; -typedef unsigned long long u64 ; - -#endif /* __ASSEMBLY__ */ - -#endif /* __KERNEL__ */ +#include <asm-generic/int-ll64.h> #endif
arch/nios2/include/asm/int-ll64.h deleted +0 -78
78 lines not on this page · raw message
arch/nios2/include/asm/types.h +1 -1
@@ -1,6 +1,6 @@#ifndef __ASM_TYPES_H#define __ASM_TYPES_H -#include <asm/int-ll64.h> +#include <asm-generic/int-ll64.h> #endif
arch/openrisc/include/asm/types.h +1 -47
53 lines not on this page · raw message
arch/powerpc/include/asm/types.h +2 -33
@@ -1,45 +1,14 @@#ifndef _PPC_TYPES_H#define _PPC_TYPES_H -#ifndef __ASSEMBLY__ - -typedef __signed__ char __s8; -typedef unsigned char __u8 ; - -typedef __signed__ short __s16 ; -typedef unsigned short __u16 ; +#include <asm-generic/int-ll64.h> -typedef __signed__ int __s32; -typedef unsigned int __u32 ; - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; -#endif +#ifndef __ASSEMBLY__typedef struct {__u32 u[4 ]; } __attribute((aligned (16 )))vector128 ; -#ifdef __KERNEL__ -/* -* These aren't exported outside the kernel to avoid name space clashes -*/ -typedef signed char s8 ; -typedef unsigned char u8 ; - -typedef signed short s16 ; -typedef unsigned short u16 ; - -typedef signed int s32 ; -typedef unsigned int u32 ; - -typedef signed long long s64 ; -typedef unsigned long long u64 ; - -#include <asm-generic/bitsperlong.h> - -#endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ #endif
arch/riscv/include/asm/types.h +2 -40
52 lines not on this page · raw message
arch/sandbox/include/asm/types.h +2 -40
52 lines not on this page · raw message
arch/x86/include/asm/types.h +2 -40
54 lines not on this page · raw message
Signature · 7 lines
2.25.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 6 lines · Masahiro Yamada
Many architectures duplicate the same fixed type definitions as in <
asm-generic/int-ll64.h>.Include <
asm-generic/int-ll64.h> from <asm/types.h>, and remove the duplicated code.
Quoted 7 lines
Note:
Linux commit0c79a8e29b5f("asm/types.h: Removeinclude/asm-generic/int-l64.h") unified the kernel space definition intoint-ll64.h. Barebox also adopts int-ll64.Signed-off-by Masahiro Yamada <[email protected]>---
Applied, thanks
Sascha
Quoted 461 lines
arch/arm/include/asm/types.h | 48 +------------------ arch/nios2/include/asm/int-ll64.h | 78 ------------------------------- arch/nios2/include/asm/types.h | 2 +- arch/openrisc/include/asm/types.h | 48 +------------------ arch/powerpc/include/asm/types.h | 35 +------------- arch/riscv/include/asm/types.h | 42 +---------------- arch/sandbox/include/asm/types.h | 42 +---------------- arch/x86/include/asm/types.h | 42 +---------------- 8 files changed, 11 insertions(+), 326 deletions(-) delete mode 100644 arch/nios2/include/asm/int-ll64.harch/arm/include/asm/types.h +1
-47@@ -1,52 +1,6 @@#ifndef __ASM_ARM_TYPES_H#define __ASM_ARM_TYPES_H -#ifndef __ASSEMBLY__ - -/* -* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the -* header files exported to user space -*/ - -typedef __signed__ char __s8; -typedef unsigned char __u8 ; - -typedef __signed__ short __s16 ; -typedef unsigned short __u16 ; - -typedef __signed__ int __s32; -typedef unsigned int __u32 ; - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; -#endif - -#endif /* __ASSEMBLY__ */ - -/* -* These aren't exported outside the kernel to avoid name space clashes -*/ -#ifdef __KERNEL__ - -#include <asm/bitsperlong.h> - -#ifndef __ASSEMBLY__ - -typedef signed char s8 ; -typedef unsigned char u8 ; - -typedef signed short s16 ; -typedef unsigned short u16 ; - -typedef signed int s32 ; -typedef unsigned int u32 ; - -typedef signed long long s64 ; -typedef unsigned long long u64 ; - -#endif /* __ASSEMBLY__ */ - -#endif /* __KERNEL__ */ +#include <asm-generic/int-ll64.h> #endif arch/nios2/include/asm/int-ll64.h deleted +0
-78@@ -1,78 +0,0 @@ -/* -* asm-generic/int-ll64.h -* -* Integer declarations for architectures which use "long long" -* for 64-bit types. -*/ - -#ifndef _ASM_GENERIC_INT_LL64_H -#define _ASM_GENERIC_INT_LL64_H - -#include <asm/bitsperlong.h> - -#ifndef __ASSEMBLY__ -/* -* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the -* header files exported to user space -*/ - -typedef __signed__ char __s8; -typedef unsigned char __u8 ; - -typedef __signed__ short __s16 ; -typedef unsigned short __u16 ; - -typedef __signed__ int __s32; -typedef unsigned int __u32 ; - -#ifdef __GNUC__ -__extension__typedef __signed__ long long __s64 ; -__extension__typedef unsigned long long __u64 ; -#else -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; -#endif - -#endif /* __ASSEMBLY__ */ - -#ifdef __KERNEL__ - -#ifndef __ASSEMBLY__ - -typedef signed char s8 ; -typedef unsigned char u8 ; - -typedef signed short s16 ; -typedef unsigned short u16 ; - -typedef signed int s32 ; -typedef unsigned int u32 ; - -typedef signed long long s64 ; -typedef unsigned long long u64 ; - -#define S8_C (x) x -#define U8_C (x) x ## U -#define S16_C (x) x -#define U16_C (x) x ## U -#define S32_C (x) x -#define U32_C (x) x ## U -#define S64_C (x) x ## LL -#define U64_C (x) x ## ULL - -#else /* __ASSEMBLY__ */ - -#define S8_C (x) x -#define U8_C (x) x -#define S16_C (x) x -#define U16_C (x) x -#define S32_C (x) x -#define U32_C (x) x -#define S64_C (x) x -#define U64_C (x) x - -#endif /* __ASSEMBLY__ */ - -#endif /* __KERNEL__ */ - -#endif /* _ASM_GENERIC_INT_LL64_H */ arch/nios2/include/asm/types.h +1
-1@@ -1,6 +1,6 @@#ifndef __ASM_TYPES_H#define __ASM_TYPES_H -#include <asm/int-ll64.h> +#include <asm-generic/int-ll64.h> #endif arch/openrisc/include/asm/types.h +1
-47@@ -16,52 +16,6 @@#ifndef _ASM_TYPES_H#define _ASM_TYPES_H -/* -* This file is never included by application software unless -* explicitly requested (e.g., via linux/types.h) in which case the -* application is Linux specific so (user-) name space pollution is -* not a major issue. However, for interoperability, libraries still -* need to be careful to avoid a name clashes. -*/ - -/* -* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the -* header files exported to user space -*/ - -typedef __signed__ char __s8; -typedef unsigned char __u8 ; - -typedef __signed__ short __s16 ; -typedef unsigned short __u16 ; - -typedef __signed__ int __s32; -typedef unsigned int __u32 ; - -#if defined(__GNUC__) -__extension__typedef __signed__ long long __s64 ; -__extension__typedef unsigned long long __u64 ; -#endif - -/* -* These aren't exported outside the kernel to avoid name space clashes -*/ -#ifdef __KERNEL__ - -typedef signed char s8 ; -typedef unsigned char u8 ; - -typedef signed short s16 ; -typedef unsigned short u16 ; - -typedef signed int s32 ; -typedef unsigned int u32 ; - -typedef signed long long s64 ; -typedef unsigned long long u64 ; - -#include <asm/bitsperlong.h> - -#endif /* __KERNEL__ */ +#include <asm-generic/int-ll64.h> #endif /* _ASM_TYPES_H */ arch/powerpc/include/asm/types.h +2
-33@@ -1,45 +1,14 @@#ifndef _PPC_TYPES_H#define _PPC_TYPES_H -#ifndef __ASSEMBLY__ - -typedef __signed__ char __s8; -typedef unsigned char __u8 ; - -typedef __signed__ short __s16 ; -typedef unsigned short __u16 ; +#include <asm-generic/int-ll64.h> -typedef __signed__ int __s32; -typedef unsigned int __u32 ; - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; -#endif +#ifndef __ASSEMBLY__typedef struct {__u32 u[4 ]; } __attribute((aligned (16 )))vector128 ; -#ifdef __KERNEL__ -/* -* These aren't exported outside the kernel to avoid name space clashes -*/ -typedef signed char s8 ; -typedef unsigned char u8 ; - -typedef signed short s16 ; -typedef unsigned short u16 ; - -typedef signed int s32 ; -typedef unsigned int u32 ; - -typedef signed long long s64 ; -typedef unsigned long long u64 ; - -#include <asm-generic/bitsperlong.h> - -#endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ #endif arch/riscv/include/asm/types.h +2
-40@@ -1,6 +1,8 @@#ifndef __ASM_RISCV_TYPES_H#define __ASM_RISCV_TYPES_H +#include <asm-generic/int-ll64.h> +#ifdef __riscv64/* * This is used in dlmalloc. On RISCV64 we need it to be 64 bit @@ -15,44 +17,4 @@#endif -/* -* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the -* header files exported to user space -*/ - -typedef __signed__ char __s8; -typedef unsigned char __u8 ; - -typedef __signed__ short __s16 ; -typedef unsigned short __u16 ; - -typedef __signed__ int __s32; -typedef unsigned int __u32 ; - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; -#endif - -/* -* These aren't exported outside the kernel to avoid name space clashes -*/ -#ifdef __KERNEL__ - -typedef signed char s8 ; -typedef unsigned char u8 ; - -typedef signed short s16 ; -typedef unsigned short u16 ; - -typedef signed int s32 ; -typedef unsigned int u32 ; - -typedef signed long long s64 ; -typedef unsigned long long u64 ; - -#include <asm/bitsperlong.h> - -#endif /* __KERNEL__ */ -#endif /* __ASM_RISCV_TYPES_H */ arch/sandbox/include/asm/types.h +2
-40@@ -1,6 +1,8 @@#ifndef __ASM_I386_TYPES_H#define __ASM_I386_TYPES_H +#include <asm-generic/int-ll64.h> +#ifdef __x86_64__/* * This is used in dlmalloc. On X86_64 we need it to be @@ -16,44 +18,4 @@#endif -/* -* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the -* header files exported to user space -*/ - -typedef __signed__ char __s8; -typedef unsigned char __u8 ; - -typedef __signed__ short __s16 ; -typedef unsigned short __u16 ; - -typedef __signed__ int __s32; -typedef unsigned int __u32 ; - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; -#endif - -/* -* These aren't exported outside the kernel to avoid name space clashes -*/ -#ifdef __KERNEL__ - -typedef signed char s8 ; -typedef unsigned char u8 ; - -typedef signed short s16 ; -typedef unsigned short u16 ; - -typedef signed int s32 ; -typedef unsigned int u32 ; - -typedef signed long long s64 ; -typedef unsigned long long u64 ; - -#include <asm/bitsperlong.h> - -#endif /* __KERNEL__ */ -#endif arch/x86/include/asm/types.h +2
-40@@ -1,6 +1,8 @@#ifndef __ASM_I386_TYPES_H#define __ASM_I386_TYPES_H +#include <asm-generic/int-ll64.h> +#ifndef __ASSEMBLY__#ifdef __x86_64__@@ -18,46 +20,6 @@#endif -/* -* __xx is ok: it doesn't pollute the POSIX namespace. Use these in the -* header files exported to user space -*/ - -typedef __signed__ char __s8; -typedef unsigned char __u8 ; - -typedef __signed__ short __s16 ; -typedef unsigned short __u16 ; - -typedef __signed__ int __s32; -typedef unsigned int __u32 ; - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64 ; -typedef unsigned long long __u64 ; -#endif - -/* -* These aren't exported outside the kernel to avoid name space clashes -*/ -#ifdef __KERNEL__ - -typedef signed char s8 ; -typedef unsigned char u8 ; - -typedef signed short s16 ; -typedef unsigned short u16 ; - -typedef signed int s32 ; -typedef unsigned int u32 ; - -typedef signed long long s64 ; -typedef unsigned long long u64 ; - -#include <asm/bitsperlong.h> - -#endif /* __KERNEL__ */ -#endif #endif Signature · 7 lines
2.25.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox