1
0
Fork 0
alistair23-linux/drivers/iommu
Jiang Liu 947045a2aa irq_remapping: Introduce new interfaces to support hierarchical irqdomains
Introduce new interfaces for interrupt remapping drivers to support
hierarchical irqdomains:

1) irq_remapping_get_ir_irq_domain(): get irqdomain associated with an
   interrupt remapping unit. IOAPIC/HPET drivers use this interface to
   get parent interrupt remapping irqdomain.

2) irq_remapping_get_irq_domain(): get irqdomain for an IRQ allocation.
   This is mainly used to support MSI irqdomain. We must build one MSI
   irqdomain for each interrupt remapping unit. MSI driver calls this
   interface to get MSI irqdomain associated with an IR irqdomain which
   manages the PCI devices. In a further step we will store the irqdomain
   pointer in the device struct to avoid this call in the irq allocation
   path.

Architecture specific hooks:
1) arch_get_ir_parent_domain(): get parent irqdomain for IR irqdomain,
   which is x86_vector_domain on x86 platforms.
2) arch_create_msi_irq_domain(): create an MSI irqdomain associated with
   the interrupt remapping unit.

We also add following callbacks into struct irq_remap_ops:
	struct irq_domain *(*get_ir_irq_domain)(struct irq_alloc_info *);
	struct irq_domain *(*get_irq_domain)(struct irq_alloc_info *);

Once all clients of IR have been converted to the new hierarchical irqdomain
interfaces, we will:
1) Remove set_ioapic_entry, set_affinity, free_irq, compose_msi_msg,
   msi_alloc_irq, msi_setup_irq, setup_hpet_msi from struct remap_osp
2) Remove setup_ioapic_remapped_entry, free_remapped_irq,
   compose_remapped_msi_msg, setup_hpet_msi_remapped, setup_remapped_irq.
3) Simplify x86_io_apic_ops and x86_msi.

We can achieve a way clearer architecture with all these changes
applied.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Acked-by: Joerg Roedel <jroedel@suse.de>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David Cohen <david.a.cohen@linux.intel.com>
Cc: Sander Eikelenboom <linux@eikelenboom.it>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: iommu@lists.linux-foundation.org
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Cc: Joerg Roedel <joro@8bytes.org>
Link: http://lkml.kernel.org/r/1428905519-23704-9-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2015-04-24 15:36:48 +02:00
..
Kconfig iommu/io-pgtable-arm: Add built time dependency 2015-03-03 14:04:12 +01:00
Makefile Merge branches 'arm/renesas', 'arm/smmu', 'arm/omap', 'ppc/pamu', 'x86/amd' and 'core' into next 2015-02-04 16:53:44 +01:00
amd_iommu.c Merge branches 'iommu/fixes', 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/tegra' and 'core' into next 2015-04-02 13:33:19 +02:00
amd_iommu_init.c IOMMU Updates for Linux v3.20 2015-02-12 09:16:56 -08:00
amd_iommu_proto.h IOMMU Updates for Linux v3.20 2015-02-12 09:16:56 -08:00
amd_iommu_types.h Merge branches 'iommu/fixes', 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/tegra' and 'core' into next 2015-04-02 13:33:19 +02:00
amd_iommu_v2.c iommu/amd: Small cleanup in mn_release() 2015-03-04 12:58:59 +01:00
arm-smmu.c Merge branches 'iommu/fixes', 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/tegra' and 'core' into next 2015-04-02 13:33:19 +02:00
dmar.c iommu/vt-d: Search for ACPI _DSM method for DMAR hotplug 2014-11-18 11:18:36 +01:00
exynos-iommu.c iommu/exynos: Make use of domain_alloc and domain_free 2015-03-31 15:32:11 +02:00
fsl_pamu.c iommu/fsl: Various cleanups 2015-02-03 18:47:18 +01:00
fsl_pamu.h iommu/fsl: Various cleanups 2015-02-03 18:47:18 +01:00
fsl_pamu_domain.c iommu/fsl: Make use of domain_alloc and domain_free 2015-03-31 15:32:14 +02:00
fsl_pamu_domain.h iommu/fsl: Make use of domain_alloc and domain_free 2015-03-31 15:32:14 +02:00
intel-iommu.c IOMMU Updates for Linux v4.1 2015-04-20 10:50:05 -07:00
intel_irq_remapping.c iommu/vt-d: Convert non-returned local variable to boolean when relevant 2015-03-03 14:13:20 +01:00
io-pgtable-arm.c iommu/io-pgtable-arm: avoid speculative walks through TTBR1 2015-03-27 13:39:36 +00:00
io-pgtable.c iommu: add ARM LPAE page table allocator 2015-01-19 14:46:44 +00:00
io-pgtable.h iommu: io-pgtable-arm: add non-secure quirk 2015-01-19 14:46:45 +00:00
iommu-sysfs.c iommu: Fix compile error in iommu-sysfs.c 2014-07-07 12:01:21 +02:00
iommu-traces.c iommu: Add iommu_error class event to iommu trace 2013-09-25 11:07:04 +02:00
iommu.c iommu: Remove domain_init and domain_free iommu_ops 2015-03-31 15:32:16 +02:00
iova.c iommu: Make IOVA domain page size explicit 2015-01-19 14:55:22 +01:00
ipmmu-vmsa.c Merge branches 'iommu/fixes', 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/tegra' and 'core' into next 2015-04-02 13:33:19 +02:00
irq_remapping.c irq_remapping: Introduce new interfaces to support hierarchical irqdomains 2015-04-24 15:36:48 +02:00
irq_remapping.h irq_remapping: Introduce new interfaces to support hierarchical irqdomains 2015-04-24 15:36:48 +02:00
msm_iommu.c iommu/msm: Make use of domain_alloc and domain_free 2015-03-31 15:32:12 +02:00
msm_iommu.h iommu/msm: Move mach includes to iommu directory 2013-08-06 11:18:03 -07:00
msm_iommu_dev.c iommu/msm: Use dev_get_platdata() 2014-11-04 15:03:39 +01:00
msm_iommu_hw-8xxx.h iommu/msm: Move mach includes to iommu directory 2013-08-06 11:18:03 -07:00
of_iommu.c of: iommu: Add ptr to OF node arg to of_iommu_configure() 2015-03-03 14:42:55 -06:00
omap-iommu-debug.c iommu/omap: Switch pagetable debugfs entry to use seq_file 2014-10-23 14:33:48 +02:00
omap-iommu.c iommu/omap: Make use of domain_alloc and domain_free 2015-03-31 15:32:02 +02:00
omap-iommu.h iommu/omap: Do not export unneeded functions 2014-10-23 14:33:47 +02:00
omap-iopgtable.h iommu/omap: Move to_iommu definition from omap-iopgtable.h 2014-04-16 16:30:15 +02:00
rockchip-iommu.c iommu/rockchip: Make use of domain_alloc and domain_free 2015-03-31 15:32:14 +02:00
shmobile-iommu.c iommu/shmobile: Make use of domain_alloc and domain_free 2015-03-31 15:32:13 +02:00
shmobile-ipmmu.c iommu: drop owner assignment from platform_drivers 2014-10-20 16:20:42 +02:00
shmobile-ipmmu.h iommu/shmobile: Turn the flush_lock mutex into a spinlock 2014-01-07 15:35:25 +01:00
tegra-gart.c Merge branches 'iommu/fixes', 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/tegra' and 'core' into next 2015-04-02 13:33:19 +02:00
tegra-smmu.c Merge branches 'iommu/fixes', 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/tegra' and 'core' into next 2015-04-02 13:33:19 +02:00