[PATCH v2 6/9] include: sbi: Remove cyclic include in sbi_domain_context.h
Anup Patel
apatel at ventanamicro.com
Thu Oct 10 02:00:55 PDT 2024
The sbi_domain_context.h includes sbi_domain.h and the sbi_domain.h
also includes sbi_domain_context.h. Remove this cyclic include in
sbi_domain_context.h.
Signed-off-by: Anup Patel <apatel at ventanamicro.com>
Reviewed-by: Samuel Holland <samuel.holland at sifive.com>
---
include/sbi/sbi_domain_context.h | 3 ++-
lib/sbi/sbi_domain_context.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/sbi/sbi_domain_context.h b/include/sbi/sbi_domain_context.h
index a92f338b..1f5a4f56 100644
--- a/include/sbi/sbi_domain_context.h
+++ b/include/sbi/sbi_domain_context.h
@@ -9,7 +9,8 @@
#include <sbi/sbi_types.h>
#include <sbi/sbi_trap.h>
-#include <sbi/sbi_domain.h>
+
+struct sbi_domain;
/** Context representation for a hart within a domain */
struct sbi_context {
diff --git a/lib/sbi/sbi_domain_context.c b/lib/sbi/sbi_domain_context.c
index bafb6c3e..7cad4656 100644
--- a/lib/sbi/sbi_domain_context.c
+++ b/lib/sbi/sbi_domain_context.c
@@ -13,6 +13,7 @@
#include <sbi/sbi_heap.h>
#include <sbi/sbi_scratch.h>
#include <sbi/sbi_string.h>
+#include <sbi/sbi_domain.h>
#include <sbi/sbi_domain_context.h>
/**
--
2.43.0
More information about the opensbi
mailing list