From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH RFC] xen: arm: context switch vtimer PPI state. Date: Tue, 3 Mar 2015 12:26:20 +0000 Message-ID: <1425385580.24959.144.camel@citrix.com> References: <1422287716-26505-1-git-send-email-ian.campbell@citrix.com> <1423537142.5851.0.camel@citrix.com> <1425383771.24959.127.camel@citrix.com> <1425385132.24959.139.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1425385132.24959.139.camel@citrix.com> 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: julien.grall@linaro.org, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2015-03-03 at 12:18 +0000, Ian Campbell wrote: > > > > > > + /* Xen s/w state */ > > > > > > + unsigned long inprogress:1; > > > > > > +}; > > > > > > > > Using a uint32_t bitmask would be more in line the rest of the code > > > > style, but it is just a matter of taste. > > > > > > You mean "uint32_t inprogress:1" for each? Or > > > #define ENAVBLED 1 > > > #define PENDING 2 > > > etc > > > and test_set_bit stuff? > > > > Something like status in xen/include/asm-arm/vgic.h:struct pending_irq > > OK. Actually, what is the benefit? I think pending_irq.status is done this way because it is used lock free from multiple contexts and this allows for test_and_set_bit etc to be used. The hwppi state isn't accessed like that, so I think using the normal appropriate types like we do in stuct arch_{domain,vcpu} is the appropriate style. struct hwppi_state is even defined in domain.h. Ian.