lib: sbi: Remove redundant SBI_HART_HAS_PMP feature

The SBI_HART_HAS_PMP feature is redundant because we already
have number of PMP regions returned by sbi_hart_pmp_count().

Checking whether PMP is supported for a HART can be simply done
by checking non-zero value returned by sbi_hart_pmp_count().

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
Anup Patel
2020-08-18 11:51:16 +05:30
committed by Anup Patel
parent 4f3bad6e43
commit 7b0b289887
3 changed files with 5 additions and 20 deletions

View File

@@ -199,7 +199,7 @@ int fdt_reserved_memory_fixup(void *fdt)
* With above assumption, we create child nodes directly.
*/
if (!sbi_hart_has_feature(scratch, SBI_HART_HAS_PMP)) {
if (!sbi_hart_pmp_count(scratch)) {
/*
* Update the DT with firmware start & size even if PMP is not
* supported. This makes sure that supervisor OS is always