lkml.org 
[lkml]   [2022]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3] x86/mm/tlb: update some comments in pte_flags_need_flush
Date
There just changed the comment about 'flush_on_clear' check, which make
the explanation more reasonable.

Suggested-by: Nadav Amit <namit@vmware.com>
Suggested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Xin Hao <xhao@linux.alibaba.com>
---

Changes from v2
(https://lore.kernel.org/lkml/20220929091040.45390-1-xhao@linux.alibaba.com/)
- fix some comments suggested-by Nadav Amit <namit@vmware.com> and
Randy Dunlap <rdunlap@infradead.org>

arch/x86/include/asm/tlbflush.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index cda3118f3b27..2a17698fb194 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -291,8 +291,8 @@ static inline bool pte_flags_need_flush(unsigned long oldflags,
diff &= ~_PAGE_ACCESSED;

/*
- * Did any of the 'flush_on_clear' flags was clleared set from between
- * 'oldflags' and 'newflags'?
+ * Consider the 'flush_on_clear' flags that are set on 'oldflags',
+ * Flush if any of these flags is cleared on 'newflags'.
*/
if (diff & oldflags & flush_on_clear)
return true;
--
2.31.0
\
 
 \ /
  Last update: 2022-09-30 04:25    [W:0.037 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site