aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/idle.c
Commit message (Collapse)AuthorAge
* sh: CPU hotplug support.Paul Mundt2010-04-26
| | | | | | This adds preliminary support for CPU hotplug for SH SMP systems. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: convert online CPU map twiddling to cpumask.Paul Mundt2010-04-26
| | | | | | | | | This converts from cpu_set() for the online map to set_cpu_online(). The two online map modifiers were the last remaining manual map manipulation bits, with this in place everything now goes through cpumask. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Tidy up a couple of section mismatches.Paul Mundt2010-03-23
| | | | | | | select_idle_routine() and register_sh_pmu() both needed their annotations fixed up to silence section mismatch warnings. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: machine_ops based reboot support.Paul Mundt2010-01-20
| | | | | | | | | | This provides a machine_ops-based reboot interface loosely cloned from x86, and converts the native sh32 and sh64 cases over to it. Necessary both for tying in SMP support and also enabling platforms like SDK7786 to add support for their microcontroller-based power managers. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Only use bl bit toggling for sleeping idle.Paul Mundt2009-12-20
| | | | | | | We don't actually require this in the cpu_relax() polling case, so just cuddle these around the sleeping version. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Restore bl bit toggling in idle loop.Paul Mundt2009-12-20
| | | | | | | This fixes up some crashes with IRQs racing the need_resched() test under QEMU. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix up IRQ re-enabling for the need_resched() case.Paul Mundt2009-10-16
| | | | | | | | | In the case where need_resched() is set in between the cpu_idle() and pm_idle() calls we were missing an else case for just re-enabling local IRQs and bailing out. This was noticed by the irqs_disabled() warning, even though IRQs were being re-enabled elsewhere. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Make check_pgt_cache() more aggressive while idling.Paul Mundt2009-10-16
| | | | | | | | This follows the x86 change and moves check_pgt_cache() up under the !need_resched() tight loop, rather than simply calling in to it when exiting idle. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Idle loop chainsawing for SMP-based light sleep.Paul Mundt2009-10-16
| | | | | | | | | | | | | | | | | | This does a bit of chainsawing of the idle loop code to get light sleep working on SMP. Previously this was forcing secondary CPUs in to sleep mode with them not coming back if they didn't have their own local timers. Given that we use clockevents broadcasting by default, the CPU managing the clockevents can't have IRQs disabled before entering its sleep state. This unfortunately leaves us with the age-old need_resched() race in between local_irq_enable() and cpu_sleep(), but at present this is unavoidable. After some more experimentation it may be possible to layer on SR.BL bit manipulation over top of this scheme to inhibit the race condition, but given the current potential for missing wakeups, this is left as a future exercise. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Provide cpu_idle_wait() to fix up cpuidle/SMP build.Paul Mundt2009-06-23
| | | | | | | Crib the x86 cpu_idle_wait() implementation and shove it in with the idle code, subsequently enabling ARCH_HAS_CPU_IDLE_WAIT. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Wire up ARCH_HAS_DEFAULT_IDLE for cpuidle.Paul Mundt2009-04-02
| | | | | | | | cpuidle wants ARCH_HAS_DEFAULT_IDLE defined in order to use the default idle loop. So, make it accessible and enable it for all sh machines. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Split out the idle loop for reuse between _32/_64 variants.Paul Mundt2008-12-22
Signed-off-by: Paul Mundt <lethal@linux-sh.org>