OpenCloudOS-Kernel/drivers
Rafael J. Wysocki 3810631332 PM / sleep: Re-implement suspend-to-idle handling
In preparation for adding support for quiescing timers in the final
stage of suspend-to-idle transitions, rework the freeze_enter()
function making the system wait on a wakeup event, the freeze_wake()
function terminating the suspend-to-idle loop and the mechanism by
which deep idle states are entered during suspend-to-idle.

First of all, introduce a simple state machine for suspend-to-idle
and make the code in question use it.

Second, prevent freeze_enter() from losing wakeup events due to race
conditions and ensure that the number of online CPUs won't change
while it is being executed.  In addition to that, make it force
all of the CPUs re-enter the idle loop in case they are in idle
states already (so they can enter deeper idle states if possible).

Next, drop cpuidle_use_deepest_state() and replace use_deepest_state
checks in cpuidle_select() and cpuidle_reflect() with a single
suspend-to-idle state check in cpuidle_idle_call().

Finally, introduce cpuidle_enter_freeze() that will simply find the
deepest idle state available to the given CPU and enter it using
cpuidle_enter().

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
2015-02-13 23:49:36 +01:00
..
accessibility
acpi More ACPI and power management updates for v3.20-rc1 2015-02-13 13:45:57 -08:00
amba ARM: 8256/1: driver coamba: add device binding path 'driver_override' 2015-02-10 10:23:15 +00:00
android
ata Merge branch 'for-3.20/drivers' of git://git.kernel.dk/linux-block 2015-02-12 14:30:53 -08:00
atm atm: remove deprecated use of pci api 2015-01-18 00:28:41 -05:00
auxdisplay
base Merge branches 'pm-cpufreq', 'pm-cpuidle', 'pm-devfreq', 'pm-opp' and 'pm-tools' 2015-02-13 21:39:06 +01:00
bcma bcma: implement host code support for PCIe Gen 2 devices 2015-01-29 10:54:43 +02:00
block Merge branch 'akpm' (patches from Andrew) 2015-02-12 18:54:28 -08:00
bluetooth Bluetooth: btusb: Add support for Lite-On (04ca) Broadcom based, BCM43142 2015-02-03 08:57:14 +01:00
bus mvebu fixes for 3.19. (Part 4) 2015-01-23 14:08:13 -08:00
cdrom
char Merge branch 'for-3.20/bdi' of git://git.kernel.dk/linux-block 2015-02-12 13:50:21 -08:00
clk Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-02-10 20:01:30 -08:00
clocksource Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-02-12 08:51:56 -08:00
connector
coresight
cpufreq Merge branches 'pm-cpufreq', 'pm-cpuidle', 'pm-devfreq', 'pm-opp' and 'pm-tools' 2015-02-13 21:39:06 +01:00
cpuidle PM / sleep: Re-implement suspend-to-idle handling 2015-02-13 23:49:36 +01:00
crypto Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
dca
devfreq Merge branches 'pm-cpufreq', 'pm-cpuidle', 'pm-devfreq', 'pm-opp' and 'pm-tools' 2015-02-13 21:39:06 +01:00
dio
dma resources: Move struct resource_list_entry from ACPI into resource core 2015-02-05 15:09:25 +01:00
dma-buf
edac EDAC, mv64x60_edac: Fix an error code in probe() 2015-01-30 17:00:43 +01:00
eisa
extcon Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
firewire
firmware arm64 updates for 3.20: 2015-02-11 18:03:54 -08:00
fmc
gpio Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-02-12 08:51:56 -08:00
gpu sound updates for 3.20-rc1 2015-02-11 08:51:59 -08:00
hid Merge branches 'for-3.19/upstream-fixes', 'for-3.20/apple', 'for-3.20/betop', 'for-3.20/lenovo', 'for-3.20/logitech', 'for-3.20/rmi', 'for-3.20/upstream' and 'for-3.20/wacom' into for-linus 2015-02-09 11:17:45 +01:00
hsi hsi: nokia-modem: fix uninitialized device pointer 2015-01-04 20:19:30 +01:00
hv ACPICA: Resources: Provide common part for struct acpi_resource_address structures. 2015-01-26 16:09:56 +01:00
hwmon hwmon: (tmp102) add hibernation callbacks 2015-02-03 12:17:12 -08:00
hwspinlock
i2c i2c: sh_mobile: terminate DMA reads properly 2015-01-30 17:58:43 +01:00
ide Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
idle intel_idle: support additional Broadwell model 2015-02-10 15:42:03 -05:00
iio Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2015-02-11 09:32:08 -08:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-02-10 20:01:30 -08:00
input Merge branch 'next' into for-linus 2015-02-10 11:35:36 -08:00
iommu IOMMU Updates for Linux v3.20 2015-02-12 09:16:56 -08:00
ipack
irqchip Fairly small update, but there are some interesting new features. 2015-02-13 09:55:09 -08:00
isdn drivers: isdn: isdnloop: isdnloop.c: Remove parenthesis around return values, as specified in CodingStyle. 2015-02-05 15:40:23 -08:00
leds leds: leds-gpio: Pass on error codes unmodified 2015-02-02 14:36:10 -08:00
lguest
macintosh macintosh: therm_pm72: delete deprecated driver 2014-12-19 19:32:47 +01:00
mailbox Merge branch 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration 2015-02-11 12:56:40 -08:00
mcb mcb: mcb-pci: Only remap the 1st 0x200 bytes of BAR 0 2015-01-09 15:46:37 -08:00
md - Most significant change this cycle is request-based DM now supports 2015-02-12 16:36:31 -08:00
media mm: gup: use get_user_pages_unlocked 2015-02-11 17:06:05 -08:00
memory memory/fsl-corenet-cf: Add t1040 support 2015-01-29 22:57:43 -06:00
memstick
message
mfd - Avoid platform ID collision in da9052 2015-01-21 18:29:44 +12:00
misc powerpc updates for 3.20 2015-02-11 18:15:38 -08:00
mmc mmc: sdhci-s3c: solve problem with sleeping in atomic context 2015-02-04 13:39:14 +01:00
mtd mtd: export new mtd_mmap_capabilities 2015-01-28 11:09:20 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-02-10 20:01:30 -08:00
nfc NFC: nci: Move NFCEE discovery logic 2015-02-04 09:15:18 +01:00
ntb
nubus
of DeviceTree changes for 3.20: 2015-02-12 08:58:43 -08:00
oprofile
parisc parisc/PCI: Clip bridge windows to fit in upstream windows 2015-01-16 10:04:43 -06:00
parport parport: parport_atari: Remove obsolete IRQ_TYPE_SLOW 2015-01-15 13:44:50 +01:00
pci ACPI and power management updates for v3.20-rc1 2015-02-10 15:09:41 -08:00
pcmcia Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
phy SCSI misc on 20150209 2015-02-11 10:28:45 -08:00
pinctrl This is the bulk of pin control changes for the v3.20 cycle: 2015-02-11 11:23:13 -08:00
platform Revert "platform: x86: dell-laptop: Add support for keyboard backlight" 2015-01-23 11:10:32 -08:00
pnp ACPI: Return translation offset when parsing ACPI address space resources 2015-02-03 22:27:21 +01:00
power power_supply: 88pm860x: Fix leaked power supply on probe fail 2015-01-28 15:08:10 +01:00
powercap powercap / RAPL: add IDs for future Xeon CPUs 2014-12-17 02:35:42 +01:00
pps
ps3 powerpc/ps3: Fix sys-manager-core sparse warnings 2015-01-22 17:31:21 +11:00
ptp
pwm pwm: Changes for v3.19-rc1 2014-12-17 10:10:51 -08:00
rapidio rapidio/tsi721: use PCI define for Max_Read_Request_Size 2015-01-27 08:14:26 -06:00
ras
regulator Merge remote-tracking branches 'regulator/topic/rk808', 'regulator/topic/rpm', 'regulator/topic/rt5033' and 'regulator/topic/tps65023' into regulator-next 2015-02-08 11:16:30 +08:00
remoteproc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
reset reset: sunxi: fix spinlock initialization 2015-01-16 19:11:31 -08:00
rpmsg
rtc Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 17:53:53 -08:00
s390 Fairly small update, but there are some interesting new features. 2015-02-13 09:55:09 -08:00
sbus
scsi Merge branch 'for-3.20/core' of git://git.kernel.dk/linux-block 2015-02-12 14:13:23 -08:00
sfi
sh
sn
soc Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-12-15 15:52:01 -08:00
spi Merge remote-tracking branch 'spi/topic/xilinx' into spi-next 2015-02-08 11:17:01 +08:00
spmi
ssb ssb: Fix Sparse error in main 2015-01-29 10:17:56 +02:00
staging Merge branch 'for-3.20/bdi' of git://git.kernel.dk/linux-block 2015-02-12 13:50:21 -08:00
target netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
tc
thermal Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-01-27 16:59:56 -08:00
thunderbolt
tty Merge branch 'akpm' (patches from Andrew) 2015-02-11 18:23:28 -08:00
uio Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
usb xilinx usb2 gadget: get rid of incredibly annoying compile warning 2015-02-11 10:52:56 -08:00
uwb
vfio vfio-pci: Fix the check on pci device type in vfio_pci_probe() 2015-01-07 10:29:11 -07:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-02-05 14:33:28 -08:00
video mm: gup: use get_user_pages_unlocked 2015-02-11 17:06:05 -08:00
virt
virtio virtio_pci: document why we defer kfree 2015-01-06 16:35:36 +02:00
vlynq
vme
w1 Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
watchdog watchdog: drop owner assignment from platform_drivers 2015-01-21 14:52:34 +01:00
xen SCSI misc on 20150209 2015-02-11 10:28:45 -08:00
zorro
Kconfig drivers/Kconfig: remove duplicate entry for soc 2015-01-25 20:26:42 +08:00
Makefile drivers: Move iommu/ before gpu/ in Makefile 2014-12-22 11:47:37 +02:00