summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arc/include/asm/types.h36
-rw-r--r--arch/arm/include/asm/types.h33
-rw-r--r--arch/m68k/include/asm/types.h30
-rw-r--r--arch/microblaze/include/asm/types.h33
-rw-r--r--arch/mips/include/asm/types.h36
-rw-r--r--arch/nds32/include/asm/types.h33
-rw-r--r--arch/powerpc/include/asm/types.h30
-rw-r--r--arch/riscv/include/asm/types.h33
-rw-r--r--arch/sandbox/include/asm/types.h33
-rw-r--r--arch/sh/include/asm/types.h34
-rw-r--r--arch/x86/include/asm/types.h33
-rw-r--r--arch/xtensa/include/asm/types.h33
12 files changed, 24 insertions, 373 deletions
diff --git a/arch/arc/include/asm/types.h b/arch/arc/include/asm/types.h
index 3e37781677..f31dcdf28e 100644
--- a/arch/arc/include/asm/types.h
+++ b/arch/arc/include/asm/types.h
@@ -6,41 +6,9 @@
#ifndef __ASM_ARC_TYPES_H
#define __ASM_ARC_TYPES_H
-typedef unsigned short umode_t;
-
-/*
- * __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;
+#include <asm-generic/int-ll64.h>
-#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
- */
-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;
+typedef unsigned short umode_t;
#define BITS_PER_LONG 32
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h
index 9af7353f08..900b2619a4 100644
--- a/arch/arm/include/asm/types.h
+++ b/arch/arm/include/asm/types.h
@@ -1,44 +1,15 @@
#ifndef __ASM_ARM_TYPES_H
#define __ASM_ARM_TYPES_H
-typedef unsigned short umode_t;
-
-/*
- * __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;
+#include <asm-generic/int-ll64.h>
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
-#endif
+typedef unsigned short umode_t;
/*
* 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;
-
#ifdef CONFIG_ARM64
#define BITS_PER_LONG 64
#else /* CONFIG_ARM64 */
diff --git a/arch/m68k/include/asm/types.h b/arch/m68k/include/asm/types.h
index 3ffcab20df..5d39b97b67 100644
--- a/arch/m68k/include/asm/types.h
+++ b/arch/m68k/include/asm/types.h
@@ -1,43 +1,17 @@
#ifndef _M68K_TYPES_H
#define _M68K_TYPES_H
+#include <asm-generic/int-ll64.h>
+
#ifndef __ASSEMBLY__
typedef unsigned short umode_t;
-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
-
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;
#define BITS_PER_LONG 32
diff --git a/arch/microblaze/include/asm/types.h b/arch/microblaze/include/asm/types.h
index 77094f62d6..056a3133fb 100644
--- a/arch/microblaze/include/asm/types.h
+++ b/arch/microblaze/include/asm/types.h
@@ -1,6 +1,8 @@
#ifndef _ASM_TYPES_H
#define _ASM_TYPES_H
+#include <asm-generic/int-ll64.h>
+
/*
* This file is never included by application software unless
* explicitly requested (e.g., via linux/types.h) in which case the
@@ -12,41 +14,10 @@
typedef unsigned short umode_t;
/*
- * __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;
-
#define BITS_PER_LONG 32
/* Dma addresses are 32-bits wide. */
diff --git a/arch/mips/include/asm/types.h b/arch/mips/include/asm/types.h
index 7032862a29..925d7ef023 100644
--- a/arch/mips/include/asm/types.h
+++ b/arch/mips/include/asm/types.h
@@ -6,32 +6,12 @@
#ifndef _ASM_TYPES_H
#define _ASM_TYPES_H
+#include <asm-generic/int-ll64.h>
+
#ifndef __ASSEMBLY__
typedef unsigned short umode_t;
-/*
- * __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;
-#else
-typedef __signed__ long long __s64;
-typedef unsigned long long __u64;
-#endif
-
#endif /* __ASSEMBLY__ */
/*
@@ -43,18 +23,6 @@ typedef unsigned long long __u64;
#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;
-
#if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
|| defined(CONFIG_64BIT)
typedef u64 dma_addr_t;
diff --git a/arch/nds32/include/asm/types.h b/arch/nds32/include/asm/types.h
index 2e8924f76a..d2444da9b6 100644
--- a/arch/nds32/include/asm/types.h
+++ b/arch/nds32/include/asm/types.h
@@ -11,44 +11,15 @@
#ifndef __ASM_NDS_TYPES_H
#define __ASM_NDS_TYPES_H
-typedef unsigned short umode_t;
-
-/*
- * __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;
+#include <asm-generic/int-ll64.h>
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-typedef __signed__ long long __s64;
-typedef unsigned long long __u64;
-#endif
+typedef unsigned short umode_t;
/*
* 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;
-
#define BITS_PER_LONG 32
#include <stddef.h>
diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h
index b29ce792f7..cc8d123b8f 100644
--- a/arch/powerpc/include/asm/types.h
+++ b/arch/powerpc/include/asm/types.h
@@ -1,43 +1,17 @@
#ifndef _PPC_TYPES_H
#define _PPC_TYPES_H
+#include <asm-generic/int-ll64.h>
+
#ifndef __ASSEMBLY__
typedef unsigned short umode_t;
-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
-
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;
#define BITS_PER_LONG 32
diff --git a/arch/riscv/include/asm/types.h b/arch/riscv/include/asm/types.h
index 9797206e5e..bd8627196d 100644
--- a/arch/riscv/include/asm/types.h
+++ b/arch/riscv/include/asm/types.h
@@ -12,44 +12,15 @@
#ifndef __ASM_RISCV_TYPES_H
#define __ASM_RISCV_TYPES_H
-typedef unsigned short umode_t;
-
-/*
- * __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;
+#include <asm-generic/int-ll64.h>
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-typedef __signed__ long long __s64;
-typedef unsigned long long __u64;
-#endif
+typedef unsigned short umode_t;
/*
* 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;
-
#define BITS_PER_LONG 32
#include <stddef.h>
diff --git a/arch/sandbox/include/asm/types.h b/arch/sandbox/include/asm/types.h
index 79c85aa5f6..7cd56b4147 100644
--- a/arch/sandbox/include/asm/types.h
+++ b/arch/sandbox/include/asm/types.h
@@ -6,44 +6,15 @@
#ifndef __ASM_SANDBOX_TYPES_H
#define __ASM_SANDBOX_TYPES_H
-typedef unsigned short umode_t;
-
-/*
- * __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;
+#include <asm-generic/int-ll64.h>
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
-#endif
+typedef unsigned short umode_t;
/*
* 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;
-
/*
* Number of bits in a C 'long' on this architecture.
*/
diff --git a/arch/sh/include/asm/types.h b/arch/sh/include/asm/types.h
index aed4a6eb57..c5ddbbd26b 100644
--- a/arch/sh/include/asm/types.h
+++ b/arch/sh/include/asm/types.h
@@ -1,29 +1,12 @@
#ifndef __ASM_SH_TYPES_H
#define __ASM_SH_TYPES_H
+#include <asm-generic/int-ll64.h>
+
#ifndef __ASSEMBLY__
typedef unsigned short umode_t;
-/*
- * __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
-
#endif /* __ASSEMBLY__ */
/*
@@ -35,19 +18,6 @@ __extension__ typedef unsigned long long __u64;
#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;
-
/* Dma addresses are 32-bits wide. */
typedef u32 dma_addr_t;
diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h
index 7649c2bb0c..ba50001560 100644
--- a/arch/x86/include/asm/types.h
+++ b/arch/x86/include/asm/types.h
@@ -1,44 +1,15 @@
#ifndef __ASM_I386_TYPES_H
#define __ASM_I386_TYPES_H
-typedef unsigned short umode_t;
-
-/*
- * __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;
+#include <asm-generic/int-ll64.h>
-#if defined(__GNUC__)
-__extension__ typedef __signed__ long long __s64;
-__extension__ typedef unsigned long long __u64;
-#endif
+typedef unsigned short umode_t;
/*
* 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;
-
#if CONFIG_IS_ENABLED(X86_64)
#define BITS_PER_LONG 64
#else
diff --git a/arch/xtensa/include/asm/types.h b/arch/xtensa/include/asm/types.h
index bae1a480ee..2c5b5433cc 100644
--- a/arch/xtensa/include/asm/types.h
+++ b/arch/xtensa/include/asm/types.h
@@ -6,44 +6,15 @@
#ifndef _XTENSA_TYPES_H
#define _XTENSA_TYPES_H
-typedef unsigned short umode_t;
-
-/*
- * __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;
+#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
+typedef unsigned short umode_t;
/*
* 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;
-
#define BITS_PER_LONG 32
/* Dma addresses are 32-bits wide */