[U-Boot] [PATCH] riscv: cpu: Skip unavailable hart in the get_count() op

Bin Meng bmeng.cn at gmail.com
Thu Aug 8 13:25:31 UTC 2019


Hi Lukas,

On Thu, Aug 8, 2019 at 7:22 PM Auer, Lukas
<lukas.auer at aisec.fraunhofer.de> wrote:
>
> Hi Bin,
>
> On Thu, 2019-08-08 at 00:52 -0700, Bin Meng wrote:
> > We should not count in hart that is marked as not available in the
> > device tree in riscv_cpu_get_count().
> >
>
> I think it might make sense to also exclude harts that are not listed
> as available in the available_harts mask. So the same logic as in
> arch/riscv/lib/smp.c. In this case, the bind function should probably
> check the mask as well.
>

Yes, the check to available_harts mask can be added in
riscv_cpu_get_count(). I will do that.

However, I doubt we could do available_harts mask check in the bind
function. If it returns error for non-available harts, the whole
initialization process fails.

> Looks good otherwise!
>
> Reviewed-by: Lukas Auer <lukas.auer at aisec.fraunhofer.de>
>

Regards,
Bin


More information about the U-Boot mailing list