aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2013-03-21 17:49:31 -0400
committerThomas Gleixner <tglx@linutronix.de>2013-04-08 11:39:22 -0400
commit6546327ad187238ac63d2429701b32becb096fd8 (patch)
tree59665d5b3314e7e6359833ce81f5150090092260 /arch/cris
parent31880c37c11e28cb81c70757e38392b42e695dc6 (diff)
arch: Cleanup enable/disable_hlt
enable/disable_hlt() does not need to be exported and can be killed on architectures which do not use it at all. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Paul McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Reviewed-by: Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Cc: Magnus Damm <magnus.damm@gmail.com> Link: http://lkml.kernel.org/r/20130321215233.377959540@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/cris')
-rw-r--r--arch/cris/arch-v32/kernel/process.c8
-rw-r--r--arch/cris/include/asm/processor.h7
-rw-r--r--arch/cris/kernel/process.c25
3 files changed, 3 insertions, 37 deletions
diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c
index 2b23ef0e4452..4857933d59f4 100644
--- a/arch/cris/arch-v32/kernel/process.c
+++ b/arch/cris/arch-v32/kernel/process.c
@@ -20,16 +20,14 @@
20 20
21extern void stop_watchdog(void); 21extern void stop_watchdog(void);
22 22
23extern int cris_hlt_counter;
24
25/* We use this if we don't have any better idle routine. */ 23/* We use this if we don't have any better idle routine. */
26void default_idle(void) 24void default_idle(void)
27{ 25{
28 local_irq_disable(); 26 local_irq_disable();
29 if (!need_resched() && !cris_hlt_counter) { 27 if (!need_resched()) {
30 /* Halt until exception. */ 28 /* Halt until exception. */
31 __asm__ volatile("ei \n\t" 29 __asm__ volatile("ei \n\t"
32 "halt "); 30 "halt ");
33 } 31 }
34 local_irq_enable(); 32 local_irq_enable();
35} 33}
diff --git a/arch/cris/include/asm/processor.h b/arch/cris/include/asm/processor.h
index 675823f70c0f..c0a29b96b92b 100644
--- a/arch/cris/include/asm/processor.h
+++ b/arch/cris/include/asm/processor.h
@@ -65,13 +65,6 @@ static inline void release_thread(struct task_struct *dead_task)
65 65
66#define cpu_relax() barrier() 66#define cpu_relax() barrier()
67 67
68/*
69 * disable hlt during certain critical i/o operations
70 */
71#define HAVE_DISABLE_HLT
72void disable_hlt(void);
73void enable_hlt(void);
74
75void default_idle(void); 68void default_idle(void);
76 69
77#endif /* __ASM_CRIS_PROCESSOR_H */ 70#endif /* __ASM_CRIS_PROCESSOR_H */
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
index 104ff4dd9b98..508c9cdacc7b 100644
--- a/arch/cris/kernel/process.c
+++ b/arch/cris/kernel/process.c
@@ -29,31 +29,6 @@
29 29
30//#define DEBUG 30//#define DEBUG
31 31
32/*
33 * The hlt_counter, disable_hlt and enable_hlt is just here as a hook if
34 * there would ever be a halt sequence (for power save when idle) with
35 * some largish delay when halting or resuming *and* a driver that can't
36 * afford that delay. The hlt_counter would then be checked before
37 * executing the halt sequence, and the driver marks the unhaltable
38 * region by enable_hlt/disable_hlt.
39 */
40
41int cris_hlt_counter=0;
42
43void disable_hlt(void)
44{
45 cris_hlt_counter++;
46}
47
48EXPORT_SYMBOL(disable_hlt);
49
50void enable_hlt(void)
51{
52 cris_hlt_counter--;
53}
54
55EXPORT_SYMBOL(enable_hlt);
56
57extern void default_idle(void); 32extern void default_idle(void);
58 33
59void (*pm_power_off)(void); 34void (*pm_power_off)(void);