summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorGaurav Kohli <gkohli@codeaurora.org>2016-09-02 18:03:22 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-12-27 02:49:00 -0800
commitb1713f5e9a8817dbabe5cfc7ef3f937837bd374a (patch)
tree170eb84b932ca21d9ddd3daf6060d196d311f334 /drivers/soc
parent1075dc72d7692adfd185d07d143017b49e2a099e (diff)
soc: qcom: flush persistent kmaps and fixmap mappings for subsystem mdt
On 32 bit architecture xpu violations are happening because of mappings in PK map regions. Flush the PKMAP and fixmap mappings to make sure that there are no duplicate mappings for any pil mdt region. On 64 bit architecture these functions are empty. Change-Id: Ie69fcf9044a89328e91ff8969044835f2a487a10 Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/subsys-pil-tz.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/soc/qcom/subsys-pil-tz.c b/drivers/soc/qcom/subsys-pil-tz.c
index b8d096a9c057..769a683e3d8d 100644
--- a/drivers/soc/qcom/subsys-pil-tz.c
+++ b/drivers/soc/qcom/subsys-pil-tz.c
@@ -25,6 +25,7 @@
#include <linux/msm-bus-board.h>
#include <linux/msm-bus.h>
#include <linux/dma-mapping.h>
+#include <linux/highmem.h>
#include <soc/qcom/subsystem_restart.h>
#include <soc/qcom/ramdump.h>
@@ -613,6 +614,10 @@ static int pil_init_image_trusted(struct pil_desc *pil,
return -ENOMEM;
}
+ /* Make sure there are no mappings in PKMAP and fixmap */
+ kmap_flush_unused();
+ kmap_atomic_flush_unused();
+
memcpy(mdata_buf, metadata, size);
request.proc = d->pas_id;