mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-06-12 22:31:45 +01:00
platform: generic: Optimize extensions_init() to parse ISA extensions once
Instead of parsing ISA extensions separately for each hart in the generic_extensions_init() function, it is better to parse ISA extensions for all available harts in the cold boot path. Also, this allows us to remove fdt_isa_bitmap from scratch space and directly initialize "extensions" in struct sbi_hart_features for each hart. Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260521082625.1520870-3-anup.patel@oss.qualcomm.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
#ifndef _RISCV_ANDES_PMU_H
|
||||
#define _RISCV_ANDES_PMU_H
|
||||
|
||||
#include <sbi/sbi_hart.h>
|
||||
#include <sbi/sbi_types.h>
|
||||
|
||||
int andes_pmu_init(void);
|
||||
int andes_pmu_extensions_init(struct sbi_hart_features *hfeatures);
|
||||
int andes_pmu_extensions_init(bool cold_boot);
|
||||
|
||||
#endif /* _RISCV_ANDES_PMU_H */
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#ifndef __PLATFORM_OVERRIDE_H__
|
||||
#define __PLATFORM_OVERRIDE_H__
|
||||
|
||||
#include <sbi/sbi_hart.h>
|
||||
#include <sbi/sbi_platform.h>
|
||||
#include <sbi/sbi_types.h>
|
||||
#include <sbi_utils/fdt/fdt_driver.h>
|
||||
@@ -19,7 +18,7 @@ bool generic_cold_boot_allowed(u32 hartid);
|
||||
int generic_nascent_init(void);
|
||||
int generic_early_init(bool cold_boot);
|
||||
int generic_final_init(bool cold_boot);
|
||||
int generic_extensions_init(struct sbi_hart_features *hfeatures);
|
||||
int generic_extensions_init(bool cold_boot);
|
||||
int generic_domains_init(void);
|
||||
int generic_pmu_init(void);
|
||||
uint64_t generic_pmu_xlate_to_mhpmevent(uint32_t event_idx, uint64_t data);
|
||||
|
||||
Reference in New Issue
Block a user