[PATCH] lib: sbi: Fix sbi_domain_root_add_memregion() for merging memregions
Xiang W
wxjstz at 126.com
Fri Apr 23 06:20:21 BST 2021
在 2021-04-22四的 17:18 +0530,Anup Patel写道:
> We should decrement root_memregs_count by one after merging two
> memregions otherwise new memregion added after a merge will be
> appended after last sentinel memregion of zero order.
>
> Signed-off-by: Anup Patel <anup.patel at wdc.com>
Look good to me.
Reviewed-by: Xiang W <wxjstz at 126.com>
Regards,
Xiang W
> ---
> lib/sbi/sbi_domain.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/sbi/sbi_domain.c b/lib/sbi/sbi_domain.c
> index 69a3795..1b2e6e3 100644
> --- a/lib/sbi/sbi_domain.c
> +++ b/lib/sbi/sbi_domain.c
> @@ -521,6 +521,7 @@ int sbi_domain_root_add_memregion(const struct
> sbi_domain_memregion *reg)
> nreg1++;
> }
> reg_merged = true;
> + root_memregs_count--;
> }
> }
> } while (reg_merged);
> --
> 2.25.1
>
>
More information about the opensbi
mailing list