diff options
Diffstat (limited to 'arch/microblaze/kernel/process.c')
-rw-r--r-- | arch/microblaze/kernel/process.c | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c index fa0ea609137c..7cce2e9c1719 100644 --- a/arch/microblaze/kernel/process.c +++ b/arch/microblaze/kernel/process.c | |||
@@ -44,71 +44,6 @@ void show_regs(struct pt_regs *regs) | |||
44 | void (*pm_power_off)(void) = NULL; | 44 | void (*pm_power_off)(void) = NULL; |
45 | EXPORT_SYMBOL(pm_power_off); | 45 | EXPORT_SYMBOL(pm_power_off); |
46 | 46 | ||
47 | static int hlt_counter = 1; | ||
48 | |||
49 | void disable_hlt(void) | ||
50 | { | ||
51 | hlt_counter++; | ||
52 | } | ||
53 | EXPORT_SYMBOL(disable_hlt); | ||
54 | |||
55 | void enable_hlt(void) | ||
56 | { | ||
57 | hlt_counter--; | ||
58 | } | ||
59 | EXPORT_SYMBOL(enable_hlt); | ||
60 | |||
61 | static int __init nohlt_setup(char *__unused) | ||
62 | { | ||
63 | hlt_counter = 1; | ||
64 | return 1; | ||
65 | } | ||
66 | __setup("nohlt", nohlt_setup); | ||
67 | |||
68 | static int __init hlt_setup(char *__unused) | ||
69 | { | ||
70 | hlt_counter = 0; | ||
71 | return 1; | ||
72 | } | ||
73 | __setup("hlt", hlt_setup); | ||
74 | |||
75 | void default_idle(void) | ||
76 | { | ||
77 | if (likely(hlt_counter)) { | ||
78 | local_irq_disable(); | ||
79 | stop_critical_timings(); | ||
80 | cpu_relax(); | ||
81 | start_critical_timings(); | ||
82 | local_irq_enable(); | ||
83 | } else { | ||
84 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
85 | smp_mb__after_clear_bit(); | ||
86 | local_irq_disable(); | ||
87 | while (!need_resched()) | ||
88 | cpu_sleep(); | ||
89 | local_irq_enable(); | ||
90 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
91 | } | ||
92 | } | ||
93 | |||
94 | void cpu_idle(void) | ||
95 | { | ||
96 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
97 | |||
98 | /* endless idle loop with no priority at all */ | ||
99 | while (1) { | ||
100 | tick_nohz_idle_enter(); | ||
101 | rcu_idle_enter(); | ||
102 | while (!need_resched()) | ||
103 | default_idle(); | ||
104 | rcu_idle_exit(); | ||
105 | tick_nohz_idle_exit(); | ||
106 | |||
107 | schedule_preempt_disabled(); | ||
108 | check_pgt_cache(); | ||
109 | } | ||
110 | } | ||
111 | |||
112 | void flush_thread(void) | 47 | void flush_thread(void) |
113 | { | 48 | { |
114 | } | 49 | } |