Skip to content

Commit 013fdeb

Browse files
committed
x86/mm: Remove unused current_untag_mask()
e0bddc1 ("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) <[email protected]> Acked-by: Kirill A. Shutemov <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7e98086 commit 013fdeb

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

arch/x86/include/asm/tlbflush.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include <asm/processor-flags.h>
1515
#include <asm/pgtable.h>
1616

17+
DECLARE_PER_CPU(u64, tlbstate_untag_mask);
18+
1719
void __flush_tlb_all(void);
1820

1921
#define TLB_FLUSH_ALL -1UL
@@ -54,15 +56,6 @@ static inline void cr4_clear_bits(unsigned long mask)
5456
local_irq_restore(flags);
5557
}
5658

57-
#ifdef CONFIG_ADDRESS_MASKING
58-
DECLARE_PER_CPU(u64, tlbstate_untag_mask);
59-
60-
static inline u64 current_untag_mask(void)
61-
{
62-
return this_cpu_read(tlbstate_untag_mask);
63-
}
64-
#endif
65-
6659
#ifndef MODULE
6760
/*
6861
* 6 because 6 should be plenty and struct tlb_state will fit in two cache

0 commit comments

Comments
 (0)