From patchwork Wed Jun 21 21:11:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13287963 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92FBAEB64D7 for ; Wed, 21 Jun 2023 21:12:46 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.553146.863548 (Exim 4.92) (envelope-from ) id 1qC57l-0006uQ-MD; Wed, 21 Jun 2023 21:12:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 553146.863548; Wed, 21 Jun 2023 21:12:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qC57l-0006uH-JC; Wed, 21 Jun 2023 21:12:21 +0000 Received: by outflank-mailman (input) for mailman id 553146; Wed, 21 Jun 2023 21:12:20 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qC57k-0006QB-OT for xen-devel@lists.xenproject.org; Wed, 21 Jun 2023 21:12:20 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 4e1c8d72-1078-11ee-8611-37d641c3527e; Wed, 21 Jun 2023 23:12:19 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 4e1c8d72-1078-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1687381938; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8PGVbTSNvcVmjoHTepH7x0XW0Ng7LzFsr4r2eAR8kF8=; b=P4TATj58J7MO8u904uY+oXByeIMax5uAPQ8R2eaPMFHWi8qBGKl2MScv LEYwCViFeUdjc/RvgBN9t6su3ckjkCu7rS8TS9vAsfg8LFSp720L2KtMn JWlka20lo76NWThtrmkhVgBJrBjY7WhUDO7EPo7CZ0ou8LQ/JDy7fwzF2 I=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 112996392 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:V+2B06iFkaNFF77VpyATCjn2X161bhcKZh0ujC45NGQN5FlHY01je htvCz+HOqqJYDT8f9FzaYu+9xkAsZODxoA3TgVv/C9jEyIb9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsx+qyq0N8klgZmP6sT4gWHzyV94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1yDwyjaMKVBktubD12i+ tRbOjY0MEiGrdmR/+3ra/BCocY6EevSadZ3VnFIlVk1DN4jSJHHBa7L+cVZzHE7gcUm8fT2P pRDL2A1NVKZPkMJYw1MYH49tL7Aan3XWjtUsl+K44Ew5HDe1ldZ27nxKtvFPNeNQK25m27B/ ziXrjqiU0ty2N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dkaNDSfNzlHZcaR2njFLz4jquP3j5xBU43lvglQpQIBUdAQ0+9gYDzrdHGf3GN9dOAE/J z33Ls/mxOQPU45Q+6cHXc/U+3Kt7Tw5e/biU5vPW9e1OGW5wnYk4LHLw== X-Talos-CUID: 9a23:bbIte27rI7KRUmw9Rdsst1wSI559d1fm60iPc26hJ0FrUYC3cArF X-Talos-MUID: 9a23:X3savwgw/n4G9MEVbalSAMMpP9pW3fvpBE0xy648+PaWMiNMEhfGpWHi X-IronPort-AV: E=Sophos;i="6.00,261,1681185600"; d="scan'208";a="112996392" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Bob Eshleman , Alistair Francis , Connor Davis , "Oleksii Kurochko" , Shawn Anastasio , Timothy Pearson Subject: [PATCH 1/2] xen/types: Drop #ifdefary for __{SIZE,PTRDIFF}_TYPE__ Date: Wed, 21 Jun 2023 22:11:59 +0100 Message-ID: <20230621211200.4132989-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230621211200.4132989-1-andrew.cooper3@citrix.com> References: <20230621211200.4132989-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 All supported compilers have these types. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Alistair Francis Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis CC: Bob Eshleman CC: Alistair Francis CC: Connor Davis CC: Oleksii Kurochko CC: Shawn Anastasio CC: Timothy Pearson https://godbolt.org/z/Y6PWcd6js --- xen/include/xen/types.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/xen/include/xen/types.h b/xen/include/xen/types.h index 6aba80500aaf..8b22a02eeaa4 100644 --- a/xen/include/xen/types.h +++ b/xen/include/xen/types.h @@ -5,18 +5,11 @@ #include -#if defined(__SIZE_TYPE__) typedef __SIZE_TYPE__ size_t; -#else -typedef unsigned long size_t; -#endif + typedef signed long ssize_t; -#if defined(__PTRDIFF_TYPE__) typedef __PTRDIFF_TYPE__ ptrdiff_t; -#else -typedef signed long ptrdiff_t; -#endif #define BITS_TO_LONGS(bits) \ (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) From patchwork Wed Jun 21 21:12:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13287962 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B9724EB64DC for ; Wed, 21 Jun 2023 21:12:42 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.553144.863528 (Exim 4.92) (envelope-from ) id 1qC57i-0006QO-89; Wed, 21 Jun 2023 21:12:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 553144.863528; Wed, 21 Jun 2023 21:12:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qC57i-0006QH-4N; Wed, 21 Jun 2023 21:12:18 +0000 Received: by outflank-mailman (input) for mailman id 553144; Wed, 21 Jun 2023 21:12:16 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qC57f-0006QB-R7 for xen-devel@lists.xenproject.org; Wed, 21 Jun 2023 21:12:16 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 497cb7fa-1078-11ee-8611-37d641c3527e; Wed, 21 Jun 2023 23:12:12 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 497cb7fa-1078-11ee-8611-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1687381932; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=O8AEz7JfrhOSqym56+0EwnNE503UhvYripUFGrNGdFo=; b=df+pUpwWxMlsqOzayuvApKBCS8ysTwCFuiKWCYJov2zBH2+jdBTC/RUc IBrA2B3w8XfLlyCGNF+sqwfwhBBOQf4VPCLmR2Z2W1ExbdW+yqNdmq9JV tDRscRpmNj/W5cSJdknXEW3KJVOIZihARYwaX3eYMzGMVmPigFzU+C8sP Y=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 114088574 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:ZKYUAq1PxnnOMNlBgPbD5f52kn2cJEfYwER7XKvMYLTBsI5bpzAOy 2QcXzyOO/6KMzTxL9x0bYTko0oGusLSy9ZjTgM+pC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefTAOK6ULWeUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8teTb8HuDgNyo4GlD5gJkPKgX1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CH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Ok d59lqmmWNVexQYijmaJO+ozpU7Iz4e19uAyI8UNNCmjUmlH/Zs6fSbfhpAV6vIWrlKb0CPvM n+yFhBhEe3hEKvY/JQ5fWLJsszrOSkopwTv IronPort-HdrOrdr: A9a23:TmjusqDWiKuytRnlHelo55DYdb4zR+YMi2TDt3oddfU1SL38qy nKpp4mPHDP5wr5NEtPpTniAtjjfZq/z/5ICOAqVN/PYOCPggCVxepZnOjfKlPbehEX9oRmpN 1dm6oVMqyMMbCt5/yKnDVRELwbsaa6GLjDv5a785/0JzsaE52J6W1Ce2GmO3wzfiZqL7wjGq GR48JWzgDQAkj+PqyAdx84t/GonayzqK7b X-Talos-CUID: 9a23:1sPCRW7cxExjegfE9tss0FceR/wFWE3hwnLJCmifUV5sdOaJRgrF X-Talos-MUID: 9a23:2TjnlAUF+nFfgM7q/ALTp3ZyLJ0r2J6/Ex4mjqcttfirGTMlbg== X-IronPort-AV: E=Sophos;i="6.00,261,1681185600"; d="scan'208";a="114088574" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Bob Eshleman , Alistair Francis , Connor Davis , "Oleksii Kurochko" , Shawn Anastasio , Timothy Pearson , Roberto Bagnara Subject: [PATCH 2/2] xen/types: Rework stdint vs __{u,s}$N types Date: Wed, 21 Jun 2023 22:12:00 +0100 Message-ID: <20230621211200.4132989-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230621211200.4132989-1-andrew.cooper3@citrix.com> References: <20230621211200.4132989-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Xen uses the stdint types. Rearrange the types headers to define the compatibility __{u,s}$N types in terms of the stdint types, not the other way around. All all supported compilers on architectures other than x86 support the stdint __*_TYPE__ macros. Move these into the common types.h to avoid them being duplicated in each architecture. For x86 on obsolete compilers, synthesize appropriate types. This cleanup has the side effect of removing all use of the undocumented __signed__ GCC keyword. This is a vestigial remnant of `gcc -traditional` mode for dialetcs of C prior to the introduction of the signed keyword. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Alistair Francis --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis CC: Bob Eshleman CC: Alistair Francis CC: Connor Davis CC: Oleksii Kurochko CC: Shawn Anastasio CC: Timothy Pearson CC: Roberto Bagnara I've left the non __ types alone for now. They're complicated mostly by ARM having differing ideas of what a paddr_t is. A different option would be to sort out the stdint types ahead of including , which can either be done by introducing a or upping the minimum compiler version for x86; a task which is massively overdue. --- xen/arch/arm/include/asm/types.h | 19 ------------------- xen/arch/riscv/include/asm/types.h | 19 ------------------- xen/arch/x86/include/asm/types.h | 21 +++++++++------------ xen/include/xen/types.h | 28 +++++++++++++++++----------- 4 files changed, 26 insertions(+), 61 deletions(-) diff --git a/xen/arch/arm/include/asm/types.h b/xen/arch/arm/include/asm/types.h index fb6618ef247f..545a5e9d1175 100644 --- a/xen/arch/arm/include/asm/types.h +++ b/xen/arch/arm/include/asm/types.h @@ -1,25 +1,6 @@ #ifndef __ARM_TYPES_H__ #define __ARM_TYPES_H__ -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__) -#if defined(CONFIG_ARM_32) -typedef __signed__ long long __s64; -typedef unsigned long long __u64; -#elif defined (CONFIG_ARM_64) -typedef __signed__ long __s64; -typedef unsigned long __u64; -#endif -#endif - typedef signed char s8; typedef unsigned char u8; diff --git a/xen/arch/riscv/include/asm/types.h b/xen/arch/riscv/include/asm/types.h index 0c0ce78c8f6e..93a680a8f323 100644 --- a/xen/arch/riscv/include/asm/types.h +++ b/xen/arch/riscv/include/asm/types.h @@ -1,25 +1,6 @@ #ifndef __RISCV_TYPES_H__ #define __RISCV_TYPES_H__ -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__) -#if defined(CONFIG_RISCV_32) -typedef __signed__ long long __s64; -typedef unsigned long long __u64; -#elif defined (CONFIG_RISCV_64) -typedef __signed__ long __s64; -typedef unsigned long __u64; -#endif -#endif - typedef signed char s8; typedef unsigned char u8; diff --git a/xen/arch/x86/include/asm/types.h b/xen/arch/x86/include/asm/types.h index 2d56aed66782..a5d4f6e9587a 100644 --- a/xen/arch/x86/include/asm/types.h +++ b/xen/arch/x86/include/asm/types.h @@ -1,18 +1,15 @@ #ifndef __X86_TYPES_H__ #define __X86_TYPES_H__ -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 __s64; -typedef unsigned long __u64; +#ifndef __INT8_TYPE__ /* GCC <= 4.4 */ +# define __INT8_TYPE__ signed char +# define __UINT8_TYPE__ unsigned char +# define __INT16_TYPE__ short +# define __UINT16_TYPE__ unsigned short +# define __INT32_TYPE__ int +# define __UINT32_TYPE__ unsigned int +# define __INT64_TYPE__ long +# define __UINT64_TYPE__ unsigned long #endif typedef signed char s8; diff --git a/xen/include/xen/types.h b/xen/include/xen/types.h index 8b22a02eeaa4..4083f1bf18b0 100644 --- a/xen/include/xen/types.h +++ b/xen/include/xen/types.h @@ -11,6 +11,15 @@ typedef signed long ssize_t; typedef __PTRDIFF_TYPE__ ptrdiff_t; +typedef __INT8_TYPE__ int8_t; +typedef __UINT8_TYPE__ uint8_t; +typedef __INT16_TYPE__ int16_t; +typedef __UINT16_TYPE__ uint16_t; +typedef __INT32_TYPE__ int32_t; +typedef __UINT32_TYPE__ uint32_t; +typedef __INT64_TYPE__ int64_t; +typedef __UINT64_TYPE__ uint64_t; + #define BITS_TO_LONGS(bits) \ (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) #define DECLARE_BITMAP(name,bits) \ @@ -39,17 +48,14 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; #define LONG_MIN (-LONG_MAX - 1) #define ULONG_MAX (~0UL) -typedef __u8 uint8_t; -typedef __s8 int8_t; - -typedef __u16 uint16_t; -typedef __s16 int16_t; - -typedef __u32 uint32_t; -typedef __s32 int32_t; - -typedef __u64 uint64_t; -typedef __s64 int64_t; +typedef uint8_t __u8; +typedef int8_t __s8; +typedef uint16_t __u16; +typedef int16_t __s16; +typedef uint32_t __u32; +typedef int32_t __s32; +typedef uint64_t __u64; +typedef int64_t __s64; typedef __u16 __le16; typedef __u16 __be16;