[lkml]   [2020]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[tip: irq/core] irqchip/gic-v4.1: Skip absent CPUs while iterating over redistributors
The following commit has been merged into the irq/core branch of tip:

Commit-ID: 28d160de5194c68ff534443d2a8b6f1d10d57c58
Author: Marc Zyngier <>
AuthorDate: Wed, 04 Mar 2020 20:33:09
Committer: Marc Zyngier <>
CommitterDate: Thu, 19 Mar 2020 11:21:58

irqchip/gic-v4.1: Skip absent CPUs while iterating over redistributors

In a system that is only sparsly populated with CPUs, we can end-up with
redistributors structures that are not initialized. Let's make sure we
don't try and access those when iterating over them (in this case when
checking we have a L2 VPE table).

Fixes: 4e6437f12d6e ("irqchip/gic-v4.1: Ensure L2 vPE table is allocated at RD level")
Signed-off-by: Marc Zyngier <>
Reviewed-by: Zenghui Yu <>
Reviewed-by: Eric Auger <>
drivers/irqchip/irq-gic-v3-its.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 83b1186..da883a6 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -2452,6 +2452,10 @@ static bool allocate_vpe_l2_table(int cpu, u32 id)
if (!gic_rdists->has_rvpeid)
return true;

+ /* Skip non-present CPUs */
+ if (!base)
+ return true;
val = gicr_read_vpropbaser(base + SZ_128K + GICR_VPROPBASER);

 \ /
  Last update: 2020-03-29 22:27    [W:1.974 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site