[PATCH] perf/smmuv3: Allow sharing MMIO registers with the SMMU driver
will at kernel.org
Wed May 20 12:24:53 UTC 2020
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  which has the SMMU driver perform resource
> reservation on behalf of the PMU driver, but I'm not sure it's
> Please test, I've only tried the RevC FastModel using devicetree so far.
>  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.
More information about the iommu