Skip to main content
Sign in
Snippets Groups Projects
Commit a86a5abf authored by Laura Abbott's avatar Laura Abbott Committed by Stephen Boyd
Browse files

gpu: ion: Flush mappings before making a secure call


Before making a call to protect a buffer, we need to ensure
there are no outstanding mappings. If the buffers are in
highmem, there may be mappings left over from old kmap calls.
Call the appropriate APIs to remove the extra mappings before
making a secure call.

Change-Id: I8f573fbfa2b2ca1b40ad5ca4eab79d916d3b00ee
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
parent 7edd2d22
Branches
Tags
No related merge requests found
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/memory_alloc.h> #include <linux/memory_alloc.h>
#include <linux/types.h> #include <linux/types.h>
#include <mach/scm.h> #include <mach/scm.h>
#include <linux/highmem.h>
#include "../ion_priv.h" #include "../ion_priv.h"
#include "ion_cp_common.h" #include "ion_cp_common.h"
...@@ -157,6 +158,8 @@ int ion_cp_change_chunks_state(unsigned long chunks, unsigned int nchunks, ...@@ -157,6 +158,8 @@ int ion_cp_change_chunks_state(unsigned long chunks, unsigned int nchunks,
request.chunks.chunk_list_size = nchunks; request.chunks.chunk_list_size = nchunks;
request.chunks.chunk_size = chunk_size; request.chunks.chunk_size = chunk_size;
kmap_flush_unused();
kmap_atomic_flush_unused();
return scm_call(SCM_SVC_MP, MEM_PROTECT_LOCK_ID2, return scm_call(SCM_SVC_MP, MEM_PROTECT_LOCK_ID2,
&request, sizeof(request), &resp, sizeof(resp)); &request, sizeof(request), &resp, sizeof(resp));
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment