aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/smtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/smtc.c')
-rw-r--r--arch/mips/kernel/smtc.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 9251ea824937..f253eda27fa3 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -141,10 +141,7 @@ __setup("ipibufs=", ipibufs);
141__setup("nostlb", stlb_disable); 141__setup("nostlb", stlb_disable);
142__setup("asidmask=", asidmask_set); 142__setup("asidmask=", asidmask_set);
143 143
144/* Enable additional debug checks before going into CPU idle loop */ 144#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
145#define SMTC_IDLE_HOOK_DEBUG
146
147#ifdef SMTC_IDLE_HOOK_DEBUG
148 145
149static int hang_trig = 0; 146static int hang_trig = 0;
150 147
@@ -176,7 +173,7 @@ int tcnoprog[NR_CPUS];
176static atomic_t idle_hook_initialized = {0}; 173static atomic_t idle_hook_initialized = {0};
177static int clock_hang_reported[NR_CPUS]; 174static int clock_hang_reported[NR_CPUS];
178 175
179#endif /* SMTC_IDLE_HOOK_DEBUG */ 176#endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */
180 177
181/* Initialize shared TLB - the should probably migrate to smtc_setup_cpus() */ 178/* Initialize shared TLB - the should probably migrate to smtc_setup_cpus() */
182 179
@@ -394,10 +391,10 @@ void mipsmt_prepare_cpus(void)
394 printk("ASID mask value override to 0x%x\n", asidmask); 391 printk("ASID mask value override to 0x%x\n", asidmask);
395 392
396 /* Temporary */ 393 /* Temporary */
397#ifdef SMTC_IDLE_HOOK_DEBUG 394#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
398 if (hang_trig) 395 if (hang_trig)
399 printk("Logic Analyser Trigger on suspected TC hang\n"); 396 printk("Logic Analyser Trigger on suspected TC hang\n");
400#endif /* SMTC_IDLE_HOOK_DEBUG */ 397#endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */
401 398
402 /* Put MVPE's into 'configuration state' */ 399 /* Put MVPE's into 'configuration state' */
403 write_c0_mvpcontrol( read_c0_mvpcontrol() | MVPCONTROL_VPC ); 400 write_c0_mvpcontrol( read_c0_mvpcontrol() | MVPCONTROL_VPC );
@@ -817,9 +814,9 @@ void ipi_decode(struct smtc_ipi *pipi)
817 case SMTC_CLOCK_TICK: 814 case SMTC_CLOCK_TICK:
818 /* Invoke Clock "Interrupt" */ 815 /* Invoke Clock "Interrupt" */
819 ipi_timer_latch[dest_copy] = 0; 816 ipi_timer_latch[dest_copy] = 0;
820#ifdef SMTC_IDLE_HOOK_DEBUG 817#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
821 clock_hang_reported[dest_copy] = 0; 818 clock_hang_reported[dest_copy] = 0;
822#endif /* SMTC_IDLE_HOOK_DEBUG */ 819#endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */
823 local_timer_interrupt(0, NULL); 820 local_timer_interrupt(0, NULL);
824 break; 821 break;
825 case LINUX_SMP_IPI: 822 case LINUX_SMP_IPI:
@@ -1020,7 +1017,7 @@ EXPORT_SYMBOL(smtc_ipi_replay);
1020 1017
1021void smtc_idle_loop_hook(void) 1018void smtc_idle_loop_hook(void)
1022{ 1019{
1023#ifdef SMTC_IDLE_HOOK_DEBUG 1020#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
1024 int im; 1021 int im;
1025 int flags; 1022 int flags;
1026 int mtflags; 1023 int mtflags;
@@ -1113,7 +1110,7 @@ void smtc_idle_loop_hook(void)
1113 local_irq_restore(flags); 1110 local_irq_restore(flags);
1114 if (pdb_msg != &id_ho_db_msg[0]) 1111 if (pdb_msg != &id_ho_db_msg[0])
1115 printk("CPU%d: %s", smp_processor_id(), id_ho_db_msg); 1112 printk("CPU%d: %s", smp_processor_id(), id_ho_db_msg);
1116#endif /* SMTC_IDLE_HOOK_DEBUG */ 1113#endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */
1117 1114
1118 /* 1115 /*
1119 * Replay any accumulated deferred IPIs. If "Instant Replay" 1116 * Replay any accumulated deferred IPIs. If "Instant Replay"