diff options
| author | Samuel Holland <samuel.holland@sifive.com> | 2025-02-13 14:48:39 -0800 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2025-02-19 18:25:17 +0530 |
| commit | a2c172f526b52eb428d9077fab8cd8690c7e2f19 (patch) | |
| tree | 0b52a45b8d9f788a5814fd82d07ec565db440a5a /include | |
| parent | f95d1140f61d4afdd922379bff40edf8556c64e4 (diff) | |
| download | opensbi-a2c172f526b52eb428d9077fab8cd8690c7e2f19.zip opensbi-a2c172f526b52eb428d9077fab8cd8690c7e2f19.tar.gz opensbi-a2c172f526b52eb428d9077fab8cd8690c7e2f19.tar.bz2 | |
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>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi_utils/fdt/fdt_pmu.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/include/sbi_utils/fdt/fdt_pmu.h b/include/sbi_utils/fdt/fdt_pmu.h index b31d835..3879e11 100644 --- a/include/sbi_utils/fdt/fdt_pmu.h +++ b/include/sbi_utils/fdt/fdt_pmu.h @@ -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) { } |
