lkml.org 
[lkml]   [2023]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] riscv: Move call to init_cpu_topology() to later initialization stage
Hi Ley,

On Thu, Jan 5, 2023 at 4:45 AM Ley Foon Tan
<leyfoon.tan@starfivetech.com> wrote:
> If "capacity-dmips-mhz" is present in a CPU DT node,
> topology_parse_cpu_capacity() will fail to allocate memory.
> ARM64, with which this code path is shared, does not call
> topology_parse_cpu_capacity() until later in boot where memory allocation
> is available.
>
> Move init_cpu_topology(), which calls topology_parse_cpu_capacity(), to a
> later initialization stage, to match ARM64.
>
> Tested on Qemu platform.
>
> Fixes: 03f11f03dbfe ("RISC-V: Parse cpu topology during boot.")
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
> Signed-off-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
>
> ---
> Changes:
> v2:
> - Update commit description with suggestion from Conor.
> - Added Reviewed-by.
> - Added Fixes.

This also fixes the error message

Early cacheinfo failed, ret = -12

seen during early boot on all my RV64 platforms.

Fixes: 5944ce092b97caed ("arch_topology: Build cacheinfo from primary CPU")
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@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

\
 
 \ /
  Last update: 2023-03-26 23:55    [W:0.058 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site