diff options
| author | Anup Patel <anup.patel@oss.qualcomm.com> | 2026-04-23 10:53:38 +0530 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2026-05-12 09:55:58 +0530 |
| commit | c0d0dd02b186c12376137c5c3db8e5d0653e450e (patch) | |
| tree | 83051bf4c1c7b122aeff48962d90f3ce32ad7ddc /include | |
| parent | d861447b0b0297db5fbe28878f8568a93fcfa965 (diff) | |
| download | opensbi-c0d0dd02b186c12376137c5c3db8e5d0653e450e.tar.gz opensbi-c0d0dd02b186c12376137c5c3db8e5d0653e450e.zip | |
lib: sbi_irqchip: Allow setting hardware interrupt affinity
The irqchip drivers can provide mechanism to set interrupt affinity
so add hwirq_set_affinity() callback for irqchip drivers and use it
to implement sbi_irqchip_set_affinity() which can be used by other
drivers.
Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260423052339.356900-6-anup.patel@oss.qualcomm.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi/sbi_irqchip.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sbi/sbi_irqchip.h b/include/sbi/sbi_irqchip.h index 880ff49f..03a01038 100644 --- a/include/sbi/sbi_irqchip.h +++ b/include/sbi/sbi_irqchip.h @@ -60,6 +60,10 @@ struct sbi_irqchip_device { /** End of hardware interrupt of this irqchip */ void (*hwirq_eoi)(struct sbi_irqchip_device *chip, u32 hwirq); + /** Set hardware interrupt affinity */ + int (*hwirq_set_affinity)(struct sbi_irqchip_device *chip, u32 hwirq, + u32 hart_index); + /** Mask a hardware interrupt of this irqchip */ void (*hwirq_mask)(struct sbi_irqchip_device *chip, u32 hwirq); @@ -98,6 +102,13 @@ int sbi_irqchip_raw_handler_default(struct sbi_irqchip_device *chip, u32 hwirq); int sbi_irqchip_set_raw_handler(struct sbi_irqchip_device *chip, u32 hwirq, int (*raw_hndl)(struct sbi_irqchip_device *, u32)); +/** Get hardware interrupt affinity */ +int sbi_irqchip_get_affinity(struct sbi_irqchip_device *chip, u32 hwirq, + u32 *out_hart_index); + +/** Set hardware interrupt affinity */ +int sbi_irqchip_set_affinity(struct sbi_irqchip_device *chip, u32 hwirq, u32 hart_index); + /** Register a hardware interrupt handler */ int sbi_irqchip_register_handler(struct sbi_irqchip_device *chip, u32 first_hwirq, u32 num_hwirq, u32 hwirq_flags, |
