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

Re: [PATCH v2 1/2] common: move Linux-inherited fixed width type decls to common header


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 9 Aug 2023 12:58:42 +0200
  • 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=AJPJp4MZfHRx9lZamo6Lxirl2WEO4pNO4Pg62Jcnd70=; b=S82DhUAkug0c6ceHyrm7sMnRASCjlOm4gNq7EH1rM3ViogHuPg6fsYrci6+EFOflpbf5dy1P9kvafkWY3fXk86OEfy0m0/TOytEvrvLSQrnIaKKsDzaEduJiHzMQdl832lz70GJZcsnyqs+RQ9Vcq1BPQD3bBsqmHmjsAP+lgQzC0G/NnxHGZpuCuSwhesSpKa1T2fvsLXm0sBYbrM/Dm9iFhgo454wSqojKqgzgFbcLge46AHNqFrF57QZO43o/tg15MolACQt+FmocgAiDil/2LAgfOm8M2n/d+s90iRbwcmCsVOhYcvD2GfN0jadWiqJBD8mnUGZzTiXyhPDxzA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E1rQimP/a2kdgqF8JEpSFsu5OQgBHql+zUpHUHPbD/dfzhUgyqgi10u+KtQjDF4gOjgwKoViqPpbLQlHHnTYa1bwW/p8FWoNtl+EiPc/FrrGSy9ZzTJuYdOAkjOmwUkzm8KAus+maB3jp0H7me/JCi0HFcN5SrqxoNlT6/6wF77uDB9u6TgnEHXrQ6x6AXCVCu4IGb2z/w66yuLvj2/NOCmhaJ2luOYQHGZIAiEStAXd07roSKig18MkrwU3q4InwWwomgtgkUXPQ5t5/1rzPsGq5iEhm50xwJJVo07oWnpcEHgw1RHX88owgCGC5iJuK/cPYr0BKOGYKF/C9jf8oA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Bobby Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Daniel Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 09 Aug 2023 10:58:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 09.08.2023 12:49, Julien Grall wrote:
> On 04/08/2023 07:08, Jan Beulich wrote:
>> Have these in one place, for all architectures to use. Also use the C99
>> types as the "original" ones, and derive the Linux compatible ones
>> (which we're trying to phase out). For __s<N>, seeing that no uses exist
>> anymore, move them to a new Linux compatibility header (as an act of
>> precaution - as said, we don't have any uses of these types right now).
>>
>> In some Flask sources inclusion of asm/byteorder.h needs moving later.
>>
>> No functional change intended.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> With one remark:
> 
> Acked-by: Julien Grall <jgrall@xxxxxxxxxx>

Thanks.

>> --- a/xen/arch/arm/include/asm/types.h
>> +++ b/xen/arch/arm/include/asm/types.h
>> @@ -1,18 +1,7 @@
>>   #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(CONFIG_ARM_32)
>> -typedef signed long long s64;
>> -typedef unsigned long long u64;
>>   typedef u32 vaddr_t;
>>   #define PRIvaddr PRIx32
>>   #if defined(CONFIG_PHYS_ADDR_T_32)
>> @@ -34,9 +23,9 @@ typedef u64 paddr_t;
>>   #endif
> 
> I find odd that you don't add a newline before/after #endif here but...
> 
>>   typedef u32 register_t;
>>   #define PRIregister "08x"
>> -#elif defined (CONFIG_ARM_64)
>> -typedef signed long s64;
>> -typedef unsigned long u64;
>> +
>> +#elif defined(CONFIG_ARM_64)
>> +
>>   typedef u64 vaddr_t;
>>   #define PRIvaddr PRIx64
>>   typedef u64 paddr_t;
>> @@ -44,6 +33,7 @@ typedef u64 paddr_t;
>>   #define PRIpaddr "016lx"
>>   typedef u64 register_t;
>>   #define PRIregister "016lx"
>> +
> 
> .. you add one here. But this change looks a bit unrelated and IMHO of 
> out context.
> 
>>   #endif
>>   
>>   #endif /* __ARM_TYPES_H__ */

Hmm, I think I was mistaking the blank line after

#if defined(CONFIG_PHYS_ADDR_T_32)

as the matching one. Which way would you prefer me to resolve the
inconsistency: Add the missing blank line, or drop again the three ones
I'm presently adding?

Jan



 


Rackspace

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