lib: sbi_pmu: Use heap for per-HART PMU state
authorAnup Patel <apatel@ventanamicro.com>
Wed, 19 Apr 2023 08:10:19 +0000 (13:40 +0530)
committerAnup Patel <anup@brainfault.org>
Mon, 5 Jun 2023 10:18:43 +0000 (15:48 +0530)
commitbbff53fe3b6cdd3c9bc084d489640d7ee2a3f831
treefa52f05c703b91ae42e0dfaa08706b2ea005e9d2
parent2a04f7037317c6c5b591b160a074c700de9b3378
lib: sbi_pmu: Use heap for per-HART PMU state

Instead of using a global array for per-HART PMU state, we should
use heap to on-demand allocate per-HART PMU state when the HART
is initialized in cold boot or warm boot path.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
lib/sbi/sbi_pmu.c