Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351094
b: refs/heads/master
c: 1d82256
h: refs/heads/master
v: v3
  • Loading branch information
Len Brown committed Feb 18, 2013
1 parent fed3a0b commit 3bee5bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 50 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3e7fc708eb41f6385cf5cf64a68417a4be822be8
refs/heads/master: 1d8225661e2407241dbf16143180ff673668d6d7
51 changes: 2 additions & 49 deletions trunk/arch/m32r/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,35 +44,9 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
return tsk->thread.lr;
}

/*
* Powermanagement idle function, if any..
*/
static void (*pm_idle)(void) = NULL;

void (*pm_power_off)(void) = NULL;
EXPORT_SYMBOL(pm_power_off);

/*
* We use this is we don't have any better
* idle routine..
*/
static void default_idle(void)
{
/* M32R_FIXME: Please use "cpu_sleep" mode. */
cpu_relax();
}

/*
* On SMP it's slightly faster (but much more power-consuming!)
* to poll the ->work.need_resched flag instead of waiting for the
* cross-CPU IPI to arrive. Use this option with caution.
*/
static void poll_idle (void)
{
/* M32R_FIXME */
cpu_relax();
}

/*
* The idle thread. There's no useful work to be
* done, so just try to conserve power and have a
Expand All @@ -84,14 +58,8 @@ void cpu_idle (void)
/* endless idle loop with no priority at all */
while (1) {
rcu_idle_enter();
while (!need_resched()) {
void (*idle)(void) = pm_idle;

if (!idle)
idle = default_idle;

idle();
}
while (!need_resched())
cpu_relax();
rcu_idle_exit();
schedule_preempt_disabled();
}
Expand Down Expand Up @@ -120,21 +88,6 @@ void machine_power_off(void)
/* M32R_FIXME */
}

static int __init idle_setup (char *str)
{
if (!strncmp(str, "poll", 4)) {
printk("using poll in idle threads.\n");
pm_idle = poll_idle;
} else if (!strncmp(str, "sleep", 4)) {
printk("using sleep in idle threads.\n");
pm_idle = default_idle;
}

return 1;
}

__setup("idle=", idle_setup);

void show_regs(struct pt_regs * regs)
{
printk("\n");
Expand Down

0 comments on commit 3bee5bc

Please sign in to comment.