Skip to content

Commit d34471c

Browse files
BenjaminGrayNp1mpe
authored andcommitted
powerpc/mm: Remove flush_all_mm, local_flush_all_mm
These functions were introduced for "cxl: Enable global TLBIs for cxl contexts" [1], which ended up using them for Radix only. They were never implemented on Hash (and creating an implementation appears to be difficult), so nothing can actually rely on them. They behave differently to the existing surrounding functions too, in that they actually need to do something on Hash. The other functions are primarily for use in generic code that expects their definitions, but Hash updates the TLB during PTE updates. After replacing the only usage with the Radix specific version, there are no more users of these functions, and given they are not implemented anyway it is safe to delete them. [1]: https://patchwork.ozlabs.org/project/linuxppc-dev/patch/[email protected]/ Signed-off-by: Benjamin Gray <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 0f0a0a6 commit d34471c

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

arch/powerpc/include/asm/book3s/64/tlbflush-hash.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -66,28 +66,6 @@ extern void flush_hash_hugepage(unsigned long vsid, unsigned long addr,
6666
pmd_t *pmdp, unsigned int psize, int ssize,
6767
unsigned long flags);
6868

69-
static inline void hash__local_flush_all_mm(struct mm_struct *mm)
70-
{
71-
/*
72-
* There's no Page Walk Cache for hash, so what is needed is
73-
* the same as flush_tlb_mm(), which doesn't really make sense
74-
* with hash. So the only thing we could do is flush the
75-
* entire LPID! Punt for now, as it's not being used.
76-
*/
77-
WARN_ON_ONCE(1);
78-
}
79-
80-
static inline void hash__flush_all_mm(struct mm_struct *mm)
81-
{
82-
/*
83-
* There's no Page Walk Cache for hash, so what is needed is
84-
* the same as flush_tlb_mm(), which doesn't really make sense
85-
* with hash. So the only thing we could do is flush the
86-
* entire LPID! Punt for now, as it's not being used.
87-
*/
88-
WARN_ON_ONCE(1);
89-
}
90-
9169
struct mmu_gather;
9270
extern void hash__tlb_flush(struct mmu_gather *tlb);
9371

arch/powerpc/include/asm/book3s/64/tlbflush.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,6 @@ static inline void local_flush_tlb_page(struct vm_area_struct *vma,
8686
radix__local_flush_tlb_page(vma, vmaddr);
8787
}
8888

89-
static inline void local_flush_all_mm(struct mm_struct *mm)
90-
{
91-
if (radix_enabled())
92-
return radix__local_flush_all_mm(mm);
93-
return hash__local_flush_all_mm(mm);
94-
}
95-
9689
static inline void tlb_flush(struct mmu_gather *tlb)
9790
{
9891
if (radix_enabled())
@@ -112,17 +105,9 @@ static inline void flush_tlb_page(struct vm_area_struct *vma,
112105
if (radix_enabled())
113106
radix__flush_tlb_page(vma, vmaddr);
114107
}
115-
116-
static inline void flush_all_mm(struct mm_struct *mm)
117-
{
118-
if (radix_enabled())
119-
return radix__flush_all_mm(mm);
120-
return hash__flush_all_mm(mm);
121-
}
122108
#else
123109
#define flush_tlb_mm(mm) local_flush_tlb_mm(mm)
124110
#define flush_tlb_page(vma, addr) local_flush_tlb_page(vma, addr)
125-
#define flush_all_mm(mm) local_flush_all_mm(mm)
126111
#endif /* CONFIG_SMP */
127112

128113
#define flush_tlb_fix_spurious_fault flush_tlb_fix_spurious_fault

0 commit comments

Comments
 (0)