[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 2/8] xen/riscv: introduce asm/types.h header file


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 6 Jan 2023 15:12:32 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FacX2mzZ5EiF0EJmp6Q13pLRP+eKFI0c7R9yu/clnsI=; b=SGHJmvCx1JS0T6dQ0q99/WYFDrMRNGbqqimfdGAyxhTuy/4asU4B8hiLbUA/bWGMmMNvEN/7B7EaAfU60EhaOdKdAuTWKRqy/zZx+CgSKgLkuPaiQARNTw/RO191Yt+jVkZ/RCqD5R/CXFJbOC+BVkdTNlEK3xmW6fkQh3GRlqsnwEJ8eTyoNP8GCfsUfMxjNPDwDzfdpmHjpGfY/UUKEi8D9B1Aja8N/4CZNBEPiJaM9JnMjY42mMTEGhRODUCiBpxG4yblQ67QBwlU3+MQczE2X6EaOr3u10u1n/PWjSFxDjMT/UA9D+YAFR9kScDXGAp84uQrvz7GwKyTNCoV5A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Die09GvshbmyQ/BF8x9nlKVsSsQbaHL7K0SWsZT90Gedjo0lfYfKqc13uC2bFmwhbKLL1PO+8rdKKaunANu1T7QkNzaiWOuwIvWH7MeFK8HJg//f9NeTERdeKvZhteUFWgibMsC2qWAJ6ISfijp9OXKNkOJVruNoihTa/NvGwu/kI+/7K984XjP/rp0+JJipQii07ct8jBSet4tL3qLG5Fbh/vOjhTO+Ywbg8q8cNfgCICak6Qb1P0QAxCjKsSGbH5n4tuoR+TIKKD/Tq2DypBNy7P1HqdmVohjqasf6JWXm2HwZ3OsPUzAO2BRNOkS90vk1dpK7THyoiTYqFcEILw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 06 Jan 2023 14:12:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 06.01.2023 14:14, Oleksii Kurochko wrote:
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> ---
>  xen/arch/riscv/include/asm/types.h | 73 ++++++++++++++++++++++++++++++
>  1 file changed, 73 insertions(+)
>  create mode 100644 xen/arch/riscv/include/asm/types.h
> 
> diff --git a/xen/arch/riscv/include/asm/types.h 
> b/xen/arch/riscv/include/asm/types.h
> new file mode 100644
> index 0000000000..48f27f97ba
> --- /dev/null
> +++ b/xen/arch/riscv/include/asm/types.h
> @@ -0,0 +1,73 @@
> +#ifndef __RISCV_TYPES_H__
> +#define __RISCV_TYPES_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;
> +
> +#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

Of these, only the ones actually needed should be introduced. We're
in the process of phasing out especially the above, but also ...

> +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(CONFIG_RISCV_32)
> +typedef signed long long s64;
> +typedef unsigned long long u64;

... all of these.

> +typedef u32 vaddr_t;

(New) consumers of such types should therefore use {u,}int<N>_t instead.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.