android_kernel_google_msm/arch
Felipe Balbi 2 56a4076e7a ARM: 7565/1: sched: stop sched_clock() during suspend
The scheduler imposes a requirement to sched_clock()
which is to stop the clock during suspend, if we don't
do that any RT thread will be rescheduled in the future
which might cause any sort of problems.

This became an issue on OMAP when we converted omap-i2c.c
to use threaded IRQs, it turned out that depending on how
much time we spent on suspend, the I2C IRQ thread would
end up being rescheduled so far in the future that I2C
transfers would timeout and, because omap_hsmmc depends
on an I2C-connected device to detect if an MMC card is
inserted in the slot, our rootfs would just vanish.

arch/arm/kernel/sched_clock.c already had an optional
implementation (sched_clock_needs_suspend()) which would
handle scheduler's requirement properly, what this patch
does is simply to make that implementation non-optional.

Note that this has the side-effect that printk timings
won't reflect the actual time spent on suspend so other
methods to measure that will have to be used.

This has been tested with beagleboard XM (OMAP3630) and
pandaboard rev A3 (OMAP4430). Suspend to RAM is now working
after this patch.

Thanks to Kevin Hilman for helping out with debugging.

Change-Id: Ie2f9e3b22eb3d1f3806cf8c598f22e2fa1b8651f
Acked-by: Kevin Hilman <khilman@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
CRs-Fixed: 497236
Git-commit: 6a4dae5e13
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2016-10-29 23:12:16 +08:00
..
alpha
arm ARM: 7565/1: sched: stop sched_clock() during suspend 2016-10-29 23:12:16 +08:00
avr32
blackfin
c6x
cris
frv
h8300
hexagon Update copyright to The Linux Foundation 2013-03-15 17:07:39 -07:00
ia64 random: remove rand_initialize_irq() 2013-09-09 17:01:42 -07:00
m32r
m68k
microblaze seccomp: ignore secure_computing return values 2014-10-31 19:46:19 -07:00
mips seccomp: ignore secure_computing return values 2014-10-31 19:46:19 -07:00
mn10300
openrisc
parisc
powerpc seccomp: ignore secure_computing return values 2014-10-31 19:46:19 -07:00
s390 seccomp: ignore secure_computing return values 2014-10-31 19:46:19 -07:00
score
sh seccomp: ignore secure_computing return values 2014-10-31 19:46:19 -07:00
sparc seccomp: ignore secure_computing return values 2014-10-31 19:46:19 -07:00
tile
um um: add missing declaration of 'getrlimit()' and friends 2015-05-20 15:22:06 +09:00
unicore32
x86 seccomp: add "seccomp" syscall 2014-10-31 19:46:27 -07:00
xtensa
.gitignore
Kconfig seccomp: add "seccomp" syscall 2014-10-31 19:46:27 -07:00