History log of /drivers/iommu/amd_iommu_init.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7b9f477f5188e237f52c8a1243fd55615c63064f 06-Jun-2012 Shuah Khan <shuah.khan@hp.com> iommu/amd: Fix missing iommu_shutdown initialization in passthrough mode

commit f2f12b6fc032c7b1419fd6db84e2868b5f05a878 upstream.

The iommu_shutdown callback is not initialized when the AMD
IOMMU driver runs in passthrough mode. Fix that by moving
the callback initialization before the check for
passthrough mode.

Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/drivers/iommu/amd_iommu_init.c
98e69566e80c4de231456dbf4e6735ddfeb599db 31-May-2012 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Cache pdev pointer to root-bridge

commit c1bf94ec1e12d76838ad485158aecf208ebd8fb9 upstream.

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.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/drivers/iommu/amd_iommu_init.c
7de473066f1512e52ea806e3c9698e5ea325b26c 22-Mar-2012 Joerg Roedel <joro@8bytes.org> Merge branches 'iommu/fixes', 'arm/tegra' and 'x86/amd' into next
ae295142d2d3989e49c6425c90d2593732a068a1 16-Mar-2012 Gerard Snitselaar <dev@snitselaar.org> iommu/amd: Fix section mismatch

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>
/drivers/iommu/amd_iommu_init.c
3d9761e7a55b429ccee305a53669577b9cc20dac 15-Mar-2012 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Move interrupt setup code into seperate function

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>
/drivers/iommu/amd_iommu_init.c
9ddd592a191b32f2ee6c4b6ed2bd52665c3a49f5 15-Mar-2012 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Make sure IOMMU interrupts are re-enabled on resume

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>
/drivers/iommu/amd_iommu_init.c
6e930045abe51013ee3b47eaeb5aef4bc5a35218 09-Mar-2012 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Fix double free of mem-region in error-path

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>
/drivers/iommu/amd_iommu_init.c
6b7f000eb6a0b81d7a809833edb7a457eedf8512 08-Mar-2012 Jan Beulich <JBeulich@suse.com> x86/amd: iommu_set_device_table() must not be __init

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>
/drivers/iommu/amd_iommu_init.c
8704a1ba4751fc5ffe2289765cb7222b3a1e20d5 01-Mar-2012 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Split amd_iommu_init function

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>
/drivers/iommu/amd_iommu_init.c
1456e9d2c4667a6e9221eda27b9648fb3bcc1e8e 22-Dec-2011 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Set IOTLB invalidation timeout

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>
/drivers/iommu/amd_iommu_init.c
31342b58b72b2b8480f12ffee648c8ba3297dee1 22-Dec-2011 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Remove unnecessary cache flushes in amd_iommu_resume

The caches are already flushed in enable_iommus(), so this
flush is not necessary.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
/drivers/iommu/amd_iommu_init.c
52815b75682e25db45545911fd2b09ef5856e695 17-Nov-2011 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Add support for IOMMUv2 domain mode

This patch adds support for protection domains that
implement two-level paging for devices.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
/drivers/iommu/amd_iommu_init.c
5abcdba4fa535c29f736455e37229ee97e0e7f5d 01-Dec-2011 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Put IOMMUv2 capable devices in pt_domain

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>
/drivers/iommu/amd_iommu_init.c
400a28a05f2cc1a311acb4ff6ac64d8402d21678 28-Nov-2011 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Add iommuv2 flag to struct amd_iommu

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>
/drivers/iommu/amd_iommu_init.c
cbc33a9085995e21f52a66380d108d64916b6787 25-Nov-2011 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Enable GT mode when supported by IOMMU

This feature needs to be enabled before IOMMUv2 DTEs can be
set up.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
/drivers/iommu/amd_iommu_init.c
1a29ac014a68e5da8f96d5d8d142b5956eb00b7c 10-Nov-2011 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Setup PPR log when supported by IOMMU

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>
/drivers/iommu/amd_iommu_init.c
62f71abbc64d686064a4caa10a3249c26776995e 10-Nov-2011 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Get the maximum number of PASIDs supported

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>
/drivers/iommu/amd_iommu_init.c
ee6c28684585a64fd79c5a56e849af58ebdc5948 09-Nov-2011 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Convert dev_table_entry to u64

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>
/drivers/iommu/amd_iommu_init.c
403f81d8ee532c976d50a5e1051f14ec78ae8db3 14-Jun-2011 Joerg Roedel <joerg.roedel@amd.com> iommu/amd: Move missing parts to drivers/iommu

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>
/drivers/iommu/amd_iommu_init.c