From: Will Deacon Date: Tue, 4 Nov 2014 10:40:46 +0000 (+0100) Subject: ARM: 8191/1: decompressor: ensure I-side picks up relocated code X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~104^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=238962ac71910d6c20162ea5230685fead1836a4;p=pandora-kernel.git ARM: 8191/1: decompressor: ensure I-side picks up relocated code To speed up decompression, the decompressor sets up a flat, cacheable mapping of memory. However, when there is insufficient space to hold the page tables for this mapping, we don't bother to enable the caches and subsequently skip all the cache maintenance hooks. Skipping the cache maintenance before jumping to the relocated code allows the processor to predict the branch and populate the I-cache with stale data before the relocation loop has completed (since a bootloader may have SCTLR.I set, which permits normal, cacheable instruction fetches regardless of SCTLR.M). This patch moves the cache maintenance check into the maintenance routines themselves, allowing the v6/v7 versions to invalidate the I-cache regardless of the MMU state. Cc: Reported-by: Marc Carino Tested-by: Julien Grall Signed-off-by: Will Deacon Signed-off-by: Russell King --- Reading git-diff-tree failed