From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: Tuan Phan <tuanphan@amperemail.onmicrosoft.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Will Deacon <will@kernel.org>,
iommu@lists.linux-foundation.org, robin.murphy@arm.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] perf/smmuv3: Allow sharing MMIO registers with the SMMU driver
Date: Wed, 6 May 2020 18:11:12 +0200 [thread overview]
Message-ID: <20200506161112.GA1197429@myrica> (raw)
In-Reply-To: <D4FCF21C-D514-44F0-82CF-4932C704117B@amperemail.onmicrosoft.com>
On Wed, Apr 29, 2020 at 11:01:05AM -0700, Tuan Phan wrote:
>
>
> > On Apr 29, 2020, at 12:21 AM, Jean-Philippe Brucker <jean-philippe@linaro.org> wrote:
> >
> > On Tue, Apr 28, 2020 at 11:10:09AM -0700, Tuan Phan wrote:
> >> I tested this patch on HW, however I need to add one more following change to make it works
> >
> > Thanks for testing. I don't understand why you need the change below
> > though, do you know which other region is conflicting with the SMMU?
> > It should be displayed in the error message and /proc/iomem.
> >
> > Thanks,
> > Jean
>
> The error if I don’t apply that patch:
> [ 4.943655] arm-smmu-v3 arm-smmu-v3.0.auto: can't request region for resource [mem 0x3bffe0000000-0x3bffe001ffff]
>
> The output of /proc/iomem for that region:
> 3bffe0000000-3bffe001ffff : arm-smmu-v3.0.auto
> 3bffe0002000-3bffe0002fff : arm-smmu-v3-pmcg.17.auto
> 3bffe0012000-3bffe0012fff : arm-smmu-v3-pmcg.17.auto
Thanks for this. It looks like the regions are added to the resource tree
twice, when booting with ACPI:
When the IORT creates the platform devices, platform_device_add() inserts
these resources but doesn't mark them busy. As I was testing with
devicetree I was missing this step.
Then the SMMU probe calls devm_ioremap_resource(), which tries to reserve
the resources and mark them busy this time. If there only was the non-busy
SMMU region inserted above, then __request_region() would adds the
reserved region as a child. However since there are smaller PMCG regions
as children of the SMMU region, __request_region() fails.
Another idea is to avoid mapping the IMPDEF registers in the SMMU driver.
I think it's nicer, and I'll post that patch shortly.
Thanks,
Jean
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2020-05-06 16:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 15:57 [PATCH] perf/smmuv3: Allow sharing MMIO registers with the SMMU driver Jean-Philippe Brucker
2020-04-21 17:25 ` Robin Murphy
2020-04-28 18:10 ` Tuan Phan
2020-04-29 7:21 ` Jean-Philippe Brucker
2020-04-29 18:01 ` Tuan Phan
2020-05-06 16:11 ` Jean-Philippe Brucker [this message]
2020-05-20 12:24 ` Will Deacon
2020-05-20 12:44 ` Jean-Philippe Brucker
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=20200506161112.GA1197429@myrica \
--to=jean-philippe@linaro.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=robin.murphy@arm.com \
--cc=tuanphan@amperemail.onmicrosoft.com \
--cc=will@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