File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ config CRIS
4848 select GENERIC_IRQ_SHOW
4949 select GENERIC_IOMAP
5050 select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32
51+ select GENERIC_IDLE_LOOP
5152 select GENERIC_CMOS_UPDATE
5253 select MODULES_USE_ELF_RELA
5354 select CLONE_BACKWARDS2
Original file line number Diff line number Diff line change @@ -30,8 +30,9 @@ void etrax_gpio_wake_up_check(void); /* drivers/gpio.c */
3030void default_idle (void )
3131{
3232#ifdef CONFIG_ETRAX_GPIO
33- etrax_gpio_wake_up_check ();
33+ etrax_gpio_wake_up_check ();
3434#endif
35+ local_irq_enable ();
3536}
3637
3738/*
Original file line number Diff line number Diff line change @@ -23,13 +23,9 @@ extern void stop_watchdog(void);
2323/* We use this if we don't have any better idle routine. */
2424void default_idle (void )
2525{
26- local_irq_disable ();
27- if (!need_resched ()) {
28- /* Halt until exception. */
29- __asm__ volatile ("ei \n\t"
30- "halt " );
31- }
32- local_irq_enable ();
26+ /* Halt until exception. */
27+ __asm__ volatile ("ei \n\t"
28+ "halt " );
3329}
3430
3531/*
Original file line number Diff line number Diff line change @@ -145,8 +145,6 @@ smp_boot_one_cpu(int cpuid, struct task_struct idle)
145145 * specific stuff such as the local timer and the MMU. */
146146void __init smp_callin (void )
147147{
148- extern void cpu_idle (void );
149-
150148 int cpu = cpu_now_booting ;
151149 reg_intr_vect_rw_mask vect_mask = {0 };
152150
@@ -170,7 +168,7 @@ void __init smp_callin(void)
170168 local_irq_enable ();
171169
172170 set_cpu_online (cpu , true);
173- cpu_idle ( );
171+ cpu_startup_entry ( CPUHP_ONLINE );
174172}
175173
176174/* Stop execution on this CPU.*/
Original file line number Diff line number Diff line change @@ -34,29 +34,9 @@ extern void default_idle(void);
3434void (* pm_power_off )(void );
3535EXPORT_SYMBOL (pm_power_off );
3636
37- /*
38- * The idle thread. There's no useful work to be
39- * done, so just try to conserve power and have a
40- * low exit latency (ie sit in a loop waiting for
41- * somebody to say that they'd like to reschedule)
42- */
43-
44- void cpu_idle (void )
37+ void arch_cpu_idle (void )
4538{
46- /* endless idle loop with no priority at all */
47- while (1 ) {
48- rcu_idle_enter ();
49- while (!need_resched ()) {
50- /*
51- * Mark this as an RCU critical section so that
52- * synchronize_kernel() in the unload path waits
53- * for our completion.
54- */
55- default_idle ();
56- }
57- rcu_idle_exit ();
58- schedule_preempt_disabled ();
59- }
39+ default_idle ();
6040}
6141
6242void hard_reset_now (void );
You can’t perform that action at this time.
0 commit comments