]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
sparc32: remove deadwood swift_flush_tlb_page() debug code
authorKexin Sun <kexinsun@smail.nju.edu.cn>
Sat, 21 Mar 2026 10:59:35 +0000 (18:59 +0800)
committerAndreas Larsson <andreas@gaisler.com>
Fri, 12 Jun 2026 11:50:29 +0000 (13:50 +0200)
Remove an #if 0 block that has been dead since at least
Linux 2.6.12.  The block was marked "P3: deadwood to debug
precise flushes on Swift" and contained a never-compiled
alternative implementation of swift_flush_tlb_page().  It also
referenced the since-removed srmmu_flush_tlb_page(), dropped
in commit 3d5f7d37c8b4 ("sparc32: drop unused functions in
pgtsrmmu.h").

Assisted-by: unnamed:deepseek-v3.2 coccinelle
Signed-off-by: Kexin Sun <kexinsun@smail.nju.edu.cn>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
arch/sparc/mm/srmmu.c

index 1b24c5e8d73d970396612c3d8e7d6a4da6ddc081..9a74902ad1814779efa27acef0e092ecb65c281e 100644 (file)
@@ -581,35 +581,6 @@ extern void swift_flush_tlb_range(struct vm_area_struct *vma,
                                  unsigned long start, unsigned long end);
 extern void swift_flush_tlb_page(struct vm_area_struct *vma, unsigned long page);
 
-#if 0  /* P3: deadwood to debug precise flushes on Swift. */
-void swift_flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
-{
-       int cctx, ctx1;
-
-       page &= PAGE_MASK;
-       if ((ctx1 = vma->vm_mm->context) != -1) {
-               cctx = srmmu_get_context();
-/* Is context # ever different from current context? P3 */
-               if (cctx != ctx1) {
-                       printk("flush ctx %02x curr %02x\n", ctx1, cctx);
-                       srmmu_set_context(ctx1);
-                       swift_flush_page(page);
-                       __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
-                                       "r" (page), "i" (ASI_M_FLUSH_PROBE));
-                       srmmu_set_context(cctx);
-               } else {
-                        /* Rm. prot. bits from virt. c. */
-                       /* swift_flush_cache_all(); */
-                       /* swift_flush_cache_page(vma, page); */
-                       swift_flush_page(page);
-
-                       __asm__ __volatile__("sta %%g0, [%0] %1\n\t" : :
-                               "r" (page), "i" (ASI_M_FLUSH_PROBE));
-                       /* same as above: srmmu_flush_tlb_page() */
-               }
-       }
-}
-#endif
 
 /*
  * The following are all MBUS based SRMMU modules, and therefore could