On 12/11/21 11:11 AM, Peter Maydell wrote:
The extract_table_params() decodes the fields in the GITS_BASER<n>
registers into TableDesc structs. Since the fields are the same for
all the GITS_BASER<n> registers, there is currently a lot of code
duplication within the switch (type) statement. Refactor so that the
cases include only what is genuinely different for each type:
the calculation of the number of bits in the ID value that indexes
into the table.
Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
---
hw/intc/arm_gicv3_its.c | 97 +++++++++++++++++------------------------
1 file changed, 40 insertions(+), 57 deletions(-)
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
r~