diff mbox series

[-next] MIPS: MT: Remove unused function mips_mt_regdump()

Message ID 20240814103933.2053611-1-cuigaosheng1@huawei.com (mailing list archive)
State Accepted
Commit 3fd19664c3bd50dc479ff444e43787439074458a
Headers show
Series [-next] MIPS: MT: Remove unused function mips_mt_regdump() | expand

Commit Message

cuigaosheng Aug. 14, 2024, 10:39 a.m. UTC
The mips_mt_regdump() has not been used since
commit b633648c5ad3 ("MIPS: MT: Remove SMTC support"), so remove it.

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 arch/mips/include/asm/mips_mt.h |  2 -
 arch/mips/kernel/mips-mt.c      | 77 ---------------------------------
 2 files changed, 79 deletions(-)

Comments

Ricardo B. Marliere Aug. 20, 2024, 4:16 p.m. UTC | #1
On 14 Aug 24 18:39, Gaosheng Cui wrote:
> The mips_mt_regdump() has not been used since
> commit b633648c5ad3 ("MIPS: MT: Remove SMTC support"), so remove it.
> 
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
> ---
>  arch/mips/include/asm/mips_mt.h |  2 -
>  arch/mips/kernel/mips-mt.c      | 77 ---------------------------------
>  2 files changed, 79 deletions(-)
> 
> diff --git a/arch/mips/include/asm/mips_mt.h b/arch/mips/include/asm/mips_mt.h
> index 28917f1582b3..6ea02af29876 100644
> --- a/arch/mips/include/asm/mips_mt.h
> +++ b/arch/mips/include/asm/mips_mt.h
> @@ -17,8 +17,6 @@ extern int vpelimit;
>  extern cpumask_t mt_fpu_cpumask;
>  extern unsigned long mt_fpemul_threshold;
>  
> -extern void mips_mt_regdump(unsigned long previous_mvpcontrol_value);

Reviewed-by: Ricardo B. Marliere <ricardo@marliere.net>

> -
>  #ifdef CONFIG_MIPS_MT
>  extern void mips_mt_set_cpuoptions(void);
>  #else
> diff --git a/arch/mips/kernel/mips-mt.c b/arch/mips/kernel/mips-mt.c
> index c938ba208fc0..37676a44fefb 100644
> --- a/arch/mips/kernel/mips-mt.c
> +++ b/arch/mips/kernel/mips-mt.c
> @@ -43,83 +43,6 @@ static int __init maxtcs(char *str)
>  
>  __setup("maxtcs=", maxtcs);
>  
> -/*
> - * Dump new MIPS MT state for the core. Does not leave TCs halted.
> - * Takes an argument which taken to be a pre-call MVPControl value.
> - */
> -
> -void mips_mt_regdump(unsigned long mvpctl)
> -{
> -	unsigned long flags;
> -	unsigned long vpflags;
> -	unsigned long mvpconf0;
> -	int nvpe;
> -	int ntc;
> -	int i;
> -	int tc;
> -	unsigned long haltval;
> -	unsigned long tcstatval;
> -
> -	local_irq_save(flags);
> -	vpflags = dvpe();
> -	printk("=== MIPS MT State Dump ===\n");
> -	printk("-- Global State --\n");
> -	printk("   MVPControl Passed: %08lx\n", mvpctl);
> -	printk("   MVPControl Read: %08lx\n", vpflags);
> -	printk("   MVPConf0 : %08lx\n", (mvpconf0 = read_c0_mvpconf0()));
> -	nvpe = ((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) + 1;
> -	ntc = ((mvpconf0 & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1;
> -	printk("-- per-VPE State --\n");
> -	for (i = 0; i < nvpe; i++) {
> -		for (tc = 0; tc < ntc; tc++) {
> -			settc(tc);
> -			if ((read_tc_c0_tcbind() & TCBIND_CURVPE) == i) {
> -				printk("  VPE %d\n", i);
> -				printk("   VPEControl : %08lx\n",
> -				       read_vpe_c0_vpecontrol());
> -				printk("   VPEConf0 : %08lx\n",
> -				       read_vpe_c0_vpeconf0());
> -				printk("   VPE%d.Status : %08lx\n",
> -				       i, read_vpe_c0_status());
> -				printk("   VPE%d.EPC : %08lx %pS\n",
> -				       i, read_vpe_c0_epc(),
> -				       (void *) read_vpe_c0_epc());
> -				printk("   VPE%d.Cause : %08lx\n",
> -				       i, read_vpe_c0_cause());
> -				printk("   VPE%d.Config7 : %08lx\n",
> -				       i, read_vpe_c0_config7());
> -				break; /* Next VPE */
> -			}
> -		}
> -	}
> -	printk("-- per-TC State --\n");
> -	for (tc = 0; tc < ntc; tc++) {
> -		settc(tc);
> -		if (read_tc_c0_tcbind() == read_c0_tcbind()) {
> -			/* Are we dumping ourself?  */
> -			haltval = 0; /* Then we're not halted, and mustn't be */
> -			tcstatval = flags; /* And pre-dump TCStatus is flags */
> -			printk("  TC %d (current TC with VPE EPC above)\n", tc);
> -		} else {
> -			haltval = read_tc_c0_tchalt();
> -			write_tc_c0_tchalt(1);
> -			tcstatval = read_tc_c0_tcstatus();
> -			printk("  TC %d\n", tc);
> -		}
> -		printk("   TCStatus : %08lx\n", tcstatval);
> -		printk("   TCBind : %08lx\n", read_tc_c0_tcbind());
> -		printk("   TCRestart : %08lx %pS\n",
> -		       read_tc_c0_tcrestart(), (void *) read_tc_c0_tcrestart());
> -		printk("   TCHalt : %08lx\n", haltval);
> -		printk("   TCContext : %08lx\n", read_tc_c0_tccontext());
> -		if (!haltval)
> -			write_tc_c0_tchalt(0);
> -	}
> -	printk("===========================\n");
> -	evpe(vpflags);
> -	local_irq_restore(flags);
> -}
> -
>  static int mt_opt_rpsctl = -1;
>  static int mt_opt_nblsu = -1;
>  static int mt_opt_forceconfig7;
> -- 
> 2.25.1
>
Thomas Bogendoerfer Aug. 29, 2024, 8:47 a.m. UTC | #2
On Wed, Aug 14, 2024 at 06:39:33PM +0800, Gaosheng Cui wrote:
> The mips_mt_regdump() has not been used since
> commit b633648c5ad3 ("MIPS: MT: Remove SMTC support"), so remove it.
> 
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
> ---
>  arch/mips/include/asm/mips_mt.h |  2 -
>  arch/mips/kernel/mips-mt.c      | 77 ---------------------------------
>  2 files changed, 79 deletions(-)

applied to mips-next.

Thomas.
diff mbox series

Patch

diff --git a/arch/mips/include/asm/mips_mt.h b/arch/mips/include/asm/mips_mt.h
index 28917f1582b3..6ea02af29876 100644
--- a/arch/mips/include/asm/mips_mt.h
+++ b/arch/mips/include/asm/mips_mt.h
@@ -17,8 +17,6 @@  extern int vpelimit;
 extern cpumask_t mt_fpu_cpumask;
 extern unsigned long mt_fpemul_threshold;
 
-extern void mips_mt_regdump(unsigned long previous_mvpcontrol_value);
-
 #ifdef CONFIG_MIPS_MT
 extern void mips_mt_set_cpuoptions(void);
 #else
diff --git a/arch/mips/kernel/mips-mt.c b/arch/mips/kernel/mips-mt.c
index c938ba208fc0..37676a44fefb 100644
--- a/arch/mips/kernel/mips-mt.c
+++ b/arch/mips/kernel/mips-mt.c
@@ -43,83 +43,6 @@  static int __init maxtcs(char *str)
 
 __setup("maxtcs=", maxtcs);
 
-/*
- * Dump new MIPS MT state for the core. Does not leave TCs halted.
- * Takes an argument which taken to be a pre-call MVPControl value.
- */
-
-void mips_mt_regdump(unsigned long mvpctl)
-{
-	unsigned long flags;
-	unsigned long vpflags;
-	unsigned long mvpconf0;
-	int nvpe;
-	int ntc;
-	int i;
-	int tc;
-	unsigned long haltval;
-	unsigned long tcstatval;
-
-	local_irq_save(flags);
-	vpflags = dvpe();
-	printk("=== MIPS MT State Dump ===\n");
-	printk("-- Global State --\n");
-	printk("   MVPControl Passed: %08lx\n", mvpctl);
-	printk("   MVPControl Read: %08lx\n", vpflags);
-	printk("   MVPConf0 : %08lx\n", (mvpconf0 = read_c0_mvpconf0()));
-	nvpe = ((mvpconf0 & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) + 1;
-	ntc = ((mvpconf0 & MVPCONF0_PTC) >> MVPCONF0_PTC_SHIFT) + 1;
-	printk("-- per-VPE State --\n");
-	for (i = 0; i < nvpe; i++) {
-		for (tc = 0; tc < ntc; tc++) {
-			settc(tc);
-			if ((read_tc_c0_tcbind() & TCBIND_CURVPE) == i) {
-				printk("  VPE %d\n", i);
-				printk("   VPEControl : %08lx\n",
-				       read_vpe_c0_vpecontrol());
-				printk("   VPEConf0 : %08lx\n",
-				       read_vpe_c0_vpeconf0());
-				printk("   VPE%d.Status : %08lx\n",
-				       i, read_vpe_c0_status());
-				printk("   VPE%d.EPC : %08lx %pS\n",
-				       i, read_vpe_c0_epc(),
-				       (void *) read_vpe_c0_epc());
-				printk("   VPE%d.Cause : %08lx\n",
-				       i, read_vpe_c0_cause());
-				printk("   VPE%d.Config7 : %08lx\n",
-				       i, read_vpe_c0_config7());
-				break; /* Next VPE */
-			}
-		}
-	}
-	printk("-- per-TC State --\n");
-	for (tc = 0; tc < ntc; tc++) {
-		settc(tc);
-		if (read_tc_c0_tcbind() == read_c0_tcbind()) {
-			/* Are we dumping ourself?  */
-			haltval = 0; /* Then we're not halted, and mustn't be */
-			tcstatval = flags; /* And pre-dump TCStatus is flags */
-			printk("  TC %d (current TC with VPE EPC above)\n", tc);
-		} else {
-			haltval = read_tc_c0_tchalt();
-			write_tc_c0_tchalt(1);
-			tcstatval = read_tc_c0_tcstatus();
-			printk("  TC %d\n", tc);
-		}
-		printk("   TCStatus : %08lx\n", tcstatval);
-		printk("   TCBind : %08lx\n", read_tc_c0_tcbind());
-		printk("   TCRestart : %08lx %pS\n",
-		       read_tc_c0_tcrestart(), (void *) read_tc_c0_tcrestart());
-		printk("   TCHalt : %08lx\n", haltval);
-		printk("   TCContext : %08lx\n", read_tc_c0_tccontext());
-		if (!haltval)
-			write_tc_c0_tchalt(0);
-	}
-	printk("===========================\n");
-	evpe(vpflags);
-	local_irq_restore(flags);
-}
-
 static int mt_opt_rpsctl = -1;
 static int mt_opt_nblsu = -1;
 static int mt_opt_forceconfig7;