diff options
author | Len Brown <len.brown@intel.com> | 2013-02-09 22:42:39 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2013-02-17 23:37:06 -0500 |
commit | 1d8225661e2407241dbf16143180ff673668d6d7 (patch) | |
tree | 76d22affb6aff8e46ee13a46da5fbf064a0cde77 /arch/m32r | |
parent | 3e7fc708eb41f6385cf5cf64a68417a4be822be8 (diff) |
m32r idle: delete pm_idle, and other dead idle code
All paths on m32r lead to cpu_relax().
So delete the dead code and simply call cpu_relax() directly.
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: linux-m32r@ml.linux-m32r.org
Diffstat (limited to 'arch/m32r')
-rw-r--r-- | arch/m32r/kernel/process.c | 51 |
1 files changed, 2 insertions, 49 deletions
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c index 765d0f57c787..bde899e155d3 100644 --- a/arch/m32r/kernel/process.c +++ b/arch/m32r/kernel/process.c | |||
@@ -44,36 +44,10 @@ unsigned long thread_saved_pc(struct task_struct *tsk) | |||
44 | return tsk->thread.lr; | 44 | return tsk->thread.lr; |
45 | } | 45 | } |
46 | 46 | ||
47 | /* | ||
48 | * Powermanagement idle function, if any.. | ||
49 | */ | ||
50 | static void (*pm_idle)(void) = NULL; | ||
51 | |||
52 | void (*pm_power_off)(void) = NULL; | 47 | void (*pm_power_off)(void) = NULL; |
53 | EXPORT_SYMBOL(pm_power_off); | 48 | EXPORT_SYMBOL(pm_power_off); |
54 | 49 | ||
55 | /* | 50 | /* |
56 | * We use this is we don't have any better | ||
57 | * idle routine.. | ||
58 | */ | ||
59 | static void default_idle(void) | ||
60 | { | ||
61 | /* M32R_FIXME: Please use "cpu_sleep" mode. */ | ||
62 | cpu_relax(); | ||
63 | } | ||
64 | |||
65 | /* | ||
66 | * On SMP it's slightly faster (but much more power-consuming!) | ||
67 | * to poll the ->work.need_resched flag instead of waiting for the | ||
68 | * cross-CPU IPI to arrive. Use this option with caution. | ||
69 | */ | ||
70 | static void poll_idle (void) | ||
71 | { | ||
72 | /* M32R_FIXME */ | ||
73 | cpu_relax(); | ||
74 | } | ||
75 | |||
76 | /* | ||
77 | * The idle thread. There's no useful work to be | 51 | * The idle thread. There's no useful work to be |
78 | * done, so just try to conserve power and have a | 52 | * done, so just try to conserve power and have a |
79 | * low exit latency (ie sit in a loop waiting for | 53 | * low exit latency (ie sit in a loop waiting for |
@@ -84,14 +58,8 @@ void cpu_idle (void) | |||
84 | /* endless idle loop with no priority at all */ | 58 | /* endless idle loop with no priority at all */ |
85 | while (1) { | 59 | while (1) { |
86 | rcu_idle_enter(); | 60 | rcu_idle_enter(); |
87 | while (!need_resched()) { | 61 | while (!need_resched()) |
88 | void (*idle)(void) = pm_idle; | 62 | cpu_relax(); |
89 | |||
90 | if (!idle) | ||
91 | idle = default_idle; | ||
92 | |||
93 | idle(); | ||
94 | } | ||
95 | rcu_idle_exit(); | 63 | rcu_idle_exit(); |
96 | schedule_preempt_disabled(); | 64 | schedule_preempt_disabled(); |
97 | } | 65 | } |
@@ -120,21 +88,6 @@ void machine_power_off(void) | |||
120 | /* M32R_FIXME */ | 88 | /* M32R_FIXME */ |
121 | } | 89 | } |
122 | 90 | ||
123 | static int __init idle_setup (char *str) | ||
124 | { | ||
125 | if (!strncmp(str, "poll", 4)) { | ||
126 | printk("using poll in idle threads.\n"); | ||
127 | pm_idle = poll_idle; | ||
128 | } else if (!strncmp(str, "sleep", 4)) { | ||
129 | printk("using sleep in idle threads.\n"); | ||
130 | pm_idle = default_idle; | ||
131 | } | ||
132 | |||
133 | return 1; | ||
134 | } | ||
135 | |||
136 | __setup("idle=", idle_setup); | ||
137 | |||
138 | void show_regs(struct pt_regs * regs) | 91 | void show_regs(struct pt_regs * regs) |
139 | { | 92 | { |
140 | printk("\n"); | 93 | printk("\n"); |