[PATCH 1/3] lib: sbi_irqchip: Add irqchip private context pointer in sbi_irqchip_device

Raymond Mao
2026-02-11T22:20:49Z

HW specific private data is required for irqchip device operations,
for example, for APLIC, address, num_idc and num_source are needed
for mask / unmask / claim an IRQ, thus it is reasonable to add a
private HW data pointer in sbi_irqchip_device.

Signed-off-by: Raymond Mao <raymond.mao@riscstar.com>
---
include/sbi/sbi_irqchip.h | 3 +++
1 file changed, 3 insertions(+)

diff --git a/include/sbi/sbi_irqchip.h b/include/sbi/sbi_irqchip.h
index 77b54110..af820ec1 100644
--- a/include/sbi/sbi_irqchip.h
+++ b/include/sbi/sbi_irqchip.h
@@ -56,6 +56,9 @@ struct sbi_irqchip_device {

/** Unmask a hardware interrupt of this irqchip */
void (*hwirq_unmask)(struct sbi_irqchip_device *chip, u32 hwirq);
+
+ /** Irqchip device private context */
+ void *chip_priv;
};

/**