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

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


  • To: Oleksii <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 11 Jan 2023 10:08:20 +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=fcayiEJHhuTrBBbs3n/Zkwp+wXDoF5yREjQiuKs5PQE=; b=WMMU2A8HTc0kZN1fIGv/TmRHuE5RtX6D9ZsqR1P4WjiYrW0ufhbmQeAjJsuG7gxi4nUtknSbRZMBj6jjfZwUTPnq0z2LN7g4RjrUxCXWrg1EVSLVaeWsdMzVbkLd1JwrXVMsbANra94E3BggWlyVUt8ys5GN7+bA3F1p6omh6ETGMYPNBXDT1fjRS29IowCiWGhfmw2ufAX7QxNBVWjIsS2JiOFyU7JoJPBWAuLhXdr2aOLSrZlGzjNpMIDxtGCqT6AHTrzIHrmWSSp80Fhueff2g6g46OdR9/TSr2YviafUvssu0+mgUZwAmWXoM5tEMVllxOnY/Qtt1Few31P3Uw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g6V8MEZokr3DYQGSn6eWcqLsvGmdovnzWUNfFJGF9cSjBU11wg+dz4WLtB2W18vKzXzSiEB7LPCm/dUgbToU0Rmpd9/oGwIWElX1XxmGLKHh5Td0ZrlI3fLr03uBy1W/G5Q6gUA/O1vWG5huKlccFZxrn64E+oRu/KwAe/K0sprpaHY2juE60uew/8jMNyfWaIFsLaD6vlqj+VhDJI84NrM/3M8djRRXM9Qp343kc7DzeJNJVooDRnjkmHkOI3PWmuqJ6/OilPM22hkM6bdZTnr2sZ8vPfFhajnb4ukGul/xA61CKj/RZ5WTzSGLOlE5NLThRWzA7uRSHOM43zz9oA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Julien Grall <julien@xxxxxxx>, 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: Wed, 11 Jan 2023 09:08:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.01.2023 09:47, Oleksii wrote:
> On Tue, 2023-01-10 at 17:58 +0100, Jan Beulich wrote:
>> On 10.01.2023 16:17, Oleksii Kurochko wrote:
>>> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
>>> ---
>>> Changes in V3:
>>>     - Nothing changed
>>> ---
>>> Changes in V2:
>>>     - Remove unneeded now types from <asm/types.h>
>>
>> I guess you went a little too far: Types used in common code, even if
>> you
> It looks then I didn't understand which one of types are needed.
> 
> In "[PATCH v1 2/8] xen/riscv: introduce asm/types.h header file" all
> types were introduced as most of them are used in <xen/types.h>:
> __{u|s}{8|16|32|64}. Thereby it looks like the following types in
> <asm/types.h> should be present from the start:
>   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
> 
>  Then it turns out that there is no any sense in:
>   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;
>     OR
>   typedef signed long s64;
>   typedef unsigned long u64;
> As I understand instead of them should be used: {u|s}int<N>_t.

Hmm, the situation is worse than I thought (recalled) it was: You're
right, xen/types.h actually uses __{u,s}<N>. So I'm sorry for mis-
guiding you; we'll need to do more cleanup first for asm/types.h to
become smaller.

Jan



 


Rackspace

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