All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Holland <samuel.holland@sifive.com>
To: opensbi@lists.infradead.org
Subject: [PATCH 6/9] include: sbi: Remove cyclic include in sbi_domain_context.h
Date: Wed, 9 Oct 2024 18:15:07 -0500	[thread overview]
Message-ID: <045b3207-66f2-4c5d-a471-1229b7f5ea76@sifive.com> (raw)
In-Reply-To: <20240923115700.381916-7-apatel@ventanamicro.com>

Hi Anup,

On 2024-09-23 6:56 AM, Anup Patel wrote:
> 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@ventanamicro.com>
> ---
>  include/sbi/sbi_domain_context.h | 3 ++-
>  lib/sbi/sbi_domain_context.c     | 2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/include/sbi/sbi_domain_context.h b/include/sbi/sbi_domain_context.h
> index 0d25884a..3f43b622 100755
> --- 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 1432e3a8..29e2d280 100755
> --- a/lib/sbi/sbi_domain_context.c
> +++ b/lib/sbi/sbi_domain_context.c
> @@ -13,7 +13,7 @@
>  #include <sbi/sbi_heap.h>
>  #include <sbi/sbi_scratch.h>
>  #include <sbi/sbi_string.h>
> -#include <sbi/sbi_domain_context.h>

We should keep this include, so the functions defined in this file are checked
against their prototypes.

Regards,
Samuel

> +#include <sbi/sbi_domain.h>
>  
>  /**
>   * Switches the HART context from the current domain to the target domain.



  parent reply	other threads:[~2024-10-09 23:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-23 11:56 [PATCH 0/9] OpenSBI domain data support Anup Patel
2024-09-23 11:56 ` [PATCH 1/9] lib: utils/ipi: Use sbi_domain_root_add_memrange() for ACLINT mswi Anup Patel
2024-10-09 23:00   ` Samuel Holland
2024-10-10  5:19     ` Anup Patel
2024-09-23 11:56 ` [PATCH 2/9] lib: utils/irqchip: Use sbi_domain_root_add_memrange() for IMSIC Anup Patel
2024-10-09 23:04   ` Samuel Holland
2024-10-10  5:20     ` Anup Patel
2024-09-23 11:56 ` [PATCH 3/9] lib: utils/irqchip: Use sbi_domain_root_add_memrange() for APLIC Anup Patel
2024-10-09 23:05   ` Samuel Holland
2024-10-10  5:20     ` Anup Patel
2024-09-23 11:56 ` [PATCH 4/9] lib: sbi_domain: Make sbi_domain_root_add_memregion() as local function Anup Patel
2024-10-09 23:06   ` Samuel Holland
2024-10-10  5:20     ` Anup Patel
2024-09-23 11:56 ` [PATCH 5/9] lib: utils/fdt: Use sbi_domain_memregion_init() when parsing domains Anup Patel
2024-10-09 23:11   ` Samuel Holland
2024-09-23 11:56 ` [PATCH 6/9] include: sbi: Remove cyclic include in sbi_domain_context.h Anup Patel
2024-10-09 23:12   ` Samuel Holland
2024-10-09 23:15   ` Samuel Holland [this message]
2024-10-10  5:22     ` Anup Patel
2024-09-23 11:56 ` [PATCH 7/9] lib: sbi: Introduce domain data Anup Patel
2024-10-04 10:56   ` Yu-Chien Peter Lin
2024-10-10  5:26     ` Anup Patel
2024-09-23 11:56 ` [PATCH 8/9] lib: sbi_domain: Use domain data support for per-domain hart context Anup Patel
2024-10-04 10:51   ` Yu-Chien Peter Lin
2024-09-23 11:57 ` [PATCH 9/9] docs: Remove hartindex_to_context_table from domain_support.md Anup Patel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=045b3207-66f2-4c5d-a471-1229b7f5ea76@sifive.com \
    --to=samuel.holland@sifive.com \
    --cc=opensbi@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.