Re: [PATCH 3/3] include: sbi: Lift the maximum harts to 1024

Anup Patel <[email protected]> Mon, 6 Jul 2026 19:41:38 +0530
Newsgroups org.infradead.lists.opensbi
Message-ID <CAAhSdy0Om4n0g9BrqdZjukziSQwJoQR+8J3Su621v=h=6ZPrDw@mail.gmail.com>
On Mon, Jul 6, 2026 at 3:12 PM Heinrich Schuchardt
<[email protected]> wrote:
>
> On 10/9/25 15:29, Anup Patel wrote:
> > On Thu, Oct 9, 2025 at 5:55 PM Wu Fei <[email protected]> wrote:
> >>
> >>
> >> On 9/30/25 19:36, Anup Patel wrote:
> >>> On Wed, Aug 6, 2025 at 6:39 AM <[email protected]> wrote:
> >>>> It is expected to have riscv server boards with many cores very soon.
> >>>>
> >>>> Signed-off-by: Wu Fei <[email protected]>
> >>>> ---
> >>>>    include/sbi/sbi_hartmask.h | 2 +-
> >>>>    1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/include/sbi/sbi_hartmask.h b/include/sbi/sbi_hartmask.h
> >>>> index 200ab6e..2f94f39 100644
> >>>> --- a/include/sbi/sbi_hartmask.h
> >>>> +++ b/include/sbi/sbi_hartmask.h
> >>>> @@ -20,7 +20,7 @@
> >>>>     * also represents the maximum number of HART ids generic OpenSBI
> >>>>     * can handle.
> >>>>     */
> >>>> -#define SBI_HARTMASK_MAX_BITS          128
> >>>> +#define SBI_HARTMASK_MAX_BITS          1024
> >>> Instead of making this 8x, it is better to move to a more realistic
> >>> number like 256 or 512. NO ?
> >>
> >>
> >> Do you think we need to make this configurable? It sounds good to make
> >> it larger if it's configurable,
> >>
> >> 512 is not enough sooner or later on servers.
> >
> > I would rather wait for a real platform with > 128 CPUs to show-up. Since
> > it is a one-line change and we can do it any day.
> >
> > Regards,
> > Anup
>
> The Linux kernel has raised the default to 256 CPUs with a maximum
> configuration value of 512. See
> 0fa749771993 ("riscv: Raise default NR_CPUS for 64BIT to 256")
>
> Shouldn't OpenSBI match it and have a configuration variable that
> defaults to 256?

I agree, we should match Linux default and set SBI_HARTMASK_MAX_BITS to 256.

Regards,
Anup

-- 
opensbi mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/opensbi