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

Re: [PATCH] xen/arm: Use register_t type in cpuinfo entries


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 9 Mar 2021 09:30:51 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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-SenderADCheck; bh=f0fRbCNFTtVArDKOiyLJMs/Wyh2MBw5YmDDsro7bUTQ=; b=Do5UGpGmPAA3G4z7eahlc4YI1Ru3oKwTeBUp7ZcFFx5HdOaLUYua5BGCQ31tdOoE3bx5/NzuCjt8yElKU3z/idxtLYDDU85oDmCpgG2ca1iAzSbB6/e1kAGjvxLi+ZilWpsMyjzWna3ReksASykQdg00FwkEkLRhWOlm6+SD+VQ+eCvR85S7C4dkQuXm/guDLnBmzZyz9cAOz8xCWaxOPvxLd0oNb3cxN1uzU1eXBzAIo3aiwnXp22NQTh6iC4OIlmluNGjZEpBGBcikhcRkK0lqv4XTUPHWET/k464bOAq6TzrOlK4mWXJOwkmeys6pMYiPUh8LTyneo8Ocez7gBQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SRWLKVFSmxIxH4xwSmpNu6NRSQHYliG3CWRswP2Ca2rkx1avRvnvxQsN+wLCbPx2kETPyriB3dpRA8ex72A1dYLkodaXUi5Pc1jvR2dNl/zHLp7sXnLqqzNMc9pHBi+pasZEQrOm0t1OzWznrqMcBaCNZU99xzLctTBG7aSJ35DGEBf3HY/qliqvpOOGlHy3WZ+HkwgL+4qVqWJN72CYdtrVLbRWUeDPBQeG53kkZEu0hBClmySjER+r2F8DV1w0v/32yzF4NdU6x6Ni6CsrrDAB3weV24EdxnZT5lEoqwUD1ze6Ba3buAr6dY4cHxwijF/vHyjJEhAK+BrVaiqL9Q==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 09 Mar 2021 09:31:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXFFQNaLCX4oSw+0OC1jGtjtl2z6p7ZSKA
  • Thread-topic: [PATCH] xen/arm: Use register_t type in cpuinfo entries

Hi Julien,

> On 8 Mar 2021, at 20:48, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Bertrand,
> 
> On 08/03/2021 17:18, Bertrand Marquis wrote:
>> All cpu identification registers that we store in the cpuinfo structure
>> are 64bit on arm64 and 32bit on arm32 so storing the values in 32bit on
>> arm64 is removing the higher bits which might contain information in the
>> future.
>> This patch is changing the types in cpuinfo to register_t (which is
>> 32bit on arm32 and 64bit on arm64) and adding the necessary paddings
>> inside the unions.
> 
> I read this as we would replace uint32_t with register_t. However, there are 
> a few instances where you, validly, replace uint64_t with register_t. I would 
> suggest to clarify it in the commit message.

How about adding the following sentence: “For coherency uint64_t entries are 
also changed to register_t on 64bit systems."

> 
>> diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
>> index cae2179126..ea0dd3451e 100644
>> --- a/xen/arch/arm/smpboot.c
>> +++ b/xen/arch/arm/smpboot.c
>> @@ -321,7 +321,8 @@ void start_secondary(void)
>>      if ( !opt_hmp_unsafe &&
>>           current_cpu_data.midr.bits != boot_cpu_data.midr.bits )
>>      {
>> -        printk(XENLOG_ERR "CPU%u MIDR (0x%x) does not match boot CPU MIDR 
>> (0x%x),\n"
>> +        printk(XENLOG_ERR "CPU%u MIDR (0x%"PRIregister") does not match 
>> boot "
>> +               "CPU MIDR (0x%"PRIregister"),\n"
> 
> For printk messages, we don't tend to split it like that (even for more than 
> 80 characters one). Instead, the preferred approach is:
> 
> printk(XENLOG_ERR
>       "line 1\n"
>       "line 2\n")

Ok.

Do you want me to send a v2 or can you fix this during the commit ?

> 
> 
> The rest of the code looks good to me:
> 
> Acked-by: Julien Grall <jgrall@xxxxxxxxxx>

Thanks :-)

Cheers
Bertrand

> 
> Cheers,
> 
> -- 
> Julien Grall


 


Rackspace

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