[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





On 26/07/2019 15:21, Volodymyr Babchuk wrote:

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? :)

That's why you have tools to help you figuring out the position of a bit...

Personally, I'd like to see such number grouped like "FEDCBA98 76543210"
Anyways, this is matter of personal taste. I'm okay with padding.

Patch are welcomed ;).



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.

This was kind of implied with "consistency". But I am not going to argue here, there are more important stuff to focus.

Cheers,

--
Julien Grall

_______________________________________________
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®.