Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22903594 authored by Arun KS's avatar Arun KS Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: flush persistent kmaps and fixmap mappings for MBA



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 MBA regions. On 64 bit architecture
these functions turn out to be do while 0;

Change-Id: I9f5dc20c292688bf09d137ae7722820ae51a7d60
Signed-off-by: default avatarArun KS <arunks@codeaurora.org>
parent d171201f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -23,6 +23,7 @@
#include <linux/of.h>
#include <linux/regulator/consumer.h>
#include <linux/dma-mapping.h>
#include <linux/highmem.h>
#include <soc/qcom/scm.h>
#include <soc/qcom/secure_buffer.h>

@@ -535,6 +536,10 @@ int pil_mss_reset_load_mba(struct pil_desc *pil)
		goto err_invalid_fw;
	}

	/* Make sure there are no mappings in PKMAP and fixmap */
	kmap_flush_unused();
	kmap_atomic_flush_unused();

	drv->mba_dp_phys = mba_dp_phys;
	drv->mba_dp_virt = mba_dp_virt;
	mba_dp_phys_end = mba_dp_phys + drv->mba_dp_size;