镜像自地址
https://github.com/riscv-software-src/opensbi.git
已同步 2026-09-11 03:21:30 +01:00
lib: utils/fdt: Allocate fdt_pmu_evt_select on the heap
This reduces .bss size by 8 KiB, and should reduce overall memory usage since most platforms will have significantly fewer than 512 entries in this table. At the same time, it removes the fixed table size limit. Since the table is only used within fdt_pmu.c, instead of updating the extern declaration, make the table local to this file. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
这个提交包含在:
@@ -62,11 +62,6 @@ int fdt_pmu_setup(const void *fdt);
|
||||
*/
|
||||
uint64_t fdt_pmu_get_select_value(uint32_t event_idx);
|
||||
|
||||
/** The event index to selector value table instance */
|
||||
extern struct fdt_pmu_hw_event_select_map fdt_pmu_evt_select[];
|
||||
/** The number of valid entries in fdt_pmu_evt_select[] */
|
||||
extern uint32_t hw_event_count;
|
||||
|
||||
#else
|
||||
|
||||
static inline void fdt_pmu_fixup(void *fdt) { }
|
||||
|
||||
在新工单中引用
屏蔽一个用户