]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Hibernate: Call flush_icache_range() on pages restored in-place
authorJames Morse <james.morse@arm.com>
Wed, 27 Apr 2016 16:47:11 +0000 (17:47 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 28 Apr 2016 12:35:48 +0000 (13:35 +0100)
commite02d48108805719753ad2caf70385d6a6341dfe0
tree831a5fae14f6bd23cdb0ea97526cc4fc00164a4d
parentdc0ca80e4ca61b9a37433635be44dd165ed40627
PM / Hibernate: Call flush_icache_range() on pages restored in-place

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>
kernel/power/swap.c