Skip to contentSkip to conversation

x86/mm/tlb: update some comments in pte_flags_need_flush

PATCH In review Xin Hao 2 participants 2 messages Sep 30, 2022 x86

lore
Share & tools
lore

Xin Hao

author
#0 lore raw

PATCH v3 1/1 x86/mm/tlb: update some comments in pte_flags_need_flush

There just changed the comment about 'flush_on_clear' check, which make the explanation more reasonable.

---

Changes from v2
(https://lore.kernel.org/lkml/[email protected]/)
- fix some comments suggested-by Nadav Amit <[email protected]> and Randy Dunlap <[email protected]>

 arch/x86/include/asm/tlbflush.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/include/asm/tlbflush.h +2 -2
index cda3118f3b27..2a17698fb194 100644
@@ -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

Acked-by on v3 1/1
#1 lore raw
Quoted 6 lines · Xin Hao

There just changed the comment about 'flush_on_clear' check, which make the explanation more reasonable.

Thanks.

Quoted 27 lines

---

Changes from v2
(https://lore.kernel.org/lkml/[email protected]/)
- fix some comments suggested-by Nadav Amit <[email protected]> and Randy Dunlap <[email protected]>

 arch/x86/include/asm/tlbflush.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/include/asm/tlbflush.h +2 -3
index cda3118f3b27..2a17698fb194 100644
@@ -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

Signature · 1 line
~Randy