Message ID | 20230302121049.160466-2-shahuang@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [kvm-unit-tests,v2,1/3] arm: gic: Write one bit per time in gic_irq_set_clr_enable() | expand |
diff --git a/lib/arm/gic.c b/lib/arm/gic.c index 1bfcfcf..89a15fe 100644 --- a/lib/arm/gic.c +++ b/lib/arm/gic.c @@ -176,7 +176,6 @@ void gic_ipi_send_mask(int irq, const cpumask_t *dest) void gic_irq_set_clr_enable(int irq, bool enable) { u32 offset, split = 32, shift = (irq % 32); - u32 reg, mask = BIT(shift); void *base; assert(irq < 1020); @@ -199,8 +198,7 @@ void gic_irq_set_clr_enable(int irq, bool enable) assert(0); } base += offset + (irq / split) * 4; - reg = readl(base); - writel(reg | mask, base); + writel(BIT(shift), base); } enum gic_irq_state gic_irq_state(int irq)