[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 10:12:20 +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=OTWFWyQTcXwBDwZZFlryr9XncfO3tk1HEVK3ASeze6o=; b=TevBPbuQPsCbs49JsZXbbRCmwjCWveX7chNdlZufk8OH5s9YkPL8t1QwK+NZg16Jx5xwqK1TJqJUc7hZSTrNilQZEvaQPzMls848blwYrY58VluckAXBVwwyvxeUja8+tgoXsK7iTt3Rw/v11wvbkNfswruYKWSvIWcbI8k/p1honfkM/Lq28JXafitkRgGbshhcXt31a2NUMPs2JCVxg23QQmxtPRB1yLCb93JgvCkdrJ1vkmGQ5UMimIGm+0jzpvWVTLJR5K5AefFSkWOIIuQ0XIeXRB2G/uXroEfmq1LB0OqAus6GWGnnOJqOb7cOrrzKnN1XuwKpgSp105MrSA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oORUcIq3h4428R+aefre8XPWit0s0bB9ZusdUcoAfgaKbvx6UlTjP312kfUT24a2WpG1rhNHZMhNF2WVyE4K0GYpfKZPXLCQ/T+3bJTTB50V9MR2vXTi9OYacG5jh/bSUn7s2uP8B39DboG0QVwMmSyIxLdyAJ3ZSRKmhkX0Qr0XzNBT036ziqPWn6ewkC7Vq+RaF3OcKaHMaFNOikucmC9QUdiX/3vHpT+tDOfoDJMwMeKNp4xq/rtQfvq/ujLyCFHcjvOkzwJiZtkDXsks2qYup7WsjTqe4D57AAbMO+4ntEA+d9j2sY5oBjnP2XJD9dEcZcYIfne18Zvhy1f8eg==
  • 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 10:12:39 +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+0OC1jGtjtl2z6p7ZSKAgAAKWICAAAE/AA==
  • Thread-topic: [PATCH] xen/arm: Use register_t type in cpuinfo entries

Hi Julien,

> On 9 Mar 2021, at 11:07, Julien Grall <julien@xxxxxxx> wrote:
> 
> 
> 
> On 09/03/2021 09:30, Bertrand Marquis wrote:
>> Hi Julien,
> 
> Hi Bertrand,
> 
>>> 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."
> 
> I think you mean consistency rather than coherency.

Yes right :-)

> 
>>> 
>>>> 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 ?
> 
> Both can be fixed on commit. I will queue it to my next branch soon.

Perfect, 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®.