remarkable-linux/drivers
Deepthi Dharwar 75cc523587 PM / ACPI: Fix suspend/resume regression caused by cpuidle cleanup.
Commit e978aa7d7d ( cpuidle: Move
dev->last_residency update to driver enter routine; remove dev->last_state)
was  breaking suspend on laptops, as reported in the below link
	- https://lkml.org/lkml/2011/11/11/164

This was fixed in commit 3439a8da16
(ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression)
by removing acpi_idle_suspend flag.
	- https://lkml.org/lkml/2011/11/14/74

But this did fix did not work on all systems
as Suspend/resume regression was reported on Lenovo S10-3
recently by Dave.
	- https://lkml.org/lkml/2012/5/27/115
It looked like with commit e978aa7d broke suspend and
with commit 3439a8da resume was not working with acpi_idle driver.

This patch fixes the regression that caused this issue
in the first place. acpi_idle_suspend flag is essential on
some x86 systems to prevent the cpus from going to deeper C-states
when suspend is triggered ( commit b04e7bdb98 )
So reverting the commit 3439a8da is essential.

By default, irqs are disabled in cpu_idle arch specific call
and re-enabled in idle state return path . During suspend,
the acpi_idle_suspend flag is set, which
prevents the cpus from going to deeper idle states,
it is essential to enabling the irqs in this return path too.

To address the suspend issue,
we were not re-enabling the interrupts while returning from
acpi_idle_enter_bm() routine if acpi_idle_suspend flag is set.
and this caused suspend failure.

In addition to the above, to improve the readability of the code,
return of -ENIVAL is replaced with -EBUSY in acpi_idle_suspend
return path. Implying that the system is currently busy when suspend
is in progress, which prevents the cpus from entering deeper C-states.

Reported-and-Tested-by: Dav Hansen <dave@linux.vnet.ibm.com>
Tested-by: Preeti Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Reviewed-by: Srivatsa S Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-06-27 20:18:53 +02:00
..
accessibility
acpi PM / ACPI: Fix suspend/resume regression caused by cpuidle cleanup. 2012-06-27 20:18:53 +02:00
amba arm-soc: driver specific updates 2012-05-26 12:22:27 -07:00
ata Viresh has moved 2012-06-20 14:39:36 -07:00
atm solos-pci: Fix DMA support 2012-05-24 16:22:53 -04:00
auxdisplay
base PM / Sleep: Prevent waiting forever on asynchronous suspend after abort 2012-06-24 23:31:09 +02:00
bcma bcma: fix null pointer in bcma_core_pci_irq_ctl 2012-06-08 13:47:07 -04:00
block mtip32xx: Changes to sysfs entries 2012-05-31 08:46:50 +02:00
bluetooth
cdrom
char Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2012-06-18 12:20:36 -07:00
clk Viresh has moved 2012-06-20 14:39:36 -07:00
clocksource clocksource: sh_tmu: Use clockevents_config_and_register(). 2012-06-11 17:10:16 +09:00
connector
cpufreq
cpuidle
crypto arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
dca
devfreq
dio
dma Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma 2012-06-20 22:12:52 -07:00
edac edac: Do alignment logic properly in edac_align_ptr() 2012-06-11 12:43:16 -03:00
eisa
extcon extcon: max8997: Add missing kfree for info->edev in max8997_muic_remove() 2012-06-18 16:30:42 -07:00
firewire
firmware
gpio gpio/samsung: fix the typo 'exynos5_xxx' instead of 'exonys5_xxx' 2012-06-03 21:21:01 -07:00
gpu drm/edid: don't return stack garbage from supports_rb 2012-06-21 09:34:13 +01:00
hid
hsi
hv
hwmon hwmon fixes for 3.5-rc4 2012-06-21 13:40:40 -07:00
hwspinlock
i2c i2c: Add generic I2C multiplexer using pinctrl API 2012-06-04 16:49:43 +02:00
ide drivers/ide/ide-cs.c: adjust suspicious bit operation 2012-06-12 15:51:41 -07:00
idle
ieee802154
iio iio: drop wrong reference from Kconfig 2012-06-14 17:28:46 -07:00
infiniband Merge branches 'cma' and 'ocrdma' into for-linus 2012-06-24 04:59:59 -07:00
input i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING 2012-05-30 10:55:34 +02:00
iommu iommu/amd: Fix deadlock in ppr-handling error path 2012-06-04 12:47:44 +02:00
isdn
leds leds: Make LEDS_ASIC3 and LEDS_RENESAS_TPU depend on LEDS_CLASS=y 2012-06-12 10:56:25 +08:00
lguest
macintosh
md md: 2 fixes for 3.5-rc 2012-06-06 09:49:28 -07:00
media media: pms.c needs linux/slab.h 2012-06-20 22:10:08 -07:00
memory
memstick
message Merge branch 'akpm' (Andrew's patch-bomb) 2012-05-31 18:10:18 -07:00
mfd Viresh has moved 2012-06-20 14:39:36 -07:00
misc misc: mei: set WDIOF_ALARMONLY on mei watchdog 2012-06-13 15:34:31 -07:00
mmc Merge branch 'akpm' (Andrew's patch-bomb) 2012-06-20 14:41:57 -07:00
mtd kmsg - kmsg_dump() use iterator to receive log buffer content 2012-06-15 14:53:59 -07:00
net Fix typo in printed messages 2012-06-24 11:03:52 -07:00
nfc NFC: potential integer overflow problem in check_crc() 2012-05-25 11:16:16 -04:00
nubus
of Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2012-05-29 18:27:19 -07:00
oprofile
parisc
parport
pci USB: add NO_D3_DURING_SLEEP flag and revert 151b612847 2012-06-13 13:11:39 -07:00
pcmcia
pinctrl Merge branch 'akpm' (Andrew's patch-bomb) 2012-06-20 14:41:57 -07:00
platform drivers/platform/x86/acerhdf.c: correct Boris' mail address 2012-06-07 14:43:55 -07:00
pnp
power A bunch of fixes for v3.5, nothing extraordinary. 2012-05-31 12:10:15 -07:00
pps
ps3
ptp
rapidio rapidio/tsi721: add DMA engine support 2012-05-31 17:49:31 -07:00
regulator regulator: Change db8500-prcmu match names to reflect Device Tree 2012-06-17 18:27:49 +01:00
remoteproc remoteproc/omap: fix dev_err typo 2012-06-17 10:31:03 +03:00
rpmsg
rtc Merge branches 'bugfix-battery', 'bugfix-misc', 'bugfix-rafael', 'bugfix-turbostat', 'bugfix-video' and 'workaround-pss' into release 2012-06-04 00:48:41 -04:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2012-05-31 10:51:10 -07:00
sbus
scsi SCSI fixes on 20120614 2012-06-15 17:39:32 -07:00
sfi
sh
sn
spi SPI: fix over-eager devm_xxx() conversion 2012-06-18 11:27:04 +01:00
ssb
staging staging tree fixes for 3.5-rc4 2012-06-20 15:15:03 -07:00
target target: Return error to initiator if SET TARGET PORT GROUPS emulation fails 2012-06-12 20:12:25 -07:00
tc
thermal
tty Serial driver fixes for 3.5-rc4 2012-06-20 15:13:13 -07:00
uio
usb USB: fix gathering of interface associations 2012-06-14 17:13:34 -07:00
uwb
vhost
video fbdev fixes for 3.5 2012-06-16 16:59:05 -07:00
virt
virtio
vlynq
vme
w1 arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
watchdog Viresh has moved 2012-06-20 14:39:36 -07:00
xen Five bug-fixes: 2012-06-15 17:17:15 -07:00
zorro
Kconfig
Makefile arm-soc: driver specific updates 2012-05-26 12:22:27 -07:00