[PATCH 4/4] lib: sbi: Rename hart_pmu_get_allowed_bits() function

Xiang W wxjstz at 126.com
Wed Jul 5 07:47:10 PDT 2023


在 2023-07-05星期三的 17:28 +0530,Anup Patel写道:
> The hart_pmu_get_allowed_bits() function detects implemented bits
> of mhpm counters so let us rename this function accordingly.
> 
> Signed-off-by: Anup Patel <apatel at ventanamicro.com>
Look good to me.

Reviewed-by: Xiang W <wxjstz at 126.com>

> ---
>  lib/sbi/sbi_hart.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c
> index 380e615..25277a5 100644
> --- a/lib/sbi/sbi_hart.c
> +++ b/lib/sbi/sbi_hart.c
> @@ -527,7 +527,7 @@ static unsigned long hart_pmp_get_allowed_addr(void)
>         return val;
>  }
>  
> -static int hart_pmu_get_allowed_bits(void)
> +static int hart_mhpm_get_allowed_bits(void)
>  {
>         unsigned long val = ~(0UL);
>         struct sbi_trap_info trap = {0};
> @@ -628,7 +628,7 @@ __pmp_skip:
>  
>         /* Detect number of MHPM counters */
>         __check_csr(CSR_MHPMCOUNTER3, 0, 1UL, mhpm_count, __mhpm_skip);
> -       hfeatures->mhpm_bits = hart_pmu_get_allowed_bits();
> +       hfeatures->mhpm_bits = hart_mhpm_get_allowed_bits();
>  
>         __check_csr_4(CSR_MHPMCOUNTER4, 0, 1UL, mhpm_count, __mhpm_skip);
>         __check_csr_8(CSR_MHPMCOUNTER8, 0, 1UL, mhpm_count, __mhpm_skip);
> -- 
> 2.34.1
> 
> 




More information about the opensbi mailing list