diff options
author | Heiko Stuebner <heiko@sntech.de> | 2022-10-12 01:18:40 +0200 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2022-10-27 14:35:11 -0700 |
commit | 5e9c68ea777594a2d63fa44c0509782e90821707 (patch) | |
tree | 239f36c3da14385723ac222275350fa2ed7329a5 /drivers/perf/riscv_pmu_sbi.c | |
parent | 9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff) | |
download | lwn-5e9c68ea777594a2d63fa44c0509782e90821707.tar.gz lwn-5e9c68ea777594a2d63fa44c0509782e90821707.zip |
RISC-V: Cache SBI vendor values
sbi_get_mvendorid(), sbi_get_marchid() and sbi_get_mimpid() might get
called multiple times, though the values of these CSRs should not change
during the runtime of a specific machine.
Though the values can be different depending on which hart of the system
they get called. So hook into the newly introduced cpuinfo struct to allow
retrieving these cached values via new functions.
Also use arch_initcall for the cpuinfo setup instead, as that now clearly
is "architecture specific initialization" and also makes these information
available slightly earlier.
[caching vendor ids]
Suggested-by: Atish Patra <atishp@atishpatra.org>
[using cpuinfo struct as cache]
Suggested-by: Anup Patel <apatel@ventanamicro.com>
Link: https://lore.kernel.org/all/20221011231841.2951264-2-heiko@sntech.de/
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'drivers/perf/riscv_pmu_sbi.c')
0 files changed, 0 insertions, 0 deletions