summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd_iommu_init.c
Commit message (Collapse)AuthorAgeFilesLines
* iommu/amd: Cache pdev pointer to root-bridgeJoerg Roedel2012-06-041-8/+5
| | | | | | | | | | | | At some point pci_get_bus_and_slot started to enable interrupts. Since this function is used in the amd_iommu_resume path it will enable interrupts on resume which causes a warning. The fix will use a cached pointer to the root-bridge to re-enable the IOMMU in case the BIOS is broken. Cc: stable@vger.kernel.org Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
*-. Merge branches 'iommu/fixes', 'arm/tegra' and 'x86/amd' into nextJoerg Roedel2012-03-221-64/+123
|\ \
| | * iommu/amd: Fix section mismatchGerard Snitselaar2012-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | amd_iommu_enable_interrupts() called in amd_iommu_resume(). Signed-off-by: Gerard Snitselaar <dev@snitselaar.org> Signed-off-by: Joerg Roedel <joro@8bytes.org>
| | * iommu/amd: Move interrupt setup code into seperate functionJoerg Roedel2012-03-151-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For interrupt remapping the enablement of the IOMMU MSI interrupt needs to be deferred because the IOMMU itself will be initialized before the io-apics are up and running. So the code to setup the MSI is moved seperated from the hardware-setup routine now. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * iommu/amd: Make sure IOMMU interrupts are re-enabled on resumeJoerg Roedel2012-03-151-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunatly the interrupts for the event log and the peripheral page-faults are only enabled at boot but not re-enabled at resume. Fix that. Cc: stable@vger.kernel.org Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * iommu/amd: Fix double free of mem-region in error-pathJoerg Roedel2012-03-091-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ioremap_nocache fails in iommu initialization the code calls release_mem_region immediatly. But the function is called again when the propagates into the upper init functions leading to a double-free. Fix that. Reported-by: Don Dutile <ddutile@redhat.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | * iommu/amd: Split amd_iommu_init functionJoerg Roedel2012-03-011-44/+79
| |/ | | | | | | | | | | | | | | | | | | The hardware-initializtion part of the AMD IOMMU driver is split out into a seperate function. This function can now be called either from amd_iommu_init() itself or any other place if the hardware needs to be ready earlier. This will be used to implement interrupt remapping for AMD. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* | x86/amd: iommu_set_device_table() must not be __initJan Beulich2012-03-081-1/+1
|/ | | | | | | | | This function is called from enable_iommus(), which in turn is used from amd_iommu_resume(). Cc: stable@vger.kernel.org Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu/amd: Set IOTLB invalidation timeoutJoerg Roedel2011-12-221-0/+13
| | | | | | | | To protect the command buffer from hanging when a device does not respond to an IOTLB invalidation, set a timeout of 1s for outstanding IOTLB invalidations. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu/amd: Remove unnecessary cache flushes in amd_iommu_resumeJoerg Roedel2011-12-221-7/+0
| | | | | | | The caches are already flushed in enable_iommus(), so this flush is not necessary. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu/amd: Add support for IOMMUv2 domain modeJoerg Roedel2011-12-121-0/+9
| | | | | | | This patch adds support for protection domains that implement two-level paging for devices. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu/amd: Put IOMMUv2 capable devices in pt_domainJoerg Roedel2011-12-121-0/+4
| | | | | | | | | | | If the device starts to use IOMMUv2 features the dma handles need to stay valid. The only sane way to do this is to use a identity mapping for the device and not translate it by the iommu. This is implemented with this patch. Since this lifts the device-isolation there is also a new kernel parameter which allows to disable that feature. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu/amd: Add iommuv2 flag to struct amd_iommuJoerg Roedel2011-12-121-0/+15
| | | | | | | | | | In mixed IOMMU setups this flag inidicates whether an IOMMU supports the v2 features or not. This patch also adds a global flag together with a function to query that flag from other code. The flag shows if at least one IOMMUv2 is in the system. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu/amd: Enable GT mode when supported by IOMMUJoerg Roedel2011-12-121-0/+9
| | | | | | | This feature needs to be enabled before IOMMUv2 DTEs can be set up. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu/amd: Setup PPR log when supported by IOMMUJoerg Roedel2011-12-121-0/+51
| | | | | | | Allocate and enable a log buffer for peripheral page faults when the IOMMU supports this feature. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu/amd: Get the maximum number of PASIDs supportedJoerg Roedel2011-12-121-0/+13
| | | | | | | | Read the number of PASIDs supported by each IOMMU in the system and take the smallest number as the maximum value supported by the IOMMU driver. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu/amd: Convert dev_table_entry to u64Joerg Roedel2011-12-121-6/+6
| | | | | | | | Convert the contents of 'struct dev_table_entry' to u64 to allow updating the DTE wit 64bit writes as required by the spec. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* iommu/amd: Move missing parts to drivers/iommuJoerg Roedel2011-06-211-0/+1574
A few parts of the driver were missing in drivers/iommu. Move them there to have the complete driver in that directory. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
OpenPOWER on IntegriCloud