[PATCH] perf/smmuv3: Allow sharing MMIO registers with the SMMU driver

Jean-Philippe Brucker jean-philippe at linaro.org
Wed May 20 12:44:13 UTC 2020


On Wed, May 20, 2020 at 01:24:53PM +0100, Will Deacon wrote:
> On Tue, Apr 21, 2020 at 05:57:46PM +0200, Jean-Philippe Brucker wrote:
> > Some Arm SMMUv3 implementations, for example Arm CoreLink MMU-600, embed
> > the PMCG registers into the SMMU MMIO regions. It currently causes probe
> > failure because the PMU and SMMU drivers request overlapping resources.
> > 
> > Avoid the conflict by calling devm_ioremap() directly from the PMU
> > driver. We loose some sanity-checking of the memory map provided by
> > firmware, which doesn't seem catastrophic.
> > 
> > Signed-off-by: Jean-Philippe Brucker <jean-philippe at linaro.org>
> > ---
> > 
> > So this is the simplest solution, and I don't think we're missing much
> > by skipping the resource reservation. I've also been exploring a more
> > complex approach [1] which has the SMMU driver perform resource
> > reservation on behalf of the PMU driver, but I'm not sure it's
> > necessary.
> > 
> > Please test, I've only tried the RevC FastModel using devicetree so far.
> > 
> > [1] https://jpbrucker.net/git/linux/log/?h=smmu/pmu
> > ---
> >  drivers/perf/arm_smmuv3_pmu.c | 28 +++++++++++++++++++++-------
> >  1 file changed, 21 insertions(+), 7 deletions(-)
> 
> Is this patch still needed? I can't quite follow from the discussion.

No, it is superseded by "[PATCH v2] iommu/arm-smmu-v3: Don't reserve
implementation defined register space" that you applied yesterday
(Thanks!)

Jean


More information about the iommu mailing list