[Xen-devel] [XEN PATCH v3 06/11] Add NR_SGIS and NR_PPIS definitions to irq.h

Stewart Hildebrand posted 11 patches 6 years, 2 months ago
[Xen-devel] [XEN PATCH v3 06/11] Add NR_SGIS and NR_PPIS definitions to irq.h
Posted by Stewart Hildebrand 6 years, 2 months ago
These will be used in a follow-up patch.

Signed-off-by: Stewart Hildebrand <stewart.hildebrand@dornerworks.com>
---
v3: new patch
---
 xen/include/asm-arm/irq.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/xen/include/asm-arm/irq.h b/xen/include/asm-arm/irq.h
index 3b37a21c06..367fe6269c 100644
--- a/xen/include/asm-arm/irq.h
+++ b/xen/include/asm-arm/irq.h
@@ -33,7 +33,9 @@ struct arch_irq_desc {
     unsigned int type;
 };
 
-#define NR_LOCAL_IRQS	32
+#define NR_SGIS         16
+#define NR_PPIS         16
+#define NR_LOCAL_IRQS   (NR_SGIS + NR_PPIS)
 
 /*
  * This only covers the interrupts that Xen cares about, so SGIs, PPIs and
-- 
2.24.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [XEN PATCH v3 06/11] Add NR_SGIS and NR_PPIS definitions to irq.h
Posted by Julien Grall 6 years, 2 months ago
Hi,

On 15/11/2019 20:10, Stewart Hildebrand wrote:
> These will be used in a follow-up patch.
> 
> Signed-off-by: Stewart Hildebrand <stewart.hildebrand@dornerworks.com>
> ---
> v3: new patch
> ---
>   xen/include/asm-arm/irq.h | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/include/asm-arm/irq.h b/xen/include/asm-arm/irq.h
> index 3b37a21c06..367fe6269c 100644
> --- a/xen/include/asm-arm/irq.h
> +++ b/xen/include/asm-arm/irq.h
> @@ -33,7 +33,9 @@ struct arch_irq_desc {
>       unsigned int type;
>   };
>   
> -#define NR_LOCAL_IRQS	32
> +#define NR_SGIS         16
> +#define NR_PPIS         16
> +#define NR_LOCAL_IRQS   (NR_SGIS + NR_PPIS)

We have already NR_GIC_SGI (see include/asm-arm/gic.h) and VGIC_NR_SGIS 
(see include/asm-arm/new_vgic.h).

So I would rather not want to define the same value (with the same 
meaning) a third time.

Note that I am ok if the two existing one are dropped in favor of NR_SGIS.

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel