mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
lib: sbi_domain: Make sbi_domain_root_add_memregion() as local function
The sbi_domain_root_add_memregion() is only used within sbi_domain implementation so rename and make it a local function. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
This commit is contained in:
@@ -292,16 +292,6 @@ void sbi_domain_dump_all(const char *suffix);
|
|||||||
int sbi_domain_register(struct sbi_domain *dom,
|
int sbi_domain_register(struct sbi_domain *dom,
|
||||||
const struct sbi_hartmask *assign_mask);
|
const struct sbi_hartmask *assign_mask);
|
||||||
|
|
||||||
/**
|
|
||||||
* Add a memory region to the root domain
|
|
||||||
* @param reg pointer to the memory region to be added
|
|
||||||
*
|
|
||||||
* @return 0 on success
|
|
||||||
* @return SBI_EALREADY if memory region conflicts with the existing one
|
|
||||||
* @return SBI_EINVAL otherwise
|
|
||||||
*/
|
|
||||||
int sbi_domain_root_add_memregion(const struct sbi_domain_memregion *reg);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a memory range with its flags to the root domain
|
* Add a memory range with its flags to the root domain
|
||||||
* @param addr start physical address of memory range
|
* @param addr start physical address of memory range
|
||||||
|
@@ -589,7 +589,7 @@ int sbi_domain_register(struct sbi_domain *dom,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sbi_domain_root_add_memregion(const struct sbi_domain_memregion *reg)
|
static int root_add_memregion(const struct sbi_domain_memregion *reg)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
bool reg_merged;
|
bool reg_merged;
|
||||||
@@ -667,7 +667,7 @@ int sbi_domain_root_add_memrange(unsigned long addr, unsigned long size,
|
|||||||
(end - pos) : align;
|
(end - pos) : align;
|
||||||
|
|
||||||
sbi_domain_memregion_init(pos, rsize, region_flags, ®);
|
sbi_domain_memregion_init(pos, rsize, region_flags, ®);
|
||||||
rc = sbi_domain_root_add_memregion(®);
|
rc = root_add_memregion(®);
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
pos += rsize;
|
pos += rsize;
|
||||||
|
Reference in New Issue
Block a user