File tree Expand file tree Collapse file tree 5 files changed +10
-44
lines changed Expand file tree Collapse file tree 5 files changed +10
-44
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ config AVR32
10
10
select VIRT_TO_BUS
11
11
select GENERIC_IRQ_PROBE
12
12
select GENERIC_ATOMIC64
13
+ select GENERIC_IDLE_LOOP
13
14
select HARDIRQS_SW_RESEND
14
15
select GENERIC_IRQ_SHOW
15
16
select ARCH_HAVE_CUSTOM_GPIO_H
Original file line number Diff line number Diff line change @@ -30,18 +30,9 @@ EXPORT_SYMBOL(pm_power_off);
30
30
* This file handles the architecture-dependent parts of process handling..
31
31
*/
32
32
33
- void cpu_idle (void )
33
+ void arch_cpu_idle (void )
34
34
{
35
- /* endless idle loop with no priority at all */
36
- while (1 ) {
37
- tick_nohz_idle_enter ();
38
- rcu_idle_enter ();
39
- while (!need_resched ())
40
- cpu_idle_sleep ();
41
- rcu_idle_exit ();
42
- tick_nohz_idle_exit ();
43
- schedule_preempt_disabled ();
44
- }
35
+ cpu_enter_idle ();
45
36
}
46
37
47
38
void machine_halt (void )
Original file line number Diff line number Diff line change 12
12
#include <linux/irq.h>
13
13
#include <linux/kernel.h>
14
14
#include <linux/time.h>
15
+ #include <linux/cpu.h>
15
16
16
17
#include <asm/sysreg.h>
17
18
@@ -87,13 +88,17 @@ static void comparator_mode(enum clock_event_mode mode,
87
88
pr_debug ("%s: start\n" , evdev -> name );
88
89
/* FALLTHROUGH */
89
90
case CLOCK_EVT_MODE_RESUME :
90
- cpu_disable_idle_sleep ();
91
+ /*
92
+ * If we're using the COUNT and COMPARE registers we
93
+ * need to force idle poll.
94
+ */
95
+ cpu_idle_poll_ctrl (true);
91
96
break ;
92
97
case CLOCK_EVT_MODE_UNUSED :
93
98
case CLOCK_EVT_MODE_SHUTDOWN :
94
99
sysreg_write (COMPARE , 0 );
95
100
pr_debug ("%s: stop\n" , evdev -> name );
96
- cpu_enable_idle_sleep ( );
101
+ cpu_idle_poll_ctrl (false );
97
102
break ;
98
103
default :
99
104
BUG ();
Original file line number Diff line number Diff line change 21
21
extern void cpu_enter_idle (void );
22
22
extern void cpu_enter_standby (unsigned long sdramc_base );
23
23
24
- extern bool disable_idle_sleep ;
25
-
26
- static inline void cpu_disable_idle_sleep (void )
27
- {
28
- disable_idle_sleep = true;
29
- }
30
-
31
- static inline void cpu_enable_idle_sleep (void )
32
- {
33
- disable_idle_sleep = false;
34
- }
35
-
36
- static inline void cpu_idle_sleep (void )
37
- {
38
- /*
39
- * If we're using the COUNT and COMPARE registers for
40
- * timekeeping, we can't use the IDLE state.
41
- */
42
- if (disable_idle_sleep )
43
- cpu_relax ();
44
- else
45
- cpu_enter_idle ();
46
- }
47
-
48
24
void intc_set_suspend_handler (unsigned long offset );
49
25
#endif
50
26
Original file line number Diff line number Diff line change 18
18
/ * Same as 0xfff00000 but fits in a 21 bit signed immediate * /
19
19
#define PM_BASE - 0x100000
20
20
21
- . section .bss , "wa" , @nobits
22
- . global disable_idle_sleep
23
- .type disable_idle_sleep , @object
24
- disable_idle_sleep:
25
- . int 4
26
- .size disable_idle_sleep , . - disable_idle_sleep
27
-
28
21
/ * Keep this close to the irq handlers * /
29
22
. section .irq.text , "ax" , @progbits
30
23
You can’t perform that action at this time.
0 commit comments