Skip to content
Commit 278f53cb authored by Marc Zyngier's avatar Marc Zyngier Committed by Bruce Ashfield
Browse files

irqchip/gic-v3: Only provision redistributors that are enabled in ACPI

[ Upstream commit 926b5dfa

 ]

We currently allocate redistributor region structures for
individual redistributors when ACPI doesn't present us with
compact MMIO regions covering multiple redistributors.

It turns out that we allocate these structures even when
the redistributor is flagged as disabled by ACPI. It works
fine until someone actually tries to tarse one of these
structures, and access the corresponding MMIO region.

Instead, track the number of enabled redistributors, and
only allocate what is required. This makes sure that there
is no invalid data to misuse.

Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Reported-by: default avatarHeyi Guo <guoheyi@huawei.com>
Tested-by: default avatarHeyi Guo <guoheyi@huawei.com>
Link: https://lore.kernel.org/r/20191216062745.63397-1-guoheyi@huawei.com
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a23f441e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment