mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-11-19 18:21:41 +00:00
lib: sbi_domain: Make domain regions as fixed array
Instead of separately allocating domain regions, let us have a fixed size array so that regions are automatically allocated along with domain allocation and one SBI_DOMAIN_MEMREGION_MAX macro defines maximum number of regions for all domains. Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com> Reviewed-by: Pawandeep Oza <pawandeep.oza@oss.qualcomm.com> Tested-by: Pawandeep Oza <pawandeep.oza@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260923032359.4041876-8-anup.patel@oss.qualcomm.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
1 parent
89b3afb16f
commit
145bd4ccc0
4 files changed
+20
-48
No files matched your search
@@ -120,7 +120,7 @@ static const struct sbi_hsm_device eyeq7h_hsm = {
|
||||
.hart_stop = mips_p8700_hart_stop,
|
||||
};
|
||||
|
||||
static struct sbi_domain_memregion *find_last_memregion(const struct sbi_domain *dom)
|
||||
static struct sbi_domain_memregion *find_last_memregion(struct sbi_domain *dom)
|
||||
{
|
||||
struct sbi_domain_memregion *reg;
|
||||
|
||||
@@ -128,7 +128,7 @@ static struct sbi_domain_memregion *find_last_memregion(const struct sbi_domain
|
||||
return --reg;
|
||||
}
|
||||
|
||||
static int fixup_dram_region(const struct sbi_domain *dom,
|
||||
static int fixup_dram_region(struct sbi_domain *dom,
|
||||
struct sbi_domain_memregion *reg)
|
||||
{
|
||||
const void *fdt = fdt_get_address();
|
||||
@@ -297,7 +297,7 @@ static void eyeq7h_init_clusters(void)
|
||||
|
||||
static int eyeq7h_early_init(bool cold_boot)
|
||||
{
|
||||
const struct sbi_domain *dom;
|
||||
struct sbi_domain *dom;
|
||||
struct sbi_domain_memregion *reg;
|
||||
int rc;
|
||||
unsigned long cm_base;
|
||||
|
||||
Reference in new issue
Block a user