lkml.org 
[lkml]   [2022]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] MIPS: fix pmd_mkinvalid
Date
pmd_mkinvalid should not clear dirty flag,otherwise the pmd
dirty flag,it's ok to just clear _PAGE_VALID.

Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
---
arch/mips/include/asm/pgtable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
index 374c632..d30a186 100644
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -698,7 +698,7 @@ static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)

static inline pmd_t pmd_mkinvalid(pmd_t pmd)
{
- pmd_val(pmd) &= ~(_PAGE_PRESENT | _PAGE_VALID | _PAGE_DIRTY);
+ pmd_val(pmd) &= ~_PAGE_VALID;

return pmd;
}
--
1.8.3.1
\
 
 \ /
  Last update: 2022-05-31 06:36    [W:0.051 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site