Skip to content
Commit 926b5dfa authored by Marc Zyngier's avatar Marc Zyngier
Browse files

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



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
parent f4a81f5a
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