Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[MIPS] Make SMTC_IDLE_HOOK_DEBUG a proper option in Kconfig.debug.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+19 -13
+9
arch/mips/Kconfig.debug
··· 37 37 38 38 This option will slow down process creation somewhat. 39 39 40 + config CONFIG_SMTC_IDLE_HOOK_DEBUG 41 + bool "Enable additional debug checks before going into CPU idle loop" 42 + depends on DEBUG_KERNEL && MIPS_MT_SMTC 43 + help 44 + This option enables Enable additional debug checks before going into 45 + CPU idle loop. For details on these checks, see 46 + arch/mips/kernel/smtc.c. This debugging option result in significant 47 + overhead so should be disabled in production kernels. 48 + 40 49 config KGDB 41 50 bool "Remote GDB kernel debugging" 42 51 depends on DEBUG_KERNEL && SYS_SUPPORTS_KGDB
+2 -2
arch/mips/kernel/process.c
··· 51 51 /* endless idle loop with no priority at all */ 52 52 while (1) { 53 53 while (!need_resched()) { 54 - #ifdef CONFIG_MIPS_MT_SMTC 54 + #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG 55 55 extern void smtc_idle_loop_hook(void); 56 56 57 57 smtc_idle_loop_hook(); 58 - #endif /* CONFIG_MIPS_MT_SMTC */ 58 + #endif 59 59 if (cpu_wait) 60 60 (*cpu_wait)(); 61 61 }
+8 -11
arch/mips/kernel/smtc.c
··· 141 141 __setup("nostlb", stlb_disable); 142 142 __setup("asidmask=", asidmask_set); 143 143 144 - /* Enable additional debug checks before going into CPU idle loop */ 145 - #define SMTC_IDLE_HOOK_DEBUG 146 - 147 - #ifdef SMTC_IDLE_HOOK_DEBUG 144 + #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG 148 145 149 146 static int hang_trig = 0; 150 147 ··· 173 176 static atomic_t idle_hook_initialized = {0}; 174 177 static int clock_hang_reported[NR_CPUS]; 175 178 176 - #endif /* SMTC_IDLE_HOOK_DEBUG */ 179 + #endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */ 177 180 178 181 /* Initialize shared TLB - the should probably migrate to smtc_setup_cpus() */ 179 182 ··· 391 394 printk("ASID mask value override to 0x%x\n", asidmask); 392 395 393 396 /* Temporary */ 394 - #ifdef SMTC_IDLE_HOOK_DEBUG 397 + #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG 395 398 if (hang_trig) 396 399 printk("Logic Analyser Trigger on suspected TC hang\n"); 397 - #endif /* SMTC_IDLE_HOOK_DEBUG */ 400 + #endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */ 398 401 399 402 /* Put MVPE's into 'configuration state' */ 400 403 write_c0_mvpcontrol( read_c0_mvpcontrol() | MVPCONTROL_VPC ); ··· 814 817 case SMTC_CLOCK_TICK: 815 818 /* Invoke Clock "Interrupt" */ 816 819 ipi_timer_latch[dest_copy] = 0; 817 - #ifdef SMTC_IDLE_HOOK_DEBUG 820 + #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG 818 821 clock_hang_reported[dest_copy] = 0; 819 - #endif /* SMTC_IDLE_HOOK_DEBUG */ 822 + #endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */ 820 823 local_timer_interrupt(0, NULL); 821 824 break; 822 825 case LINUX_SMP_IPI: ··· 1017 1020 1018 1021 void smtc_idle_loop_hook(void) 1019 1022 { 1020 - #ifdef SMTC_IDLE_HOOK_DEBUG 1023 + #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG 1021 1024 int im; 1022 1025 int flags; 1023 1026 int mtflags; ··· 1110 1113 local_irq_restore(flags); 1111 1114 if (pdb_msg != &id_ho_db_msg[0]) 1112 1115 printk("CPU%d: %s", smp_processor_id(), id_ho_db_msg); 1113 - #endif /* SMTC_IDLE_HOOK_DEBUG */ 1116 + #endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */ 1114 1117 1115 1118 /* 1116 1119 * Replay any accumulated deferred IPIs. If "Instant Replay"