alistair23-linux/drivers/iommu
Suravee Suthikulpanit f5863a00e7 x86/events/amd/iommu.c: Modify functions to query max banks and counters
Currently, amd_iommu_pc_get_max_[banks|counters]() use end-point device
ID to locate an IOMMU and check the reported max banks/counters. The
logic assumes that the IOMMU_BASE_DEVID belongs to the first IOMMU, and
uses it to acquire a reference to the first IOMMU, which does not work
on certain systems. Instead, modify the function to take an IOMMU index,
and use it to query the corresponding AMD IOMMU instance.

Currently, hardcode the IOMMU index to 0 since the current AMD IOMMU
perf implementation supports only a single IOMMU. A subsequent patch
will add support for multiple IOMMUs, and will use a proper IOMMU index.

Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Jörg Rödel <joro@8bytes.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: iommu@lists.linux-foundation.org
Link: http://lkml.kernel.org/r/1487926102-13073-7-git-send-email-Suravee.Suthikulpanit@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-30 09:53:54 +02:00
..
amd_iommu.c x86/events, drivers/iommu/amd: Introduce amd_iommu_get_num_iommus() 2017-03-30 09:53:53 +02:00
amd_iommu_init.c x86/events/amd/iommu.c: Modify functions to query max banks and counters 2017-03-30 09:53:54 +02:00
amd_iommu_proto.h x86/events/amd/iommu.c: Modify functions to query max banks and counters 2017-03-30 09:53:54 +02:00
amd_iommu_types.h x86/events, drivers/iommu/amd: Introduce amd_iommu_get_num_iommus() 2017-03-30 09:53:53 +02:00
amd_iommu_v2.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/mm.h> 2017-03-02 08:42:28 +01:00
arm-smmu-v3.c iommu: Disambiguate MSI region types 2017-03-22 16:16:17 +01:00
arm-smmu.c iommu: Disambiguate MSI region types 2017-03-22 16:16:17 +01:00
dma-iommu.c iommu/dma: Remove bogus dma_supported() implementation 2017-02-06 13:14:10 +01:00
dmar.c iommu/vt-d: Fix crash on boot when DMAR is disabled 2017-02-22 12:25:31 +01:00
exynos-iommu.c iommu/exynos: Workaround FLPD cache flush issues for SYSMMU v5 2017-03-22 15:50:45 +01:00
fsl_pamu.c
fsl_pamu.h
fsl_pamu_domain.c
fsl_pamu_domain.h
intel-iommu.c iommu: Disambiguate MSI region types 2017-03-22 16:16:17 +01:00
intel-svm.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/mm.h> 2017-03-02 08:42:28 +01:00
intel_irq_remapping.c
io-pgtable-arm-v7s.c iommu/io-pgtable-arm-v7s: Check for leaf entry before dereferencing it 2017-03-10 18:23:34 +00:00
io-pgtable-arm.c iommu/io-pgtable-arm: Check for leaf entry before dereferencing it 2017-03-10 18:23:34 +00:00
io-pgtable.c
io-pgtable.h
iommu-sysfs.c iommu: Make iommu_device_link/unlink take a struct iommu_device 2017-02-10 13:44:57 +01:00
iommu-traces.c
iommu.c iommu: Disambiguate MSI region types 2017-03-22 16:16:17 +01:00
iova.c iommu/iova: Use rb_entry() 2017-01-04 15:35:19 +01:00
ipmmu-vmsa.c iommu/ipmmu-vmsa: Restrict IOMMU Domain Geometry to 32-bit address space 2017-02-06 13:09:43 +01:00
irq_remapping.c x86/cpufeature: Replace cpu_has_apic with boot_cpu_has() usage 2016-04-13 11:37:41 +02:00
irq_remapping.h
Kconfig iommu/mediatek: Remove bogus 'select' statements 2017-02-06 13:16:22 +01:00
Makefile Merge branches 'x86/amd', 'x86/vt-d', 'arm/exynos', 'arm/mediatek', 'arm/msm', 'arm/rockchip', 'arm/smmu' and 'core' into next 2016-07-26 16:02:37 +02:00
msm_iommu.c iommu: Remove iommu_register_instance interface 2017-02-10 14:54:37 +01:00
msm_iommu.h iommu/msm: Make use of iommu_device_register interface 2017-02-10 13:44:57 +01:00
msm_iommu_hw-8xxx.h
mtk_iommu.c iommu: Remove iommu_register_instance interface 2017-02-10 14:54:37 +01:00
mtk_iommu.h iommu/mediatek: Make use of iommu_device_register interface 2017-02-10 13:44:57 +01:00
mtk_iommu_v1.c Merge branches 'arm/mediatek', 'arm/smmu', 'x86/amd', 's390', 'core' and 'arm/exynos' into next 2016-12-06 17:32:16 +01:00
of_iommu.c Merge branches 'iommu/fixes', 'arm/exynos', 'arm/renesas', 'arm/smmu', 'arm/mediatek', 'arm/core', 'x86/vt-d' and 'core' into next 2017-02-10 15:13:10 +01:00
omap-iommu-debug.c
omap-iommu.c
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c iommu/rockchip: Prepare to support generic DMA mapping 2016-06-27 14:50:08 +02:00
s390-iommu.c iommu/s390: Drop duplicate header pci.h 2016-11-29 17:37:58 +01:00
tegra-gart.c
tegra-smmu.c