mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-07-07 13:39:00 +00:00
lib: sbi: simplify sanitize_domain()
Since commit112daa2e64
("lib: sbi: Maximize the use of HART index in sbi_domain") the platform parameter is unused. Fixes:112daa2e64
("lib: sbi: Maximize the use of HART index in sbi_domain") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
parent
cbdd869739
commit
5d0ed1bfb8
1 changed files with 3 additions and 6 deletions
|
@ -256,8 +256,7 @@ static const struct sbi_domain_memregion *find_next_subset_region(
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sanitize_domain(const struct sbi_platform *plat,
|
static int sanitize_domain(struct sbi_domain *dom)
|
||||||
struct sbi_domain *dom)
|
|
||||||
{
|
{
|
||||||
u32 i, j, count;
|
u32 i, j, count;
|
||||||
struct sbi_domain_memregion treg, *reg, *reg1;
|
struct sbi_domain_memregion treg, *reg, *reg1;
|
||||||
|
@ -494,7 +493,6 @@ int sbi_domain_register(struct sbi_domain *dom,
|
||||||
int rc;
|
int rc;
|
||||||
struct sbi_domain *tdom;
|
struct sbi_domain *tdom;
|
||||||
u32 cold_hartid = current_hartid();
|
u32 cold_hartid = current_hartid();
|
||||||
const struct sbi_platform *plat = sbi_platform_thishart_ptr();
|
|
||||||
|
|
||||||
/* Sanity checks */
|
/* Sanity checks */
|
||||||
if (!dom || !assign_mask || domain_finalized)
|
if (!dom || !assign_mask || domain_finalized)
|
||||||
|
@ -517,7 +515,7 @@ int sbi_domain_register(struct sbi_domain *dom,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sanitize discovered domain */
|
/* Sanitize discovered domain */
|
||||||
rc = sanitize_domain(plat, dom);
|
rc = sanitize_domain(dom);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
sbi_printf("%s: sanity checks failed for"
|
sbi_printf("%s: sanity checks failed for"
|
||||||
" %s (error %d)\n", __func__,
|
" %s (error %d)\n", __func__,
|
||||||
|
@ -564,7 +562,6 @@ int sbi_domain_root_add_memregion(const struct sbi_domain_memregion *reg)
|
||||||
int rc;
|
int rc;
|
||||||
bool reg_merged;
|
bool reg_merged;
|
||||||
struct sbi_domain_memregion *nreg, *nreg1, *nreg2;
|
struct sbi_domain_memregion *nreg, *nreg1, *nreg2;
|
||||||
const struct sbi_platform *plat = sbi_platform_thishart_ptr();
|
|
||||||
|
|
||||||
/* Sanity checks */
|
/* Sanity checks */
|
||||||
if (!reg || domain_finalized || !root.regions ||
|
if (!reg || domain_finalized || !root.regions ||
|
||||||
|
@ -590,7 +587,7 @@ int sbi_domain_root_add_memregion(const struct sbi_domain_memregion *reg)
|
||||||
/* Sort and optimize root regions */
|
/* Sort and optimize root regions */
|
||||||
do {
|
do {
|
||||||
/* Sanitize the root domain so that memregions are sorted */
|
/* Sanitize the root domain so that memregions are sorted */
|
||||||
rc = sanitize_domain(plat, &root);
|
rc = sanitize_domain(&root);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
sbi_printf("%s: sanity checks failed for"
|
sbi_printf("%s: sanity checks failed for"
|
||||||
" %s (error %d)\n", __func__,
|
" %s (error %d)\n", __func__,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue