From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Cc: sboyd@codeaurora.org, agross@codeaurora.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH v6 1/4] firmware: scm: Add new SCM call API for switching memory ownership
Date: Mon, 10 Jul 2017 16:43:35 -0700 [thread overview]
Message-ID: <20170710234335.GF1618@tuxbook> (raw)
In-Reply-To: <1498133333-21291-2-git-send-email-akdwived@codeaurora.org>
On Thu 22 Jun 05:08 PDT 2017, Avaneesh Kumar Dwivedi wrote:
> Two different processors on a SOC need to switch memory ownership
> during load/unload. To enable this, second level memory map table
> need to be updated, which is done by secure layer.
> This patch adds the interface for making secure monitor call for
> memory ownership switching request.
>
> Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
> ---
> drivers/firmware/qcom_scm-32.c | 6 +++
> drivers/firmware/qcom_scm-64.c | 27 +++++++++++++
> drivers/firmware/qcom_scm.c | 92 ++++++++++++++++++++++++++++++++++++++++++
> drivers/firmware/qcom_scm.h | 5 +++
> include/linux/qcom_scm.h | 16 ++++++++
> 5 files changed, 146 insertions(+)
>
> diff --git a/drivers/firmware/qcom_scm-32.c b/drivers/firmware/qcom_scm-32.c
> index 93e3b96..a5e038d 100644
> --- a/drivers/firmware/qcom_scm-32.c
> +++ b/drivers/firmware/qcom_scm-32.c
> @@ -596,3 +596,9 @@ int __qcom_scm_iommu_secure_ptbl_init(struct device *dev, u64 addr, u32 size,
> {
> return -ENODEV;
> }
> +int __qcom_scm_assign_mem(struct device *dev, phys_addr_t mem_region,
> + size_t mem_sz, phys_addr_t src, size_t src_sz,
> + phys_addr_t dest, size_t dest_sz)
> +{
> + return -ENODEV;
> +}
> diff --git a/drivers/firmware/qcom_scm-64.c b/drivers/firmware/qcom_scm-64.c
> index 6e6d561..cdfe986 100644
> --- a/drivers/firmware/qcom_scm-64.c
> +++ b/drivers/firmware/qcom_scm-64.c
> @@ -439,3 +439,30 @@ int __qcom_scm_iommu_secure_ptbl_init(struct device *dev, u64 addr, u32 size,
>
> return ret;
> }
> +
> +int __qcom_scm_assign_mem(struct device *dev, phys_addr_t mem_region,
> + size_t mem_sz, phys_addr_t src, size_t src_sz,
> + phys_addr_t dest, size_t dest_sz)
> +{
> + int ret;
> + struct qcom_scm_desc desc = {0};
> + struct arm_smccc_res res;
> +
> + desc.args[0] = mem_region;
> + desc.args[1] = mem_sz;
> + desc.args[2] = src;
> + desc.args[3] = src_sz;
> + desc.args[4] = dest;
> + desc.args[5] = dest_sz;
> + desc.args[6] = 0;
> +
> + desc.arginfo = QCOM_SCM_ARGS(7, QCOM_SCM_RO, QCOM_SCM_VAL,
> + QCOM_SCM_RO, QCOM_SCM_VAL, QCOM_SCM_RO,
> + QCOM_SCM_VAL, QCOM_SCM_VAL);
> +
> + ret = qcom_scm_call(dev, QCOM_SCM_SVC_MP,
> + QCOM_MEM_PROT_ASSIGN_ID,
> + &desc, &res);
Please indent broken lines by the start parenthesis, throughout the
patch, this makes the code easier to read. You can run checkpatch.pl
with the --strict flag to show a few other places below that has the
same issue.
Please clean these up together with the dma allocation and the return
value as pointed out by Stephen and I'm happy to pick the series up.
Regards,
Bjorn
next prev parent reply other threads:[~2017-07-10 23:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 12:08 [PATCH v6 0/4] Add memory ownership switch support and enable mss rproc on msm8996 Avaneesh Kumar Dwivedi
2017-06-22 12:08 ` [PATCH v6 1/4] firmware: scm: Add new SCM call API for switching memory ownership Avaneesh Kumar Dwivedi
2017-07-07 22:49 ` Stephen Boyd
2017-07-10 23:31 ` Bjorn Andersson
2017-07-12 11:03 ` Dwivedi, Avaneesh Kumar (avani)
2017-07-12 19:19 ` Bjorn Andersson
2017-07-13 5:54 ` Stephen Boyd
2017-07-13 7:33 ` Dwivedi, Avaneesh Kumar (avani)
2017-07-13 7:54 ` Stephen Boyd
2017-07-10 23:43 ` Bjorn Andersson [this message]
2017-07-12 11:04 ` Dwivedi, Avaneesh Kumar (avani)
2017-06-22 12:08 ` [PATCH v6 2/4] remoteproc: qcom: refactor mss fw image loading sequence Avaneesh Kumar Dwivedi
2017-06-22 12:08 ` [PATCH v6 3/4] remoteproc: qcom: Make secure world call for mem ownership switch Avaneesh Kumar Dwivedi
2017-06-22 12:08 ` [PATCH v6 4/4] remoteproc: qcom: Add support for mss remoteproc on msm8996 Avaneesh Kumar Dwivedi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170710234335.GF1618@tuxbook \
--to=bjorn.andersson@linaro.org \
--cc=agross@codeaurora.org \
--cc=akdwived@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=sboyd@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).