From: Kexin Sun Date: Sat, 21 Mar 2026 10:59:35 +0000 (+0800) Subject: sparc32: remove deadwood swift_flush_tlb_page() debug code X-Git-Tag: v7.2-rc1~42^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2cdd477261a989278fea3e1127cea472b6eca52a;p=thirdparty%2Flinux.git sparc32: remove deadwood swift_flush_tlb_page() debug code 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 Reviewed-by: Andreas Larsson Signed-off-by: Andreas Larsson --- diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 1b24c5e8d73d9..9a74902ad1814 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -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