mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/mm: Remove unused current_untag_mask()
@ 2023-06-14 17:41 Borislav Petkov
  2023-06-14 18:42 ` Kirill A . Shutemov
  2023-06-16  9:02 ` [tip: x86/cleanups] " tip-bot2 for Borislav Petkov (AMD)
  0 siblings, 2 replies; 3+ messages in thread
From: Borislav Petkov @ 2023-06-14 17:41 UTC (permalink / raw)
  To: X86 ML; +Cc: Kirill A . Shutemov, LKML

From: "Borislav Petkov (AMD)" <bp@alien8.de>

e0bddc19ba95 ("x86/mm: Reduce untagged_addr() overhead for systems without LAM")

removed its only usage site so drop it.

Move the tlbstate_untag_mask up in the header and drop the ugly
ifdeffery as the unused declaration should be properly discarded.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
---
 arch/x86/include/asm/tlbflush.h | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index 75bfaa421030..80450e1d5385 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -14,6 +14,8 @@
 #include <asm/processor-flags.h>
 #include <asm/pgtable.h>
 
+DECLARE_PER_CPU(u64, tlbstate_untag_mask);
+
 void __flush_tlb_all(void);
 
 #define TLB_FLUSH_ALL	-1UL
@@ -54,15 +56,6 @@ static inline void cr4_clear_bits(unsigned long mask)
 	local_irq_restore(flags);
 }
 
-#ifdef CONFIG_ADDRESS_MASKING
-DECLARE_PER_CPU(u64, tlbstate_untag_mask);
-
-static inline u64 current_untag_mask(void)
-{
-	return this_cpu_read(tlbstate_untag_mask);
-}
-#endif
-
 #ifndef MODULE
 /*
  * 6 because 6 should be plenty and struct tlb_state will fit in two cache
-- 
2.35.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/mm: Remove unused current_untag_mask()
  2023-06-14 17:41 [PATCH] x86/mm: Remove unused current_untag_mask() Borislav Petkov
@ 2023-06-14 18:42 ` Kirill A . Shutemov
  2023-06-16  9:02 ` [tip: x86/cleanups] " tip-bot2 for Borislav Petkov (AMD)
  1 sibling, 0 replies; 3+ messages in thread
From: Kirill A . Shutemov @ 2023-06-14 18:42 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: X86 ML, LKML

On Wed, Jun 14, 2023 at 07:41:48PM +0200, Borislav Petkov wrote:
> From: "Borislav Petkov (AMD)" <bp@alien8.de>
> 
> e0bddc19ba95 ("x86/mm: Reduce untagged_addr() overhead for systems without LAM")
> 
> removed its only usage site so drop it.
> 
> Move the tlbstate_untag_mask up in the header and drop the ugly
> ifdeffery as the unused declaration should be properly discarded.
> 
> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>

Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip: x86/cleanups] x86/mm: Remove unused current_untag_mask()
  2023-06-14 17:41 [PATCH] x86/mm: Remove unused current_untag_mask() Borislav Petkov
  2023-06-14 18:42 ` Kirill A . Shutemov
@ 2023-06-16  9:02 ` tip-bot2 for Borislav Petkov (AMD)
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Borislav Petkov (AMD) @ 2023-06-16  9:02 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Borislav Petkov (AMD), Kirill A. Shutemov, x86, linux-kernel

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     013fdeb07a8fd32bbb3412e5f49d60207a78bf08
Gitweb:        https://git.kernel.org/tip/013fdeb07a8fd32bbb3412e5f49d60207a78bf08
Author:        Borislav Petkov (AMD) <bp@alien8.de>
AuthorDate:    Wed, 14 Jun 2023 19:41:48 +02:00
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Fri, 16 Jun 2023 10:50:16 +02:00

x86/mm: Remove unused current_untag_mask()

e0bddc19ba95 ("x86/mm: Reduce untagged_addr() overhead for systems without LAM")

removed its only usage site so drop it.

Move the tlbstate_untag_mask up in the header and drop the ugly
ifdeffery as the unused declaration should be properly discarded.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: https://lore.kernel.org/r/20230614174148.5439-1-bp@alien8.de
---
 arch/x86/include/asm/tlbflush.h | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index 75bfaa4..80450e1 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -14,6 +14,8 @@
 #include <asm/processor-flags.h>
 #include <asm/pgtable.h>
 
+DECLARE_PER_CPU(u64, tlbstate_untag_mask);
+
 void __flush_tlb_all(void);
 
 #define TLB_FLUSH_ALL	-1UL
@@ -54,15 +56,6 @@ static inline void cr4_clear_bits(unsigned long mask)
 	local_irq_restore(flags);
 }
 
-#ifdef CONFIG_ADDRESS_MASKING
-DECLARE_PER_CPU(u64, tlbstate_untag_mask);
-
-static inline u64 current_untag_mask(void)
-{
-	return this_cpu_read(tlbstate_untag_mask);
-}
-#endif
-
 #ifndef MODULE
 /*
  * 6 because 6 should be plenty and struct tlb_state will fit in two cache

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-16  9:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14 17:41 [PATCH] x86/mm: Remove unused current_untag_mask() Borislav Petkov
2023-06-14 18:42 ` Kirill A . Shutemov
2023-06-16  9:02 ` [tip: x86/cleanups] " tip-bot2 for Borislav Petkov (AMD)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome