This reverts commit 7ef4dbaa2a.
Revert "power: wakelock: BUG if wakelock is taken very late"
This reverts commit 57b34bbdca.
Change-Id: Ie1288b5e6c899ac4419c55b91cb024b8093b5ffe
Signed-off-by: Patrick Cain <pcain@codeaurora.org>
* common/android-3.0: (570 commits)
misc: remove kernel debugger core
ARM: common: fiq_debugger: dump sysrq directly to console if enabled
ARM: common: fiq_debugger: add irq context debug functions
net: wireless: bcmdhd: Call init_ioctl() only if was started properly for WEXT
net: wireless: bcmdhd: Call init_ioctl() only if was started properly
net: wireless: bcmdhd: Fix possible memory leak in escan/iscan
cpufreq: interactive governor: default 20ms timer
cpufreq: interactive governor: go to intermediate hi speed before max
cpufreq: interactive governor: scale to max only if at min speed
cpufreq: interactive governor: apply intermediate load on current speed
ARM: idle: update idle ticks before call idle end notifier
input: gpio_input: don't print debounce message unless flag is set
net: wireless: bcm4329: Skip dhd_bus_stop() if bus is already down
net: wireless: bcmdhd: Skip dhd_bus_stop() if bus is already down
net: wireless: bcmdhd: Improve suspend/resume processing
net: wireless: bcmdhd: Check if FW is Ok for internal FW call
tcp: Don't nuke connections for the wrong protocol
ARM: common: fiq_debugger: make uart irq be no_suspend
net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT
mm: avoid livelock on !__GFP_FS allocations
...
Conflicts:
arch/arm/mm/cache-l2x0.c
arch/arm/vfp/vfpmodule.c
drivers/mmc/core/host.c
kernel/power/wakelock.c
net/bluetooth/hci_event.c
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
This reverts commit 7ef4dbaa2a.
Revert "power: wakelock: BUG if wakelock is taken very late"
This reverts commit 57b34bbdca.
Change-Id: Id4e05b191cf7781b8e0d0bed42f1c136b1ac428e
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Currently we reset msm_suspend_check_done in resume_noirq and set it
in the suspend_noirq stage right after the wakelock checks are done.
An issue is discovered recently that a wakelock can be held much earlier
in the resume sequence - a tasklet was scheduled right in the arch specifc
resume path, and this tasklet was run as soon as local interrupt was
enabled (the I bit in the CPSR for arm processors). The tasklet endedup
grabbing a wakelock thus causing a BUG.
To avoid this situation reset msm_suspend_check_done before enabling local
interrupts using the syscore ops.
Change-Id: I12766cb759134185e9727829f71893934492cc5f
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
If there is a wakelock held the wakelock driver rejects the suspend
by returning EAGAIN(-11). In this case since the suspend is rejected
in suspend_noirq callback, the resume_noirq callback is not called on
the wakelock driver, leading to the check_done flag not being cleared
and causing a BUG for the next wakelock request.
Don't set the check_done flag if suspend_noirq aborts suspend.
Change-Id: Iddd12cefd9a30020784416b4e5bec7fe3f7fc0e6
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
There has been handful of corner cases where a driver would call
wake_lock very late in the suspend sequence but the suspend proceeds
anyways and causes issues.
Add code to BUG if a driver grabs a wakelock after suspend_noirq callbacks
are called, this will aid in correct wakelock usage for new drivers and
give us callstacks for misbehaving drivers.
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Since the workqueue code deletes the work before executing it,
checking for no work item being currently queued to the workqueue
is not sufficient to guarantee that all the works have finished
execution.
Use a counter to guarantee that all the pending suspend_sys_sync()
works have finished execution before returning from
suspend_sys_sync_wait().
CRs-Fixed: 293595
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Conflicts:
kernel/power/wakelock.c
Use DEBUG_WAKEUP flag to show wakelocks that abort suspend, in
addition to showing wakelocks held during system resume.
DEBUG_WAKEUP is enabled by default.
Change-Id: If6fa68e8afbc482a5300ffab2964694b02b34f41
Signed-off-by: Todd Poynor <toddpoynor@google.com>
If the wakelock driver aborts suspend due to an already-held
wakelock, don't report the next wakelock held as the "wake up
wakelock".
Change-Id: I582ffbb87a3c361739a77d839a0c62921cff11a6
Signed-off-by: Todd Poynor <toddpoynor@google.com>
When DEBUG_SUSPEND is enabled print active wakelocks when we check
if there are any active wakelocks.
In print_active_locks(), print expired wakelocks if DEBUG_EXPIRE is enabled
Change-Id: Ib1cb795555e71ff23143a2bac7c8a58cbce16547
Signed-off-by: Mike Chan <mike@android.com>
PM: wakelock: Replace expire work with a timer
The expire work function did not work in the normal case.
Signed-off-by: Arve Hjønnevåg <arve@android.com>