From patchwork Mon Aug 6 11:47:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 143500 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3206943ljj; Mon, 6 Aug 2018 05:06:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcUQYTRpymeG3gLToRxN2er8QBtBvu8RAkKPZp+IZJTWuzQXgD7t5yTGzxv5DHH3KnaCXNX X-Received: by 2002:a50:c292:: with SMTP id o18-v6mr18602970edf.188.1533557166588; Mon, 06 Aug 2018 05:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533557166; cv=none; d=google.com; s=arc-20160816; b=y8utYIET6tttCizLEosCGnqQakLxacoLS+XDJ38tsotsZEO4fgqsRQvhpKDj0p+Cjg Pz/iZPxOg0xY3eLHPOx1UEjV561QOA31DwpD/JVpYHv4RuiPRtZ0zjRi9O2ZqVG0Ps+6 A/ryz1eL/Hc1IC8hgxL711LViNUsnpuVbzH/okhhQ1tSGbuhXws8VRt4R1F+xaMJMFgs IiLWB6Tt9m2J8WOvrZc2idJ9NpSt0tY5Otoc/isKExEs/1bZImzKgEAZ3y6VbOt8jR1s T7Z5O76n5XBvgEF2NUKVe25VDZDBqjL8nXf4ZL289iivsn289rMZ+7cCYeRA88U7qMmK bj9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:dkim-filter:arc-authentication-results; bh=/a1v9Bf1pMHnWr6FxryabV9hhEqxAu/1/BCzIkf5CdI=; b=Vb68omlbAMsK421XTK9qQ6Qj9u9nD62OfOEX0+hJnNFkKP8x65cgBDjeTOA0GNhs6Y sgv4NleC1Y0SeSAyGGaB5IUXtSx1+vze0I+L4xJSAd0eunYxLhSctojKnPStHjSvuUl7 d0i7cgapTuolTC3pF6JUELtScZq01fR4utUscZoNozwVJX+dbkTaXJH2KdPh/C1/pHrL Kw+144zEClmRC0S+pzTRApPnkWspUPOnHQtAeuFG3HJXvwO+WHjEP3zvzTZQ6F28P0im wKSa19r6IYG2s4nyEXXfoh304pilvuN2Gy7g9Ohd6p4nHZ4OrsfPMUtjpcKcPCnh1GNy DKxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=2j8Aophe; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id m29-v6si6240511edd.279.2018.08.06.05.06.06; Mon, 06 Aug 2018 05:06:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=2j8Aophe; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 30D76C21DE8; Mon, 6 Aug 2018 12:06:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=KHOP_BIG_TO_CC, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A75B8C21C8B; Mon, 6 Aug 2018 12:06:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1BC2DC21E0F; Mon, 6 Aug 2018 11:49:10 +0000 (UTC) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by lists.denx.de (Postfix) with ESMTPS id A76F8C21C2F for ; Mon, 6 Aug 2018 11:48:58 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id w76BllPT032023; Mon, 6 Aug 2018 20:47:49 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w76BllPT032023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1533556070; bh=5hvK7XStbsc7BUBaoAKgIP6MK1UPkx9UVyeoJGPeWTs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2j8Aophe0ATs29nSeUxnFWwrekSuqcMc3wTY+3hcf1pH8bQozoc1yQ72X3PYwP+Xh 0jyhcs6jM3kmJz1+bYbgtRmP3LXLDkjlug0emqx5l/K339u+4hZr0YSB/clBdVxvaC 1IvuVRoKFquopoWhp5PyFR3pyut5l6lIr8it0F6lALyxsB1A5OaJGI1UKDYii7X+H8 PiKSi5PN8AYTzZPNr20ce88n36L/D+2/nYfL8v7cSJnTGWan4c/AIqBbw+OfH4zldS +kIhQAr4U3MJ2tDqJV4AfzOyKOSiQNHerzkBRMrMZ1p533MsEa9V2N7fMSRsJy9E/V dSYvdrUTWvYbQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 6 Aug 2018 20:47:39 +0900 Message-Id: <1533556060-26284-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533556060-26284-1-git-send-email-yamada.masahiro@socionext.com> References: <1533556060-26284-1-git-send-email-yamada.masahiro@socionext.com> X-Mailman-Approved-At: Mon, 06 Aug 2018 12:06:00 +0000 Cc: Alexey Brodkin , uboot-snps-arc@synopsys.com, Andy Fleming , Stefan Roese , Marek Vasut , Tom Rini , Angelo Dureghello , Macpaul Lin , Eugeniy Paltsev , Scott McNutt , Huan Wang Subject: [U-Boot] [PATCH 2/3] arch: types.h: factor out fixed width typedefs to int-ll64.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" All architectures have the same definition for s8/16/32/64 and u8/16/32/64. Factor out the duplicated code into . BTW, Linux unified the kernel space definition into int-ll64.h a few years ago as you see in Linux commit 0c79a8e29b5f ("asm/types.h: Remove include/asm-generic/int-l64.h"). Signed-off-by: Masahiro Yamada --- arch/arc/include/asm/types.h | 36 ++-------------------------- arch/arm/include/asm/types.h | 33 ++------------------------ arch/m68k/include/asm/types.h | 30 ++--------------------- arch/microblaze/include/asm/types.h | 33 ++------------------------ arch/mips/include/asm/types.h | 36 ++-------------------------- arch/nds32/include/asm/types.h | 33 ++------------------------ arch/powerpc/include/asm/types.h | 30 ++--------------------- arch/riscv/include/asm/types.h | 33 ++------------------------ arch/sandbox/include/asm/types.h | 33 ++------------------------ arch/sh/include/asm/types.h | 34 ++------------------------- arch/x86/include/asm/types.h | 33 ++------------------------ arch/xtensa/include/asm/types.h | 33 ++------------------------ include/asm-generic/int-ll64.h | 47 +++++++++++++++++++++++++++++++++++++ include/asm-generic/types.h | 9 +++++++ 14 files changed, 80 insertions(+), 373 deletions(-) create mode 100644 include/asm-generic/int-ll64.h create mode 100644 include/asm-generic/types.h diff --git a/arch/arc/include/asm/types.h b/arch/arc/include/asm/types.h index 3e37781..f31dcdf 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 -#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 9af7353..900b261 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 -#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 3ffcab2..5d39b97 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 + #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 77094f6..056a313 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 + /* * 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 7032862..925d7ef 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 + #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 2e8924f..d2444da 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 -#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 diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h index b29ce79..cc8d123 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 + #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 9797206..bd86271 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 -#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 diff --git a/arch/sandbox/include/asm/types.h b/arch/sandbox/include/asm/types.h index 79c85aa..7cd56b4 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 -#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 aed4a6e..c5ddbbd 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 + #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 7649c2b..ba50001 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 -#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 bae1a48..2c5b543 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 -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 */ diff --git a/include/asm-generic/int-ll64.h b/include/asm-generic/int-ll64.h new file mode 100644 index 0000000..7451718 --- /dev/null +++ b/include/asm-generic/int-ll64.h @@ -0,0 +1,47 @@ +/* SPDX-License-Identifier: GPL-2.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 + +#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 + +typedef __s8 s8; +typedef __u8 u8; +typedef __s16 s16; +typedef __u16 u16; +typedef __s32 s32; +typedef __u32 u32; +typedef __s64 s64; +typedef __u64 u64; + +#endif /* __ASSEMBLY__ */ + + +#endif /* _ASM_GENERIC_INT_LL64_H */ diff --git a/include/asm-generic/types.h b/include/asm-generic/types.h new file mode 100644 index 0000000..7c076c5 --- /dev/null +++ b/include/asm-generic/types.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_GENERIC_TYPES_H +#define _ASM_GENERIC_TYPES_H +/* + * int-ll64 is used everywhere now. + */ +#include + +#endif /* _ASM_GENERIC_TYPES_H */