OSDN Git Service

hw/arm/virt: Abstract out calculation of redistributor region capacity
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 8 Apr 2022 14:15:49 +0000 (15:15 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 22 Apr 2022 13:44:53 +0000 (14:44 +0100)
commitf31985a77a4a0052219a08bc08b9092daa74eb1e
tree07510d6f33b3ba83dcddb0624ef4db33c58ab041
parent5a389a9aec382c5093c6c143a5a6ed7809eadc12
hw/arm/virt: Abstract out calculation of redistributor region capacity

In several places in virt.c we calculate the number of redistributors that
fit in a region of our memory map, which is the size of the region
divided by the size of a single redistributor frame. For GICv4, the
redistributor frame is a different size from that for GICv3. Abstract
out the calculation of redistributor region capacity so that we have
one place we need to change to handle GICv4 rather than several.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220408141550.1271295-41-peter.maydell@linaro.org
hw/arm/virt.c
include/hw/arm/virt.h