[PATCH 0/3] Sparse HART id improvements

Anup Patel anup at brainfault.org
Thu Oct 5 21:35:30 PDT 2023


On Sun, Sep 24, 2023 at 9:28 PM Xiang W <wxjstz at 126.com> wrote:
>
> Modify last_hartindex_having_scratch/hartindex_to_hartid_table
> /hartindex_to_scratch_table as static variables to prevent accidental
> modification and reduce memory consumption
>
> Xiang W (3):
>   lib: sbi: Refactor sbi_scratch_last_hartindex as a function
>   lib: sbi: Refactor sbi_hartindex_to_hartid as a function
>   lib: sbi: Refactor sbi_hartindex_to_scratch as a function

All these are in hot-path at various places so introducing a
function is certainly not helping.

Also, if some buggy code is accidentally modifying global data
then that buggy code should be fixed rather than papering over
the problem by introducing these functions.

Regards,
Anup

>
>  include/sbi/sbi_scratch.h | 35 ++++++++++++-----------------------
>  lib/sbi/sbi_scratch.c     | 30 ++++++++++++++++++++++++++----
>  2 files changed, 38 insertions(+), 27 deletions(-)
>
> --
> 2.40.1
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi



More information about the opensbi mailing list