android_kernel_oneplus_msm8998/kernel/power
James Morse fbfaa26fa9 PM / Hibernate: Call flush_icache_range() on pages restored in-place
[ Upstream commit f6cf0545ec697ddc278b7457b7d0c0d86a2ea88e ]

Some architectures require code written to memory as if it were data to be
'cleaned' from any data caches before the processor can fetch them as new
instructions.

During resume from hibernate, the snapshot code copies some pages directly,
meaning these architectures do not get a chance to perform their cache
maintenance. Modify the read and decompress code to call
flush_icache_range() on all pages that are restored, so that the restored
in-place pages are guaranteed to be executable on these architectures.

Signed-off-by: James Morse <james.morse@arm.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
[will: make clean_pages_on_* static and remove initialisers]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-04-03 06:23:24 +02:00
..
autosleep.c
console.c arm, pm, vmpressure: add missing slab.h includes 2014-02-03 13:24:01 -05:00
hibernate.c PM / hibernate: Restore processor state before using per-CPU variables 2016-09-30 10:18:39 +02:00
Kconfig PM / sleep: wakeup: Fix build error caused by missing SRCU support 2018-09-09 20:04:34 +02:00
main.c PM / sleep: Report interrupt that caused system wakeup 2015-09-16 14:20:41 +02:00
Makefile suspend: simplify block I/O handling 2015-05-19 09:19:59 -06:00
power.h x86/power: Fix swsusp_arch_resume prototype 2018-05-30 07:48:55 +02:00
poweroff.c
process.c sched/cpuset/pm: Fix cpuset vs. suspend-resume bugs 2017-10-12 11:27:35 +02:00
qos.c PM / QoS: Add debugfs support to view the list of constraints 2015-01-23 22:16:21 +01:00
snapshot.c PM / hibernate: Fix rtree_next_node() to avoid walking off list ends 2016-09-30 10:18:39 +02:00
suspend.c PM / sleep: Add flags to indicate platform firmware involvement 2015-10-14 02:17:33 +02:00
suspend_test.c PM / sleep: fix device reference leak in test_suspend 2016-11-26 09:54:53 +01:00
swap.c PM / Hibernate: Call flush_icache_range() on pages restored in-place 2019-04-03 06:23:24 +02:00
user.c PM / hibernate: Fix oops at snapshot_write() 2018-07-17 11:31:46 +02:00
wakelock.c PM / autosleep: Use workqueue for user space wakeup sources garbage collector 2015-07-14 21:04:48 +02:00