mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-05-23 14:21:32 +01:00
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>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user