aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnup Patel <apatel@ventanamicro.com>2024-12-24 13:29:17 +0530
committerAnup Patel <anup@brainfault.org>2024-12-24 14:06:09 +0530
commit7150db29d7186808cc0df66b54dde1cb0ffe3535 (patch)
tree350cb759a6e138799035ef0e94ab4520092fb4ee /include
parent551ac0f2d431a7aac260aa1b4612dfceedb2318c (diff)
downloadopensbi-7150db29d7186808cc0df66b54dde1cb0ffe3535.tar.gz
opensbi-7150db29d7186808cc0df66b54dde1cb0ffe3535.tar.bz2
opensbi-7150db29d7186808cc0df66b54dde1cb0ffe3535.zip
lib: utils: Fix irqchip registration for PLIC and APLIC
Currently, the same irqchip instance is registered for multiple PLIC and APLIC instances which causes the sbi_list_for_each_entry() loop in the sbi_irqchip_init() to hang at boot-time. To address the above issue, register a separate irqchip instance for each PLIC and APLIC instance. Fixes: 2dd6eaf68055 ("lib: sbi_irqchip: Call driver warm_init from SBI core") Reported-by: Himanshu Chauhan <hchauhan@ventanamicro.com> Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
Diffstat (limited to 'include')
-rw-r--r--include/sbi_utils/irqchip/aplic.h4
-rw-r--r--include/sbi_utils/irqchip/plic.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/include/sbi_utils/irqchip/aplic.h b/include/sbi_utils/irqchip/aplic.h
index 82682e8a..e31f48a4 100644
--- a/include/sbi_utils/irqchip/aplic.h
+++ b/include/sbi_utils/irqchip/aplic.h
@@ -12,6 +12,7 @@
#define __IRQCHIP_APLIC_H__
#include <sbi/sbi_types.h>
+#include <sbi/sbi_irqchip.h>
#define APLIC_MAX_DELEGATE 16
@@ -30,6 +31,9 @@ struct aplic_delegate_data {
};
struct aplic_data {
+ /* Private members */
+ struct sbi_irqchip_device irqchip;
+ /* Public members */
unsigned long addr;
unsigned long size;
unsigned long num_idc;
diff --git a/include/sbi_utils/irqchip/plic.h b/include/sbi_utils/irqchip/plic.h
index a173871e..18aa7469 100644
--- a/include/sbi_utils/irqchip/plic.h
+++ b/include/sbi_utils/irqchip/plic.h
@@ -11,8 +11,12 @@
#define __IRQCHIP_PLIC_H__
#include <sbi/sbi_types.h>
+#include <sbi/sbi_irqchip.h>
struct plic_data {
+ /* Private members */
+ struct sbi_irqchip_device irqchip;
+ /* Public members */
unsigned long addr;
unsigned long size;
unsigned long num_src;