All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Gray <bgray@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: ajd@linux.ibm.com, jniethe5@gmail.com,
	Benjamin Gray <bgray@linux.ibm.com>,
	npiggin@gmail.com, cmr@bluescreens.de
Subject: [PATCH v10 6/9] powerpc/mm: Remove flush_all_mm, local_flush_all_mm
Date: Wed,  9 Nov 2022 15:51:09 +1100	[thread overview]
Message-ID: <20221109045112.187069-7-bgray@linux.ibm.com> (raw)
In-Reply-To: <20221109045112.187069-1-bgray@linux.ibm.com>

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/20170903181513.29635-1-fbarrat@linux.vnet.ibm.com/

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
---
v10:	* New in v10 to remove the hash__ set of functions
---
 .../include/asm/book3s/64/tlbflush-hash.h     | 22 -------------------
 arch/powerpc/include/asm/book3s/64/tlbflush.h | 15 -------------
 2 files changed, 37 deletions(-)

diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h b/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h
index 38d31c2489d3..cdbb1a04bb52 100644
--- a/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h
+++ b/arch/powerpc/include/asm/book3s/64/tlbflush-hash.h
@@ -59,28 +59,6 @@ void flush_hash_range(unsigned long number, int local);
 void flush_hash_hugepage(unsigned long vsid, unsigned long addr, pmd_t *pmdp,
 			 unsigned int psize, int ssize, unsigned long flags);
 
-static inline void hash__local_flush_all_mm(struct mm_struct *mm)
-{
-	/*
-	 * There's no Page Walk Cache for hash, so what is needed is
-	 * the same as flush_tlb_mm(), which doesn't really make sense
-	 * with hash. So the only thing we could do is flush the
-	 * entire LPID! Punt for now, as it's not being used.
-	 */
-	WARN_ON_ONCE(1);
-}
-
-static inline void hash__flush_all_mm(struct mm_struct *mm)
-{
-	/*
-	 * There's no Page Walk Cache for hash, so what is needed is
-	 * the same as flush_tlb_mm(), which doesn't really make sense
-	 * with hash. So the only thing we could do is flush the
-	 * entire LPID! Punt for now, as it's not being used.
-	 */
-	WARN_ON_ONCE(1);
-}
-
 struct mmu_gather;
 void hash__tlb_flush(struct mmu_gather *tlb);
 
diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush.h b/arch/powerpc/include/asm/book3s/64/tlbflush.h
index 2254a40f0564..c56a0aee8124 100644
--- a/arch/powerpc/include/asm/book3s/64/tlbflush.h
+++ b/arch/powerpc/include/asm/book3s/64/tlbflush.h
@@ -86,13 +86,6 @@ static inline void local_flush_tlb_page(struct vm_area_struct *vma,
 		radix__local_flush_tlb_page(vma, vmaddr);
 }
 
-static inline void local_flush_all_mm(struct mm_struct *mm)
-{
-	if (radix_enabled())
-		return radix__local_flush_all_mm(mm);
-	return hash__local_flush_all_mm(mm);
-}
-
 static inline void tlb_flush(struct mmu_gather *tlb)
 {
 	if (radix_enabled())
@@ -112,17 +105,9 @@ static inline void flush_tlb_page(struct vm_area_struct *vma,
 	if (radix_enabled())
 		radix__flush_tlb_page(vma, vmaddr);
 }
-
-static inline void flush_all_mm(struct mm_struct *mm)
-{
-	if (radix_enabled())
-		return radix__flush_all_mm(mm);
-	return hash__flush_all_mm(mm);
-}
 #else
 #define flush_tlb_mm(mm)		local_flush_tlb_mm(mm)
 #define flush_tlb_page(vma, addr)	local_flush_tlb_page(vma, addr)
-#define flush_all_mm(mm)		local_flush_all_mm(mm)
 #endif /* CONFIG_SMP */
 
 #define flush_tlb_fix_spurious_fault flush_tlb_fix_spurious_fault
-- 
2.38.1


  parent reply	other threads:[~2022-11-09  4:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09  4:51 [PATCH v10 0/9] powerpc/code-patching: Use temporary mm for Radix MMU Benjamin Gray
2022-11-09  4:51 ` [PATCH v10 1/9] powerpc: Allow clearing and restoring registers independent of saved breakpoint state Benjamin Gray
2022-11-09  4:51 ` [PATCH v10 2/9] powerpc/code-patching: Use WARN_ON and fix check in poking_init Benjamin Gray
2022-11-09  6:12   ` Christophe Leroy
2022-11-09  4:51 ` [PATCH v10 3/9] powerpc/mm: Remove extern from function prototypes Benjamin Gray
2022-11-09  6:16   ` Christophe Leroy
2022-11-25  3:12   ` Andrew Donnellan
2022-11-09  4:51 ` [PATCH v10 4/9] powerpc/mm: Remove empty hash__ functions Benjamin Gray
2022-11-09  6:16   ` Christophe Leroy
2022-11-09  4:51 ` [PATCH v10 5/9] cxl: Use radix__flush_all_mm instead of generic flush_all_mm Benjamin Gray
2022-11-09  6:16   ` Christophe Leroy
2022-11-25  2:42   ` Andrew Donnellan
2022-11-09  4:51 ` Benjamin Gray [this message]
2022-11-09  6:17   ` [PATCH v10 6/9] powerpc/mm: Remove flush_all_mm, local_flush_all_mm Christophe Leroy
2022-11-09  4:51 ` [PATCH v10 7/9] powerpc/tlb: Add local flush for page given mm_struct and psize Benjamin Gray
2022-11-09  6:18   ` Christophe Leroy
2022-11-09  4:51 ` [PATCH v10 8/9] powerpc/code-patching: Use temporary mm for Radix MMU Benjamin Gray
2022-12-15 20:17   ` Nathan Chancellor
2022-12-15 20:17     ` Nathan Chancellor
2022-12-16  0:23     ` Michael Ellerman
2022-11-09  4:51 ` [PATCH v10 9/9] powerpc/code-patching: Consolidate and cache per-cpu patching context Benjamin Gray
2022-11-09  6:23   ` Christophe Leroy
2022-12-08 12:39 ` [PATCH v10 0/9] powerpc/code-patching: Use temporary mm for Radix MMU Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221109045112.187069-7-bgray@linux.ibm.com \
    --to=bgray@linux.ibm.com \
    --cc=ajd@linux.ibm.com \
    --cc=cmr@bluescreens.de \
    --cc=jniethe5@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.