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

Raymond Mao raymondmaoca at gmail.com
Wed Feb 11 14:20:23 PST 2026


From: Raymond Mao <raymond.mao at riscstar.com>

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 at 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;
 };
 
 /**
-- 
2.25.1




More information about the opensbi mailing list