Skip to content

Commit

Permalink
hexagon: Use generic idle loop
Browse files Browse the repository at this point in the history
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>
Acked-by: Richard Kuo <rkuo@codeaurora.org>
Link: http://lkml.kernel.org/r/20130321215234.338692935@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Apr 8, 2013
1 parent 0d24260 commit 4e0fcc5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 21 deletions.
1 change: 1 addition & 0 deletions arch/hexagon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ config HEXAGON
select NO_IOPORT
select GENERIC_IOMAP
select GENERIC_SMP_IDLE_THREAD
select GENERIC_IDLE_LOOP
select STACKTRACE_SUPPORT
select KTIME_SCALAR
select GENERIC_CLOCKEVENTS
Expand Down
23 changes: 3 additions & 20 deletions arch/hexagon/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,11 @@ void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp)
* If hardware or VM offer wait termination even though interrupts
* are disabled.
*/
static void default_idle(void)
void arch_cpu_idle(void)
{
__vmwait();
}

void (*idle_sleep)(void) = default_idle;

void cpu_idle(void)
{
while (1) {
tick_nohz_idle_enter();
local_irq_disable();
while (!need_resched()) {
idle_sleep();
/* interrupts wake us up, but aren't serviced */
local_irq_enable(); /* service interrupt */
local_irq_disable();
}
local_irq_enable();
tick_nohz_idle_exit();
schedule();
}
/* interrupts wake us up, but irqs are still disabled */
local_irq_enable();
}

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/hexagon/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void __cpuinit start_secondary(void)

local_irq_enable();

cpu_idle();
cpu_startup_entry(CPUHP_ONLINE);
}


Expand Down

0 comments on commit 4e0fcc5

Please sign in to comment.