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

Re: [Xen-devel] [PATCH 7/7] xen/arm: types: Specify the zero padding in the definition of PRIregister


  • To: Julien Grall <julien.grall@xxxxxxx>
  • From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Date: Fri, 26 Jul 2019 14:21:37 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=epam.com;dmarc=pass action=none header.from=epam.com;dkim=pass header.d=epam.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=pIw1/K2FFEOrIQdDl+XO3A41m1CGTvWulmuSuqe0QpU=; b=U+9/cLgw8SINN05+RHhExKHUATq+vssADqWWegvpTflZ5vPW3DrP5Qg+Ruwd4Frmjeml1VnU91bKKVaF3zwppvbdZHK40FLoEHsSzqfCyNVkiKMsPlA55WmmBvfC5W4kwK5a7tMPJlMctUD9if/UBVkuMRlScQPPXHk78+rh3IrK2/ZTpAXRzLvDN9Jb1gjPK22FtVywuT8Ut6lZ+n6JjP1Jn/SHepfevp4R8H/5Vc1+iesSAaumEAd5MYrveKw54L+xbYfAXDUbijJ0lKAuMxoxWCg9Ipgop+ZJQJT0PP+I4eDcA2Lmr9jA45McZ2uLbb9J1+5Cnn2k8q5D3lqfhA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Utwq6FP1GHzDrTCZ6WOxhxeGJv0eQgaRDXkKQwHHcvZK9j+M+emopE030cxRNH+eLlisQyx6crIRW98THJ5SN2mXNKwO9GiEchsoqf44IkjOONRvojvKcGi7SAdAsCvBk84YPXqbbaRDNYkodPxBsrxGHPEcGEFRpeH59yq+RrVNcCCb51hOcHELbIShBAlIXMfSEvs7d3ahvDIV9CqcdoAQMkm628pd9n30s1l2WgJO0X/3v07BcWGiws8DTPrRodylv0/xcWZPvFpui/9r6MfcV5b9uzc8gDyA3hcMfMTx5bZqLcmEKv+zI8jyVXwsMYQ71pY0++dBo6xlMwQDDg==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Volodymyr_Babchuk@xxxxxxxx;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 26 Jul 2019 14:21:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVQZ6lXvwm3o0b10iCA+aCZUR7cabc3XOAgAAItgCAABF2AA==
  • Thread-topic: [PATCH 7/7] xen/arm: types: Specify the zero padding in the definition of PRIregister

Julien Grall writes:

> Hi,
>
> On 26/07/2019 13:47, Volodymyr Babchuk wrote:
>>
>> Julien Grall writes:
>>
>>> The definition of PRIregister varies between Arm32 and Arm64 (32-bit vs
>>> 64-bit). However, some of the users uses the wrong padding.
>> type: "users use"
>>
>>> For more consistency, the padding is now moved into the PRIregister and
>>> varies depending on the architecture.
>> I'm not sure this is the right thing to do. There are lots of code
>> (especially in vgic) that does not use padding at all. Now it will print
>> padding, even if original author does not wanted to. And, honestly it is
>> hard to parse 15-16 zeroes in a row.
>
> Well, I am usually starting to read from the right to left. So, for
> me, 15-16 zeroes are easy to ignore ;).
And what if there only one bit set on position 31 or 35? :)
Personally, I'd like to see such number grouped like "FEDCBA98 76543210"
Anyways, this is matter of personal taste. I'm okay with padding.

>>
>> I am suggesting to add another macro like PRIregister_pad or something
>> like that.
>
> No, we should print register the same way everywhere. I am clearly against
> providing two different formats here for the same type. Otherwise this
> will lead to endless debate on which one you will chose in the code.
Okay then. But at least you should mention in the commit message, that
this change will affect other prints, not only the ones in the diff.

-- 
Volodymyr Babchuk at EPAM
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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