mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugues FRUCHET <hugues.fruchet@st.com>
To: Loic PALLARDY <loic.pallardy@st.com>,
	"bjorn.andersson@linaro.org" <bjorn.andersson@linaro.org>,
	"ohad@wizery.com" <ohad@wizery.com>,
	"lee.jones@linaro.org" <lee.jones@linaro.org>
Cc: "linux-remoteproc@vger.kernel.org"
	<linux-remoteproc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kernel@stlinux.com" <kernel@stlinux.com>,
	Patrice CHOTARD <patrice.chotard@st.com>,
	"peter.griffin@linaro.org" <peter.griffin@linaro.org>
Subject: Re: [v3, 4/4] remoteproc: core: don't allocate carveout if pa or da are defined
Date: Wed, 8 Feb 2017 09:00:53 +0000	[thread overview]
Message-ID: <2412fafd-6544-1d62-a8c6-5162d2d8cfb4@st.com> (raw)
In-Reply-To: <1485866156-6364-5-git-send-email-loic.pallardy@st.com>



On 01/31/2017 01:35 PM, Loic PALLARDY wrote:
> Remoteproc doesn't check if firmware requests fixed
> addresses for carveout regions.
> Current assumption is that platform specific driver is in
> charge of coprocessor specific memory region allocation and
> remoteproc core doesn't have to handle them.
> If a da or a pa is specified in firmware resource table, remoteproc
> core doesn't have to perform any allocation.
> Access to carveout will be done thanks to rproc_da_to_pa function,
> which will provide virtual address on carveout region allocated
> by platform specific driver.
>
> Signed-off-by: Loic Pallardy <loic.pallardy@st.com>

Acked-and-tested-by: Hugues Fruchet <hugues.fruchet@st.com>

Tested on B2260 ST Platform with st-delta video decoder V4L2 kernel 
driver 
(http://www.mail-archive.com/linux-media@vger.kernel.org/msg107644.html).

> ---
> No change since V1
>
>  drivers/remoteproc/remoteproc_core.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> index 90b05c7..dd63ceed 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -622,6 +622,11 @@ static int rproc_handle_carveout(struct rproc *rproc,
>  	dev_dbg(dev, "carveout rsc: name: %s, da 0x%x, pa 0x%x, len 0x%x, flags 0x%x\n",
>  		rsc->name, rsc->da, rsc->pa, rsc->len, rsc->flags);
>
> +	if (rsc->pa != FW_RSC_ADDR_ANY || rsc->da != FW_RSC_ADDR_ANY) {
> +		dev_dbg(dev, "carveout already allocated by low level driver\n");
> +		return 0;
> +	}
> +
>  	carveout = kzalloc(sizeof(*carveout), GFP_KERNEL);
>  	if (!carveout)
>  		return -ENOMEM;
>
>

  reply	other threads:[~2017-02-08  9:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 12:35 [PATCH v3 0/4] remoteproc: st: add virtio_rpmsg support Loic Pallardy
2017-01-31 12:35 ` [PATCH v3 1/4] remoteproc: st: correct probe error management Loic Pallardy
2017-02-06 21:19   ` Bjorn Andersson
2017-02-07 22:20     ` Loic PALLARDY
2017-01-31 12:35 ` [PATCH v3 2/4] remoteproc: st: add virtio communication support Loic Pallardy
2017-01-31 12:35 ` [PATCH v3 3/4] remoteproc: st: add da to va support Loic Pallardy
2017-02-08  9:00   ` [v3,3/4] " Hugues FRUCHET
2017-01-31 12:35 ` [PATCH v3 4/4] remoteproc: core: don't allocate carveout if pa or da are defined Loic Pallardy
2017-02-08  9:00   ` Hugues FRUCHET [this message]
2017-02-09  1:55   ` Bjorn Andersson
2017-02-09 21:34     ` Loic PALLARDY

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=2412fafd-6544-1d62-a8c6-5162d2d8cfb4@st.com \
    --to=hugues.fruchet@st.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=kernel@stlinux.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=loic.pallardy@st.com \
    --cc=ohad@wizery.com \
    --cc=patrice.chotard@st.com \
    --cc=peter.griffin@linaro.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

all inboxes | Powered by JetHome®