Skip to content
Commit f6cf0545 authored by James Morse's avatar James Morse Committed by Will Deacon
Browse files

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: default avatarJames Morse <james.morse@arm.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Acked-by: default avatarRafael J. Wysocki <rjw@rjwysocki.net>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
[will: make clean_pages_on_* static and remove initialisers]
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent 5003dbde
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment