iommu/arm-smmu-v3: Don't reserve implementation defined register space
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Wed, 13 May 2020 11:02:57 +0000 (13:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:49 +0000 (17:48 +0200)
commit4eef09f864507df9c412331159f2e6e0281c628f
treec7d72cbfdb2a920c817036143922c0285d2dc731
parentdb51ebc09cc4ffb353c533e3b1979aab67128363
iommu/arm-smmu-v3: Don't reserve implementation defined register space

[ Upstream commit 52f3fab0067d6fa9e99c1b7f63265dd48ca76046 ]

Some SMMUv3 implementation embed the Perf Monitor Group Registers (PMCG)
inside the first 64kB region of the SMMU. Since PMCG are managed by a
separate driver, this layout causes resource reservation conflicts
during boot.

To avoid this conflict, don't reserve the MMIO regions that are
implementation defined. Although devm_ioremap_resource() still works on
full pages under the hood, this way we benefit from resource conflict
checks.

Fixes: 7d839b4b9e00 ("perf/smmuv3: Add arm64 smmuv3 pmu driver")
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20200513110255.597203-1-jean-philippe@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/arm-smmu-v3.c