mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: "Rob Herring (Arm)" <robh@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: "André Apitzsch" <git@apitzsch.eu>,
	linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remoteproc: qcom_wcnss: Fix reserved region mapping failure
Date: Tue, 10 Feb 2026 11:05:57 +0100	[thread overview]
Message-ID: <871063b3-6293-4b62-b9a0-e637fac5dd27@samsung.com> (raw)
In-Reply-To: <20260128220243.3018526-1-robh@kernel.org>

On 28.01.2026 23:02, Rob Herring (Arm) wrote:
> Commit c70b9d5fdcd7 ("remoteproc: qcom: Use of_reserved_mem_region_*
> functions for "memory-region"") switched from devm_ioremap_wc() to
> devm_ioremap_resource_wc(). The difference is devm_ioremap_resource_wc()
> also requests the resource which fails. Testing of both fixed and
> dynamic reserved regions indicates that requesting the resource should
> work, so I'm not sure why it doesn't work in this case. Fix the issue by
> reverting back to devm_ioremap_wc().
>
> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Reported-by: André Apitzsch <git@apitzsch.eu>
> Fixes: c70b9d5fdcd7 ("remoteproc: qcom: Use of_reserved_mem_region_* functions for "memory-region"")
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> I created some dummy regions matching the flags used here and did
> request_mem_region() on them successfully, so I'm not sure why it
> doesn't work for this driver. Something else is requesting the region?
>
> Perhaps there's a deferred probe and somehow request_mem_region() is not
> getting undone correctly?

I didn't manage to track what is the root cause of the 
request_mem_region() failure, but this is definitely not related to 
deferred probe. This function is called only once from the qcom_wcnss 
driver and fails, because the region is already assigned to 'reserved' 
owner.

> ---
>   drivers/remoteproc/qcom_wcnss.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
> index ee18bf2e8054..4add9037dbd5 100644
> --- a/drivers/remoteproc/qcom_wcnss.c
> +++ b/drivers/remoteproc/qcom_wcnss.c
> @@ -537,7 +537,7 @@ static int wcnss_alloc_memory_region(struct qcom_wcnss *wcnss)
>   
>   	wcnss->mem_phys = wcnss->mem_reloc = res.start;
>   	wcnss->mem_size = resource_size(&res);
> -	wcnss->mem_region = devm_ioremap_resource_wc(wcnss->dev, &res);
> +	wcnss->mem_region = devm_ioremap_wc(wcnss->dev, wcnss->mem_phys, wcnss->mem_size);
>   	if (IS_ERR(wcnss->mem_region)) {
>   		dev_err(wcnss->dev, "unable to map memory region: %pR\n", &res);
>   		return PTR_ERR(wcnss->mem_region);

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


  parent reply	other threads:[~2026-02-10 10:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260128220305eucas1p23e47ba043c0314765ce41478b4b8a0d6@eucas1p2.samsung.com>
2026-01-28 22:02 ` Rob Herring (Arm)
2026-02-07 17:29   ` André Apitzsch
2026-02-10 10:05   ` Marek Szyprowski [this message]
2026-02-23 20:15   ` Bjorn Andersson

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=871063b3-6293-4b62-b9a0-e637fac5dd27@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=andersson@kernel.org \
    --cc=git@apitzsch.eu \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=robh@kernel.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®