Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6546327a authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

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: default avatarThomas 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: default avatarCc: 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: default avatarThomas Gleixner <tglx@linutronix.de>
parent 31880c37
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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;
+3 −5
Original line number Diff line number Diff line
@@ -20,13 +20,11 @@

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) {
	if (!need_resched()) {
		/* Halt until exception. */
		__asm__ volatile("ei    \n\t"
				 "halt      ");
+0 −7
Original line number Diff line number Diff line
@@ -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 */
+0 −25
Original line number Diff line number Diff line
@@ -29,31 +29,6 @@

//#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);
+0 −2
Original line number Diff line number Diff line
@@ -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
Loading