mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-04-13 06:11:37 +01:00
lib: sbi_irqchip: Support irqchip device targetting subset of harts
It is possible to have platform where an irqchip device targets a subset of harts and there are multiple irqchip devices to cover all harts. To support this scenario: 1) Add target_harts hartmask to struct sbi_irqchip_device which represents the set of harts targetted by the irqchip device 2) Call warm_init() and process_hwirqs() callbacks of an irqchip device on a hart only if irqchip device targets that particular hart Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260213055342.3124872-6-anup.patel@oss.qualcomm.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -147,7 +147,7 @@ int imsic_get_target_file(u32 hartindex)
|
||||
return imsic_get_hart_file(scratch);
|
||||
}
|
||||
|
||||
static int imsic_process_hwirqs(void)
|
||||
static int imsic_process_hwirqs(struct sbi_irqchip_device *chip)
|
||||
{
|
||||
ulong mirq;
|
||||
|
||||
@@ -391,7 +391,10 @@ int imsic_cold_irqchip_init(struct imsic_data *imsic)
|
||||
}
|
||||
|
||||
/* Register irqchip device */
|
||||
sbi_irqchip_add_device(&imsic_device);
|
||||
sbi_hartmask_set_all(&imsic_device.target_harts);
|
||||
rc = sbi_irqchip_add_device(&imsic_device);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
/* Register IPI device */
|
||||
sbi_ipi_add_device(&imsic_ipi_device);
|
||||
|
||||
Reference in New Issue
Block a user