From: Ian Campbell Subject: Re: [PATCH 08/16] xen: arm: Make register bit definitions unsigned. Date: Thu, 21 Nov 2013 10:29:07 +0000 Message-ID: <1385029747.6071.132.camel@kazak.uk.xensource.com> References: <1384958746.6071.64.camel@kazak.uk.xensource.com> <1384958897-13074-8-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: Anup Patel , julien.grall@linaro.org, tim@xen.org, xen-devel@lists.xen.org, Pranavkumar Sawargaonkar , pranavkumar@linaro.org List-Id: xen-devel@lists.xenproject.org On Wed, 2013-11-20 at 19:29 +0000, Stefano Stabellini wrote: > On Wed, 20 Nov 2013, Ian Campbell wrote: > > Otherwise the results of the shifting can be undefined and/or sign extended. > > > > Pointed out in the context of HCR_* by Pranavkumar Sawargaonkar. > > > > Signed-off-by: Ian Campbell > > Cc: Pranavkumar Sawargaonkar > > Do you realize that by using U instead of UL, it would be 4 bytes even > on ARMv8? Is that expected? If so maybe adding a line to the commit > message would be good. Hrm yes. For most of the registers that is expected/desired since the actual register is 32-bits, but for HCR in particular it should be 32 bits on 32-bit and 64 bits on 64-bits, which might be tricky to arrange with these macros. I'll see what I can do. We only actually use bits 0..31 since bits 32+33 aren't useful to us (at least not now) so I might end up fudging it somehow...