From: Ian Campbell Subject: Re: [PATCH v3] xen/arm: introduce PLATFORM_QUIRK_GUEST_PIRQ_NEED_EOI Date: Thu, 10 Jul 2014 11:33:54 +0100 Message-ID: <1404988434.32404.30.camel@hastur.hellion.org.uk> References: <1404484784-30659-1-git-send-email-stefano.stabellini@eu.citrix.com> <1404909672.16789.23.camel@kazak.uk.xensource.com> <1404916813.11945.29.camel@hastur.hellion.org.uk> <53BD5525.3000203@linaro.org> 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: xen-devel@lists.xensource.com, Julien Grall , Anup Patel , Pranavkumar Sawargaonkar List-Id: xen-devel@lists.xenproject.org On Wed, 2014-07-09 at 16:11 +0100, Stefano Stabellini wrote: > > > Stefano, you might want to arrange in your patch to cache the value of > > > the quirk in the gicv2 struct -- otherwise all the calls to > > > platform_has_quirk are going to add up. > > > > Can't we cache the value in the platform code? I don't think it's too > > expensive to call the platform_has_quirk in this case. > > Caching the value in gic-v2.c seems a bit overkill. But we could turn > platform->quirks() into a bitfield, then we can significantly reduce > memory accesses when checking for quirks, from 3 to just 1. Hrm, yes. That does have the disadvantage of potentially un-consting the platform ops. Anyway, this patch is correct for now and the detection of the fixed platform can be done later. So applied with s/SGI/SPI in the commit log as discussed IRL. Ian.