]> Pileus Git - ~andy/linux/commitdiff
arch: Cleanup enable/disable_hlt
authorThomas Gleixner <tglx@linutronix.de>
Thu, 21 Mar 2013 21:49:31 +0000 (22:49 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 8 Apr 2013 15:39:22 +0000 (17:39 +0200)
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>
arch/arm/kernel/process.c
arch/cris/arch-v32/kernel/process.c
arch/cris/include/asm/processor.h
arch/cris/kernel/process.c
arch/microblaze/include/asm/processor.h
arch/microblaze/kernel/process.c
arch/mn10300/kernel/smp.c

index 047d3e40e47062d4946d7f7c11e8330132340654..92884c86189d0b0758f209aac389278b02b33c5f 100644 (file)
@@ -64,16 +64,12 @@ void disable_hlt(void)
        hlt_counter++;
 }
 
-EXPORT_SYMBOL(disable_hlt);
-
 void enable_hlt(void)
 {
        hlt_counter--;
        BUG_ON(hlt_counter < 0);
 }
 
-EXPORT_SYMBOL(enable_hlt);
-
 static int __init nohlt_setup(char *__unused)
 {
        hlt_counter = 1;
index 2b23ef0e44523f1781ad397533593aae2f9335c7..4857933d59f4eb27bda5b5b75c03b4fbb1bc0aba 100644 (file)
 
 extern void stop_watchdog(void);
 
-extern int cris_hlt_counter;
-
 /* We use this if we don't have any better idle routine. */
 void default_idle(void)
 {
        local_irq_disable();
-       if (!need_resched() && !cris_hlt_counter) {
-               /* Halt until exception. */
+       if (!need_resched()) {
+               /* Halt until exception. */
                __asm__ volatile("ei    \n\t"
-                                 "halt      ");
+                                "halt      ");
        }
        local_irq_enable();
 }
index 675823f70c0f0222f51f69fc2c9aaea92ce0e9eb..c0a29b96b92b032fdcdddb47702e3383724781e8 100644 (file)
@@ -65,13 +65,6 @@ static inline void release_thread(struct task_struct *dead_task)
 
 #define cpu_relax()     barrier()
 
-/*
- * disable hlt during certain critical i/o operations
- */
-#define HAVE_DISABLE_HLT
-void disable_hlt(void);
-void enable_hlt(void);
-
 void default_idle(void);
 
 #endif /* __ASM_CRIS_PROCESSOR_H */
index 104ff4dd9b98dd1aa0c00177ae1e83d2f8138a54..508c9cdacc7bf239ec14543b131de0d1c6735b3a 100644 (file)
 
 //#define DEBUG
 
-/*
- * The hlt_counter, disable_hlt and enable_hlt is just here as a hook if
- * there would ever be a halt sequence (for power save when idle) with
- * some largish delay when halting or resuming *and* a driver that can't
- * afford that delay.  The hlt_counter would then be checked before
- * executing the halt sequence, and the driver marks the unhaltable
- * region by enable_hlt/disable_hlt.
- */
-
-int cris_hlt_counter=0;
-
-void disable_hlt(void)
-{
-       cris_hlt_counter++;
-}
-
-EXPORT_SYMBOL(disable_hlt);
-
-void enable_hlt(void)
-{
-       cris_hlt_counter--;
-}
-
-EXPORT_SYMBOL(enable_hlt);
 extern void default_idle(void);
 
 void (*pm_power_off)(void);
index 0759153e81179b7a68909b9154d52afa1c2732c7..f576fe018e5aae80b0481b4c86946724ce3896ed 100644 (file)
@@ -160,8 +160,6 @@ unsigned long get_wchan(struct task_struct *p);
 #  define STACK_TOP    TASK_SIZE
 #  define STACK_TOP_MAX        STACK_TOP
 
-void disable_hlt(void);
-void enable_hlt(void);
 void default_idle(void);
 
 #ifdef CONFIG_DEBUG_FS
index fa0ea609137c0c56ab0fddf434be9e375d06297a..7c36171771f23060541dd555beb4206f62b4a32c 100644 (file)
@@ -46,18 +46,6 @@ EXPORT_SYMBOL(pm_power_off);
 
 static int hlt_counter = 1;
 
-void disable_hlt(void)
-{
-       hlt_counter++;
-}
-EXPORT_SYMBOL(disable_hlt);
-
-void enable_hlt(void)
-{
-       hlt_counter--;
-}
-EXPORT_SYMBOL(enable_hlt);
-
 static int __init nohlt_setup(char *__unused)
 {
        hlt_counter = 1;
index 5d7e152a23b7d2b03921aca402d4538b55672144..eaef5ad8e0ec061b090055c9da0963dfe67b274e 100644 (file)
@@ -935,8 +935,6 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
        int timeout;
 
 #ifdef CONFIG_HOTPLUG_CPU
-       if (num_online_cpus() == 1)
-               disable_hlt();
        if (sleep_mode[cpu])
                run_wakeup_cpu(cpu);
 #endif /* CONFIG_HOTPLUG_CPU */
@@ -1003,9 +1001,6 @@ int __cpu_disable(void)
 void __cpu_die(unsigned int cpu)
 {
        run_sleep_cpu(cpu);
-
-       if (num_online_cpus() == 1)
-               enable_hlt();
 }
 
 #ifdef CONFIG_MN10300_CACHE_ENABLED