summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeeti Desai <neetid@codeaurora.org>2015-02-25 16:36:58 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:04:25 -0700
commit6b46fc5b3bacfd808d5388a45cfdc002cbb9dbde (patch)
tree1d392e95975745436f0b4e8de5fca2d706359cae
parent19cf289669e8dc5f76f8a562339f7d64c9ed2cf6 (diff)
msm: ion: Add support to flush the caches before hypervisor call
The buffers passed to the secure world in they hypervisor assign call need to be flushed, so that they can be accessed by the secure world. Flush the caches before making the hypervisor call. CRs-Fixed: 798525 Change-Id: I95862f09daa3b0edc5e32863c6defc657f98b534 Signed-off-by: Neeti Desai <neetid@codeaurora.org>
-rw-r--r--drivers/staging/android/ion/msm/secure_buffer.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/staging/android/ion/msm/secure_buffer.c b/drivers/staging/android/ion/msm/secure_buffer.c
index ee583220c60a..4d188a270005 100644
--- a/drivers/staging/android/ion/msm/secure_buffer.c
+++ b/drivers/staging/android/ion/msm/secure_buffer.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 Google, Inc
- * Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2015, 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
@@ -239,6 +239,13 @@ int msm_ion_hyp_assign_call(struct sg_table *table,
desc.arginfo = SCM_ARGS(7, SCM_RO, SCM_VAL, SCM_RO, SCM_VAL, SCM_RO,
SCM_VAL, SCM_VAL);
+ dmac_flush_range(info_list->list_head, info_list->list_head +
+ (info_list->list_size / sizeof(*info_list->list_head)));
+ dmac_flush_range(source_vm_list, source_vm_list +
+ (source_list_size / sizeof(*source_vm_list)));
+ dmac_flush_range(dest_vm_list, dest_vm_list +
+ (dest_list_size / sizeof(*dest_vm_list)));
+
ret = scm_call2(SCM_SIP_FNID(SCM_SVC_MP,
MEM_PROT_ASSIGN_ID), &desc);
if (ret)