[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-devel
Subject: Re: [Xen-devel] [PATCH v6 10/31] xen/arm: ITS: Introduce gic_is_lpi helper function
From: Julien Grall <julien.grall () citrix ! com>
Date: 2015-08-31 16:49:22
Message-ID: 55E48592.8080905 () citrix ! com
[Download RAW message or body]
Hi Vijay,
On 31/08/2015 12:06, vijay.kilari@gmail.com wrote:
> diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
> index 758678d..2199963 100644
> --- a/xen/arch/arm/gic.c
> +++ b/xen/arch/arm/gic.c
> @@ -62,6 +62,15 @@ enum gic_version gic_hw_version(void)
> return gic_hw_ops->info->hw_version;
> }
>
> +#ifdef HAS_GICV3
> +bool_t gic_is_lpi(unsigned int irq)
> +{
> + return (irq >= FIRST_GIC_LPI && irq < (1 << gic_hw_ops->info->nr_id_bits));
It would make more sense to calculate the number of ID supported at boot
time rather than re-calculate everytime this function is called (i.e
very often).
> +}
> +#else
> +bool_t gic_is_lpi(unsigned int irq) { return 0; }
> +#endif
I though I'd already say it on a previous version. I would like to avoid
seen any #ifdef HAS_GICV3 in the generic code include interrupt framework.
In this case, I don't see much the benefit to do a specific case for
platform not using GICv3 (i.e ARM32).
Regards,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic