diff options
author | Peter Smith <peter.smith@linaro.org> | 2017-11-28 12:34:05 +0000 |
---|---|---|
committer | Peter Smith <peter.smith@linaro.org> | 2017-11-28 12:34:05 +0000 |
commit | a939257a42286accab8a55f0eb20c1ad117b06c7 (patch) | |
tree | a17970981b79020fef99deac6ff87de5e047d964 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 542485f29ce22ac0beed33b57bf51662f7d0e877 (diff) | |
download | bcm5719-llvm-a939257a42286accab8a55f0eb20c1ad117b06c7.tar.gz bcm5719-llvm-a939257a42286accab8a55f0eb20c1ad117b06c7.zip |
[ARM][AArch64] Workaround ARM/AArch64 peculiarity in clearing icache.
Certain ARM implementations treat icache clear instruction as a memory read,
and CPU segfaults on trying to clear cache on !PROT_READ page.
We workaround this in Memory::protectMappedMemory by adding
PROT_READ to affected pages, clearing the cache, and then setting
desired protection.
This fixes "AllocationTests/MappedMemoryTest.***/3" unit-tests on
affected hardware.
Reviewers: psmith, zatrazz, kristof.beyls, lhames
Reviewed By: lhames
Subscribers: llvm-commits, krytarowski, peter.smith, jgreenhalgh, aemerson,
rengolin
Patch by maxim-kuvrykov!
Differential Revision: https://reviews.llvm.org/D40423
llvm-svn: 319166
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions