From: Zhen Lei <thunder.leizhen@huawei.com>
To: Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
"Mark Rutland" <mark.rutland@arm.com>,
Joerg Roedel <joro@8bytes.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
iommu <iommu@lists.linux-foundation.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Cc: Zhen Lei <thunder.leizhen@huawei.com>,
Jean-Philippe Brucker <jean-philippe@linaro.org>,
Neil Leeder <nleeder@codeaurora.org>,
"Shameer Kolothum" <shameerali.kolothum.thodi@huawei.com>
Subject: [PATCH 0/2] Use another method to avoid resource conflicts between the SMMU and PMCG drivers
Date: Tue, 19 Jan 2021 09:59:49 +0800 [thread overview]
Message-ID: <20210119015951.1042-1-thunder.leizhen@huawei.com> (raw)
Since the PMCG may implement its resigters space(4KB Page0 and 4KB Page1)
within the SMMUv3 64KB Page0. In this case, when the SMMUv3 driver reserves the
64KB Page0 resource in advance, the PMCG driver try to reserve its Page0 and
Page1 resources, a resource conflict occurs.
commit 52f3fab0067d6fa ("iommu/arm-smmu-v3: Don't reserve implementation
defined register space") reduce the resource reservation range of the SMMUv3
driver, it only reserves the first 0xe00 bytes in the 64KB Page0, to avoid
the above-mentioned resource conflicts.
But the SMMUv3.3 add support for ECMDQ, its registers space is also implemented
in the SMMUv3 64KB Page0. This means we need to build two separate mappings.
New features may be added in the future, and more independent mappings may be
required. The simple problem is complicated because the user expects to map the
entire SMMUv3 64KB Page0.
Therefore, the proper solution is: If the PMCG register resources are located in
the 64KB Page0 of the SMMU, the PMCG driver does not reserve the conflict resources
when the SMMUv3 driver has reserved the conflict resources before. Instead, the PMCG
driver only performs devm_ioremap() to ensure that it can work properly.
Zhen Lei (2):
perf/smmuv3: Don't reserve the register space that overlaps with the
SMMUv3
Revert "iommu/arm-smmu-v3: Don't reserve implementation defined
register space"
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 32 +++-------------------
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 3 ---
drivers/perf/arm_smmuv3_pmu.c | 42 +++++++++++++++++++++++++++--
3 files changed, 44 insertions(+), 33 deletions(-)
--
1.8.3
next reply other threads:[~2021-01-19 2:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 1:59 Zhen Lei [this message]
2021-01-19 1:59 ` [PATCH 1/2] perf/smmuv3: Don't reserve the register space that overlaps with the SMMUv3 Zhen Lei
2021-01-19 12:32 ` Robin Murphy
2021-01-20 3:37 ` Leizhen (ThunderTown)
2021-01-20 9:26 ` Leizhen (ThunderTown)
2021-01-20 13:27 ` Robin Murphy
2021-01-20 14:14 ` Leizhen (ThunderTown)
2021-01-20 15:54 ` Robin Murphy
2021-01-21 2:19 ` Leizhen (ThunderTown)
2021-01-19 1:59 ` [PATCH 2/2] Revert "iommu/arm-smmu-v3: Don't reserve implementation defined register space" Zhen Lei
2021-01-20 15:02 ` Robin Murphy
2021-01-21 2:04 ` Leizhen (ThunderTown)
2021-01-21 12:50 ` Robin Murphy
2021-01-22 2:50 ` Leizhen (ThunderTown)
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=20210119015951.1042-1-thunder.leizhen@huawei.com \
--to=thunder.leizhen@huawei.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jean-philippe@linaro.org \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=nleeder@codeaurora.org \
--cc=robin.murphy@arm.com \
--cc=shameerali.kolothum.thodi@huawei.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
all inboxes | Powered by JetHome®