lib: sbi_pmu: move pmu irq information into pmu itself
authorHeiko Stuebner <heiko@sntech.de>
Tue, 4 Oct 2022 16:42:23 +0000 (18:42 +0200)
committerAnup Patel <anup@brainfault.org>
Thu, 13 Oct 2022 04:22:01 +0000 (09:52 +0530)
commite54cb3298bfcaa2ac56fe51d0f39c901d5397166
tree2ca3a04a00a34c7cf39d073de068657117d70b20
parent3f3d401d2dfbed232d77012ba9289b62e98ad519
lib: sbi_pmu: move pmu irq information into pmu itself

Don't spread checking for pmu extensions through the code
but instead introduce a sbi-pmu function that other code can
call to get the correct information about the existence of the
pmu interrupt.

Add a sbi_pmu_device override function to allow overridung this
bit as well if needed.

Reviewed-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
include/sbi/sbi_pmu.h
lib/sbi/sbi_hart.c
lib/sbi/sbi_pmu.c