Re: [PATCH v2] ARM: sh-mobile: Use of_cpu_node_to_id() to read CPU node 'reg'
From: Geert Uytterhoeven
Date: Thu Mar 30 2023 - 09:00:00 EST
Hi Rob,
On Mon, Mar 27, 2023 at 10:52 PM Rob Herring <robh@xxxxxxxxxx> wrote:
> Replace open coded CPU nodes reading of "reg" and translation to logical
> ID with of_cpu_node_to_id().
>
> The original code called of_parse_phandle() CONFIG_NR_CPUS times
> regardless of the length of 'cpus'. Optimize the loop to bail out once
> of_parse_phandle() fails as the end of 'cpus' property has been reached.
>
> Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
> ---
> v2:
> - Optimize the number of loop iterations
Thanks for the update!
I have tested this on:
- R-Car H2: 4xCA15 + 4xCA7, booted from either CA15 or CA7,
- R-Car M2-W: 2xCA15,
- R-Car E2: 2xCA7.
Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
Tested-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
i.e. will queue in renesas-devel for v6.4.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds