lib: sbi: Don't clear mseccfg.MML bit in sbi_hart_smepmp_configure()
authorAnup Patel <apatel@ventanamicro.com>
Thu, 7 Sep 2023 11:49:43 +0000 (17:19 +0530)
committerAnup Patel <anup@brainfault.org>
Sun, 24 Sep 2023 10:58:16 +0000 (16:28 +0530)
The mseccfg.MML bit is a sticky bit which remains unchanged once set
so no need to clear it in sbi_hart_smepmp_configure().

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
lib/sbi/sbi_hart.c

index 48784c856a43902ea57d25ec0755bc35567851cb..6320ea6e4fe1d470eaa53d650c2b1dfbcb810011 100644 (file)
@@ -360,12 +360,10 @@ static int sbi_hart_smepmp_configure(struct sbi_scratch *scratch,
        unsigned long pmp_addr;
 
        /*
-        * Set the RLB and clear MML so that, we can write to
-        * entries without enforcement even if some entries
-        * are locked.
+        * Set the RLB so that, we can write to PMP entries without
+        * enforcement even if some entries are locked.
         */
        csr_set(CSR_MSECCFG, MSECCFG_RLB);
-       csr_clear(CSR_MSECCFG, MSECCFG_MML);
 
        /* Disable the reserved entry */
        pmp_disable(SBI_SMEPMP_RESV_ENTRY);