x86, iommu: Utilize the IOMMU_INIT macros functionality.
commitee1f284f38c8dfcbc7b656915a039dde016de7d3
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 26 Aug 2010 17:58:05 +0000 (26 13:58 -0400)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 26 Aug 2010 22:14:52 +0000 (26 15:14 -0700)
treed89bc3d8bc153ca28e334ed991f0eaf8478b04c3
parent4db77ff3237a88ea74f691dd776e92b2f86a8f3f
x86, iommu: Utilize the IOMMU_INIT macros functionality.

We remove all of the sub-platform detection/init routines and instead
use on the .iommu_table array of structs to call the .early_init if
.detect returned a positive value. Also we can stop detecting other
IOMMUs if the IOMMU used the _FINISH type macro. During the
'pci_iommu_init' stage, we call .init for the second-stage
initialization if it was defined. Currently only SWIOTLB has this
defined and it used to de-allocate the SWIOTLB if the other detected
IOMMUs have deemed it unnecessary to use SWIOTLB.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
LKML-Reference: <1282845485-8991-11-git-send-email-konrad.wilk@oracle.com>
CC: Fujita Tomonori <fujita.tomonori@lab.ntt.co.jp>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ingo Molnar <mingo@redhat.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/kernel/pci-dma.c