hw/arm/mps2-tz: Condition IRQ splitting on number of CPUs, not board type
commitba94ffd7d18b4724733819eaef3953617d4e81ab
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 15 Feb 2021 11:51:22 +0000 (15 11:51 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Sat, 6 Mar 2021 13:30:39 +0000 (6 13:30 +0000)
treed9cb086c0804cb484fc0abce29c86d6853950588
parentde77e8f4d2eec3c0ec9a74ad0da63cd9faec6aa7
hw/arm/mps2-tz: Condition IRQ splitting on number of CPUs, not board type

In the mps2-tz board code, we handle devices whose interrupt lines
must be wired to all CPUs by creating IRQ splitter devices for the
AN521, because it has 2 CPUs, but wiring the device IRQ directly to
the SSE/IoTKit input for the AN505, which has only 1 CPU.

We can avoid making an explicit check on the board type constant by
instead creating and using the IRQ splitters for any board with more
than 1 CPU.  This avoids having to add extra cases to the
conditionals every time we add new boards.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210215115138.20465-9-peter.maydell@linaro.org
hw/arm/mps2-tz.c