[PATCH 04/10] irqchip/gic-v3-its: Track per-ITS list number

From: Marc Zyngier
Date: Tue Oct 10 2017 - 08:52:10 EST


At boot time, we enumerate all the GICv4-capable ITSs, and build
a mask of the available ITSs. Take this opportunity to store
the ITS number in the its_node structure so that we can use it
at a later time.

Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
---
drivers/irqchip/irq-gic-v3-its.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index cc7c8f6cb863..24ffb19c559d 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -99,6 +99,7 @@ struct its_node {
struct its_collection *collections;
struct list_head its_device_list;
u64 flags;
+ unsigned long list_nr;
u32 ite_size;
u32 device_ids;
int numa_node;
@@ -2996,6 +2997,8 @@ static int __init its_probe_one(struct resource *res,
if (err < 0)
goto out_free_its;

+ its->list_nr = err;
+
pr_info("ITS@%pa: Using ITS number %d\n",
&res->start, err);
} else {
--
2.11.0