diff options
| author | Alistair Francis <[email protected]> | 2020-06-16 17:07:33 -0700 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2020-06-18 08:58:13 +0530 |
| commit | 637b348224d557cd27c187d4465a90852ddde8a9 (patch) | |
| tree | 076a84b28b2887d704a5f6129cdb735b6a1bf02d /lib | |
| parent | d5725c24c6ea04368d90bc0f5af3ec20862b4a3b (diff) | |
lib: Fix the SBI_HART_HAS_MCOUNTEREN feature check
Signed-off-by: Alistair Francis <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sbi/sbi_hart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c index e943346b..1d1c6d67 100644 --- a/lib/sbi/sbi_hart.c +++ b/lib/sbi/sbi_hart.c @@ -49,7 +49,7 @@ static void mstatus_init(struct sbi_scratch *scratch, u32 hartid) if (misa_extension('S') && sbi_hart_has_feature(scratch, SBI_HART_HAS_SCOUNTEREN)) csr_write(CSR_SCOUNTEREN, -1); - if (!sbi_hart_has_feature(scratch, SBI_HART_HAS_MCOUNTEREN)) + if (sbi_hart_has_feature(scratch, SBI_HART_HAS_MCOUNTEREN)) csr_write(CSR_MCOUNTEREN, -1); /* Disable all interrupts */ |
