diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-02-26 15:46:34 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-02-26 18:06:06 -0500 |
commit | c68644d3304d217d50b8f0a179d4aa7e5a85a5bc (patch) | |
tree | 6ee377d8634acc46e37ca57f697fddc0eebadfb3 /arch/mips/kernel | |
parent | e016c38d1813c4ad180a4cd44942bca2a9e7a8c9 (diff) |
[MIPS] Make SMTC_IDLE_HOOK_DEBUG a proper option in Kconfig.debug.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/process.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/smtc.c | 19 |
2 files changed, 10 insertions, 13 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index a669089e4672..6bdfb5a9fa1a 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -51,11 +51,11 @@ ATTRIB_NORET void cpu_idle(void) | |||
51 | /* endless idle loop with no priority at all */ | 51 | /* endless idle loop with no priority at all */ |
52 | while (1) { | 52 | while (1) { |
53 | while (!need_resched()) { | 53 | while (!need_resched()) { |
54 | #ifdef CONFIG_MIPS_MT_SMTC | 54 | #ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG |
55 | extern void smtc_idle_loop_hook(void); | 55 | extern void smtc_idle_loop_hook(void); |
56 | 56 | ||
57 | smtc_idle_loop_hook(); | 57 | smtc_idle_loop_hook(); |
58 | #endif /* CONFIG_MIPS_MT_SMTC */ | 58 | #endif |
59 | if (cpu_wait) | 59 | if (cpu_wait) |
60 | (*cpu_wait)(); | 60 | (*cpu_wait)(); |
61 | } | 61 | } |
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 | ||
149 | static int hang_trig = 0; | 146 | static int hang_trig = 0; |
150 | 147 | ||
@@ -176,7 +173,7 @@ int tcnoprog[NR_CPUS]; | |||
176 | static atomic_t idle_hook_initialized = {0}; | 173 | static atomic_t idle_hook_initialized = {0}; |
177 | static int clock_hang_reported[NR_CPUS]; | 174 | static 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 | ||
1021 | void smtc_idle_loop_hook(void) | 1018 | void 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" |