OSDN Git Service

hw/intc/arm_gicv3: Provide ich_num_aprs()
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 12 May 2022 15:14:57 +0000 (16:14 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 19 May 2022 15:19:02 +0000 (16:19 +0100)
commit5d55f827677a521feaab6dc651168e6136954e88
tree9bcfd93e0da971693cc4ec444533949367d520a5
parent39f29e599355f9512482b67624e7a6c9000c5ddd
hw/intc/arm_gicv3: Provide ich_num_aprs()

We previously open-coded the expression for the number of virtual APR
registers and the assertion that it was not going to cause us to
overflow the cs->ich_apr[] array.  Factor this out into a new
ich_num_aprs() function, for consistency with the icc_num_aprs()
function we just added for the physical APR handling.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220512151457.3899052-7-peter.maydell@linaro.org
Message-id: 20220506162129.2896966-6-peter.maydell@linaro.org
hw/intc/arm_gicv3_cpuif.c