Revert "msm: scm-pas: Provide a strongly ordered buffer to the secure world"
This reverts commit 10751a4a2d
.
Change-Id: I72377068d8b4407e374616ed2c4e4f33bf5d5c90
This commit is contained in:
parent
b4de5c870a
commit
af4859ba84
|
@ -16,7 +16,6 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include <mach/scm.h>
|
||||
#include <mach/socinfo.h>
|
||||
|
@ -37,28 +36,18 @@ int pas_init_image(enum pas_id id, const u8 *metadata, size_t size)
|
|||
u32 image_addr;
|
||||
} request;
|
||||
u32 scm_ret = 0;
|
||||
void *mdata_buf;
|
||||
dma_addr_t mdata_phys;
|
||||
DEFINE_DMA_ATTRS(attrs);
|
||||
/* Make memory physically contiguous */
|
||||
void *mdata_buf = kmemdup(metadata, size, GFP_KERNEL);
|
||||
|
||||
dma_set_attr(DMA_ATTR_STRONGLY_ORDERED, &attrs);
|
||||
mdata_buf = dma_alloc_attrs(NULL, size, &mdata_phys, GFP_KERNEL,
|
||||
&attrs);
|
||||
|
||||
if (!mdata_buf) {
|
||||
pr_err("Allocation for metadata failed.\n");
|
||||
if (!mdata_buf)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memcpy(mdata_buf, metadata, size);
|
||||
|
||||
request.proc = id;
|
||||
request.image_addr = mdata_phys;
|
||||
request.image_addr = virt_to_phys(mdata_buf);
|
||||
|
||||
ret = scm_call(SCM_SVC_PIL, PAS_INIT_IMAGE_CMD, &request,
|
||||
sizeof(request), &scm_ret, sizeof(scm_ret));
|
||||
|
||||
dma_free_attrs(NULL, size, mdata_buf, mdata_phys, &attrs);
|
||||
kfree(mdata_buf);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue