x86/mm: Remove unused current_untag_mask()
Borislav Petkov
maintainerPATCH 1/1 x86/mm: Remove unused current_untag_mask()
From: "Borislav Petkov (AMD)" <[email protected]>
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.
--- arch/x86/include/asm/tlbflush.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
arch/x86/include/asm/tlbflush.h +2 -9
@@ -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
Signature · 1 line
2.35.1
Quoted 10 lines · Borislav Petkov
From: "Borislav Petkov (AMD)" <[email protected]>
e0bddc19ba95("x86/mm: Reduceuntagged_addr()overhead for systems without LAM")removed its only usage site so drop it.
Move the
tlbstate_untag_maskup in the header and drop the ugly ifdeffery as the unused declaration should be properly discarded.Signed-off-by Borislav Petkov (AMD) <[email protected]>
Signature · 1 line
Kiryl Shutsemau / Kirill A. Shutemov
The following commit has been merged into the x86/cleanups branch of tip:
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) <[email protected]> AuthorDate: Wed, 14 Jun 2023 19:41:48 +02:00 Committer: Borislav Petkov (AMD) <[email protected]> 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.
--- arch/x86/include/asm/tlbflush.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
arch/x86/include/asm/tlbflush.h +2 -9
@@ -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