Open adamliyi opened 2 years ago
On 5.15.y, drop: https://github.com/AmpereComputing/ampere-lts-kernel/commit/56ca42aa518d063259f6bf44cb8b0f3acc859538
Rebase instead of revert, to keep the commit message clean.
drop 56ca42aa518d0 perf/smmuv3: Allow sharing MMIO registers with the SMMU driver
pick 322604bf5371b arm64: enable altra sensors and leds
On 5.4.y, revert https://github.com/AmpereComputing/ampere-lts-kernel/commit/779bed7502d9d2c77c3a70521d4baf9a3b8f4669: perf/smmuv3: Allow sharing MMIO registers with the SMMU driver
One remaining issue: Accessing SMMU PMU in overlapped region, looks does not work properly:
23ffe0000000-23ffe001ffff : arm-smmu-v3.2.auto
23ffe0000000-23ffe0000dff : arm-smmu-v3.2.auto
23ffe0002000-23ffe0002fff : arm-smmu-v3-pmcg.36.auto <---------------------------------- pmcg.36 in overlapped region
23ffe0002000-23ffe0002fff : arm-smmu-v3-pmcg.36.auto arm-smmu-v3-pmcg.36.auto
23ffe0010000-23ffe0010dff : arm-smmu-v3.2.auto
23ffe0012000-23ffe0012fff : arm-smmu-v3-pmcg.36.auto
23ffe0012000-23ffe0012fff : arm-smmu-v3-pmcg.36.auto arm-smmu-v3-pmcg.36.auto
23ffe0042000-23ffe0042fff : arm-smmu-v3-pmcg.26.auto <---------------- pmcg.26 NOT in overlapped region
23ffe0042000-23ffe0042fff : arm-smmu-v3-pmcg.26.auto arm-smmu-v3-pmcg.26.auto
# perf stat -e smmuv3_pmcg_23ffe0002/cycles/ -I 1000
# time counts unit events
1.001071197 2147483649 smmuv3_pmcg_23ffe0002/cycles/
2.002265879 0 smmuv3_pmcg_23ffe0002/cycles/ <--------- zero value
3.003336435 0 smmuv3_pmcg_23ffe0002/cycles/
# perf stat -e smmuv3_pmcg_23ffe0042/cycles/ -I 1000
# time counts unit events
1.001072197 500515065 smmuv3_pmcg_23ffe0042/cycles/
2.002267399 500576281 smmuv3_pmcg_23ffe0042/cycles/ <---------- expected non-zero value
3.003353396 500522773 smmuv3_pmcg_23ffe0042/cycles/
4.004435953 500521953 smmuv3_pmcg_23ffe0042/cycles/
In linux-5.4.y kernel, we backported two smmu related patches:
The purpose of these two patches are the same, some iomem region of SMMU and SMMU-PMU (i.e pmcg) overlapped:
if both smmuv3 driver and smmuv3-pmu try to request the overlapped region, there may be error message like
Since both patches tries to fix the same issue, we just need to keep the upstream backporting, i.e: 'iommu/arm-smmu-v3: Don't reserve implementation defined register space'