Re: [RFC PATCH] perf/smmuv3: Fix shared interrupt handling

From: John Garry
Date: Thu Apr 09 2020 - 03:02:48 EST


On 08/04/2020 17:49, Robin Murphy wrote:
IRQF_SHARED is dangerous, since it allows other agents to retarget the
IRQ's affinity without migrating PMU contexts to match, breaking the way
in which perf manages mutual exclusion for accessing events. Although
this means it's not realistically possible to support PMU IRQs being
shared with other drivers, we *can* handle sharing between multiple PMU
instances with some explicit affinity bookkeeping and manual interrupt
multiplexing.

Hi Robin,

Out of curiosity, do we even need to support shared interrupts for any implementations today?

D06 board:

john@ubuntu:~$ more /proc/interrupts | grep smmuv3-pmu

989: 0 0 0 0 ITS-pMSI 133120 Edge smmuv3-pmu
990: 0 0 0 0 ITS-pMSI 135168 Edge smmuv3-pmu
991: 0 0 0 0 ITS-pMSI 137216 Edge smmuv3-pmu
992: 0 0 0 0 ITS-pMSI 139264 Edge smmuv3-pmu
993: 0 0 0 0 ITS-pMSI 141312 Edge smmuv3-pmu
994: 0 0 0 0 ITS-pMSI 143360 Edge smmuv3-pmu
995: 0 0 0 0 ITS-pMSI 145408 Edge smmuv3-pmu
996: 0 0 0 0 ITS-pMSI 147456 Edge smmuv3-pmu

Thanks,
John