diff options
Diffstat (limited to 'arch/sh/kernel/process_32.c')
-rw-r--r-- | arch/sh/kernel/process_32.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index e781540bd991..130817affa64 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c | |||
@@ -32,69 +32,8 @@ | |||
32 | #include <asm/fpu.h> | 32 | #include <asm/fpu.h> |
33 | #include <asm/syscalls.h> | 33 | #include <asm/syscalls.h> |
34 | 34 | ||
35 | static int hlt_counter; | ||
36 | int ubc_usercnt = 0; | 35 | int ubc_usercnt = 0; |
37 | 36 | ||
38 | void (*pm_idle)(void); | ||
39 | void (*pm_power_off)(void); | ||
40 | EXPORT_SYMBOL(pm_power_off); | ||
41 | |||
42 | static int __init nohlt_setup(char *__unused) | ||
43 | { | ||
44 | hlt_counter = 1; | ||
45 | return 1; | ||
46 | } | ||
47 | __setup("nohlt", nohlt_setup); | ||
48 | |||
49 | static int __init hlt_setup(char *__unused) | ||
50 | { | ||
51 | hlt_counter = 0; | ||
52 | return 1; | ||
53 | } | ||
54 | __setup("hlt", hlt_setup); | ||
55 | |||
56 | static void default_idle(void) | ||
57 | { | ||
58 | if (!hlt_counter) { | ||
59 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
60 | smp_mb__after_clear_bit(); | ||
61 | set_bl_bit(); | ||
62 | stop_critical_timings(); | ||
63 | |||
64 | while (!need_resched()) | ||
65 | cpu_sleep(); | ||
66 | |||
67 | start_critical_timings(); | ||
68 | clear_bl_bit(); | ||
69 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
70 | } else | ||
71 | while (!need_resched()) | ||
72 | cpu_relax(); | ||
73 | } | ||
74 | |||
75 | void cpu_idle(void) | ||
76 | { | ||
77 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
78 | |||
79 | /* endless idle loop with no priority at all */ | ||
80 | while (1) { | ||
81 | void (*idle)(void) = pm_idle; | ||
82 | |||
83 | if (!idle) | ||
84 | idle = default_idle; | ||
85 | |||
86 | tick_nohz_stop_sched_tick(1); | ||
87 | while (!need_resched()) | ||
88 | idle(); | ||
89 | tick_nohz_restart_sched_tick(); | ||
90 | |||
91 | preempt_enable_no_resched(); | ||
92 | schedule(); | ||
93 | preempt_disable(); | ||
94 | check_pgt_cache(); | ||
95 | } | ||
96 | } | ||
97 | |||
98 | void machine_restart(char * __unused) | 37 | void machine_restart(char * __unused) |
99 | { | 38 | { |
100 | /* SR.BL=1 and invoke address error to let CPU reset (manual reset) */ | 39 | /* SR.BL=1 and invoke address error to let CPU reset (manual reset) */ |