···37373838 This option will slow down process creation somewhat.39394040+config CONFIG_SMTC_IDLE_HOOK_DEBUG4141+ bool "Enable additional debug checks before going into CPU idle loop"4242+ depends on DEBUG_KERNEL && MIPS_MT_SMTC4343+ help4444+ This option enables Enable additional debug checks before going into4545+ CPU idle loop. For details on these checks, see4646+ arch/mips/kernel/smtc.c. This debugging option result in significant4747+ overhead so should be disabled in production kernels.4848+4049config KGDB4150 bool "Remote GDB kernel debugging"4251 depends on DEBUG_KERNEL && SYS_SUPPORTS_KGDB
+2-2
arch/mips/kernel/process.c
···5151 /* endless idle loop with no priority at all */5252 while (1) {5353 while (!need_resched()) {5454-#ifdef CONFIG_MIPS_MT_SMTC5454+#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG5555 extern void smtc_idle_loop_hook(void);56565757 smtc_idle_loop_hook();5858-#endif /* CONFIG_MIPS_MT_SMTC */5858+#endif5959 if (cpu_wait)6060 (*cpu_wait)();6161 }
+8-11
arch/mips/kernel/smtc.c
···141141__setup("nostlb", stlb_disable);142142__setup("asidmask=", asidmask_set);143143144144-/* Enable additional debug checks before going into CPU idle loop */145145-#define SMTC_IDLE_HOOK_DEBUG146146-147147-#ifdef SMTC_IDLE_HOOK_DEBUG144144+#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG148145149146static int hang_trig = 0;150147···173176static atomic_t idle_hook_initialized = {0};174177static int clock_hang_reported[NR_CPUS];175178176176-#endif /* SMTC_IDLE_HOOK_DEBUG */179179+#endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */177180178181/* Initialize shared TLB - the should probably migrate to smtc_setup_cpus() */179182···391394 printk("ASID mask value override to 0x%x\n", asidmask);392395393396 /* Temporary */394394-#ifdef SMTC_IDLE_HOOK_DEBUG397397+#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG395398 if (hang_trig)396399 printk("Logic Analyser Trigger on suspected TC hang\n");397397-#endif /* SMTC_IDLE_HOOK_DEBUG */400400+#endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */398401399402 /* Put MVPE's into 'configuration state' */400403 write_c0_mvpcontrol( read_c0_mvpcontrol() | MVPCONTROL_VPC );···814817 case SMTC_CLOCK_TICK:815818 /* Invoke Clock "Interrupt" */816819 ipi_timer_latch[dest_copy] = 0;817817-#ifdef SMTC_IDLE_HOOK_DEBUG820820+#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG818821 clock_hang_reported[dest_copy] = 0;819819-#endif /* SMTC_IDLE_HOOK_DEBUG */822822+#endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */820823 local_timer_interrupt(0, NULL);821824 break;822825 case LINUX_SMP_IPI:···1017102010181021void smtc_idle_loop_hook(void)10191022{10201020-#ifdef SMTC_IDLE_HOOK_DEBUG10231023+#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG10211024 int im;10221025 int flags;10231026 int mtflags;···11101113 local_irq_restore(flags);11111114 if (pdb_msg != &id_ho_db_msg[0])11121115 printk("CPU%d: %s", smp_processor_id(), id_ho_db_msg);11131113-#endif /* SMTC_IDLE_HOOK_DEBUG */11161116+#endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */1114111711151118 /*11161119 * Replay any accumulated deferred IPIs. If "Instant Replay"