[PATCH] lib: sbi: Fix Priv spec version for [m|s]counter CSR
Leyfoon Tan
leyfoon.tan at starfivetech.com
Wed Jul 5 23:10:57 PDT 2023
> -----Original Message-----
> From: Anup Patel <anup at brainfault.org>
> Sent: Thursday, July 6, 2023 2:08 PM
> To: Leyfoon Tan <leyfoon.tan at starfivetech.com>
> Cc: opensbi at lists.infradead.org; Ley Foon Tan <lftan.linux at gmail.com>
> Subject: Re: [PATCH] lib: sbi: Fix Priv spec version for [m|s]counter CSR
>
> On Thu, Jul 6, 2023 at 8:35 AM Ley Foon Tan <leyfoon.tan at starfivetech.com>
> wrote:
> >
> > Fix Priv spec version typo in commit d4b563c881d6 ("lib: sbi: Remove
> > MCOUNTEREN and SCOUNTEREN hart features"). It should be v1.10.
> >
> > Fixes: d4b563c881d6 ("lib: sbi: Remove MCOUNTEREN and SCOUNTEREN
> hart
> > features")
> > Signed-off-by: Ley Foon Tan <leyfoon.tan at starfivetech.com>
> > ---
> > lib/sbi/sbi_hart.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c index
> > 6e52cbd..62e7a4b 100644
> > --- a/lib/sbi/sbi_hart.c
> > +++ b/lib/sbi/sbi_hart.c
> > @@ -664,7 +664,7 @@ __mhpm_skip:
> > hfeatures->priv_version = SBI_HART_PRIV_VER_1_12;
> >
> > /* Counter overflow/filtering is not useful without mcounter/inhibit */
> > - if (hfeatures->priv_version >= SBI_HART_PRIV_VER_1_12) {
> > + if (hfeatures->priv_version >= SBI_HART_PRIV_VER_1_10) {
>
> There is no mcountinhibit CSR in Priv v1.10 so this does not align with the
> comment.
>
> The Priv version has to be at least v1.11 and nothing less.
Okay, will send v2 patch with v1.11.
Regards
Ley Foon
More information about the opensbi
mailing list