[PATCH v3 3/3] platform: generic: check if CPU node is enabled

Anup Patel anup at brainfault.org
Thu May 12 21:16:16 PDT 2022


On Thu, May 12, 2022 at 11:26 PM Jan Remes <jan.remes at codasip.com> wrote:
>
> Ignore CPU nodes in FDT which are not enabled.
>
> Signed-off-by: Jan Remes <jan.remes at codasip.com>

This was already reviewed in your v2 series.

Looks good to me.

Reviewed-by: Anup Patel <anup at brainfault.org>

Regards,
Anup

> ---
>  platform/generic/platform.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/platform/generic/platform.c b/platform/generic/platform.c
> index 8a4fb70..86db960 100644
> --- a/platform/generic/platform.c
> +++ b/platform/generic/platform.c
> @@ -107,6 +107,9 @@ unsigned long fw_platform_init(unsigned long arg0, unsigned long arg1,
>                 if (SBI_HARTMASK_MAX_BITS <= hartid)
>                         continue;
>
> +               if (!fdt_node_is_enabled(fdt, cpu_offset))
> +                       continue;
> +
>                 generic_hart_index2id[hart_count++] = hartid;
>         }
>
> --
> 2.36.1
>
>
> --
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi



More information about the opensbi mailing list