[PATCH v2] ARM: sh-mobile: Use of_cpu_node_to_id() to read CPU node 'reg'
Geert Uytterhoeven
geert at linux-m68k.org
Thu Mar 30 05:59:23 PDT 2023
Hi Rob,
On Mon, Mar 27, 2023 at 10:52 PM Rob Herring <robh at kernel.org> 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 at kernel.org>
> ---
> 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 at glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas at glider.be>
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 at linux-m68k.org
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
More information about the linux-arm-kernel
mailing list