Re: [PATCH 30/41] hw/intc/arm_gicv3_redist: Factor out "update bit in pending table" code

2022-04-09 Thread Richard Henderson
On 4/8/22 07:15, Peter Maydell wrote: +if (extract32(pend, irq % 8, 1) == level) { Here you assume level in {0,1}... +pend = deposit32(pend, irq % 8, 1, level ? 1 : 0); ... and here you force it into {0,1}. Better to have the compiler do that with bool level. You might consider

[PATCH 30/41] hw/intc/arm_gicv3_redist: Factor out "update bit in pending table" code

2022-04-08 Thread Peter Maydell
Factor out the code which sets a single bit in an LPI pending table. We're going to need this for handling vLPI tables, not just the physical LPI table. Signed-off-by: Peter Maydell --- hw/intc/arm_gicv3_redist.c | 49 +++--- 1 file changed, 30 insertions(+), 19