]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more .27 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Nov 2009 21:48:22 +0000 (13:48 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Nov 2009 21:48:22 +0000 (13:48 -0800)
queue-2.6.27/series
queue-2.6.27/x86-amd-iommu-un__init-function-required-on-shutdown.patch [new file with mode: 0644]
queue-2.6.27/x86-amd-iommu-workaround-for-erratum-63.patch [new file with mode: 0644]

index 0fb8d9940b8bca1bb25064b6e761d0c24e6d90e8..b3e9d22ee0e8710e6a4f925fbba6160b50531c3b 100644 (file)
@@ -26,3 +26,5 @@ nfsv4-fix-a-problem-whereby-a-buggy-server-can-oops-the-kernel.patch
 nfsv4-the-link-operation-should-return-any-delegation-on-the-file.patch
 printk-robustify-printk.patch
 bonding-fix-a-race-condition-in-calls-to-slave-mii-ioctls.patch
+x86-amd-iommu-un__init-function-required-on-shutdown.patch
+x86-amd-iommu-workaround-for-erratum-63.patch
diff --git a/queue-2.6.27/x86-amd-iommu-un__init-function-required-on-shutdown.patch b/queue-2.6.27/x86-amd-iommu-un__init-function-required-on-shutdown.patch
new file mode 100644 (file)
index 0000000..9c1af2a
--- /dev/null
@@ -0,0 +1,32 @@
+From ca0207114f1708b563f510b7781a360ec5b98359 Mon Sep 17 00:00:00 2001
+From: Joerg Roedel <joerg.roedel@amd.com>
+Date: Wed, 28 Oct 2009 18:02:26 +0100
+Subject: x86/amd-iommu: Un__init function required on shutdown
+
+From: Joerg Roedel <joerg.roedel@amd.com>
+
+commit ca0207114f1708b563f510b7781a360ec5b98359 upstream.
+
+The function iommu_feature_disable is required on system
+shutdown to disable the IOMMU but it is marked as __init.
+This may result in a panic if the memory is reused. This
+patch fixes this bug.
+
+Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/amd_iommu_init.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/kernel/amd_iommu_init.c
++++ b/arch/x86/kernel/amd_iommu_init.c
+@@ -230,7 +230,7 @@ static void __init iommu_feature_enable(
+       writel(ctrl, iommu->mmio_base + MMIO_CONTROL_OFFSET);
+ }
+-static void __init iommu_feature_disable(struct amd_iommu *iommu, u8 bit)
++static void iommu_feature_disable(struct amd_iommu *iommu, u8 bit)
+ {
+       u32 ctrl;
diff --git a/queue-2.6.27/x86-amd-iommu-workaround-for-erratum-63.patch b/queue-2.6.27/x86-amd-iommu-workaround-for-erratum-63.patch
new file mode 100644 (file)
index 0000000..aae1092
--- /dev/null
@@ -0,0 +1,67 @@
+From joerg.roedel@amd.com  Fri Nov  6 13:43:27 2009
+From: Joerg Roedel <joerg.roedel@amd.com>
+Date: Fri, 6 Nov 2009 11:50:26 +0100
+Subject: x86/amd-iommu: Workaround for erratum 63
+To: Greg KH <greg@kroah.com>
+Message-ID: <20091106105026.GD2799@amd.com>
+Content-Disposition: inline
+
+From: Joerg Roedel <joerg.roedel@amd.com>
+
+commit c5cca146aa03e1f60fb179df65f0dbaf17bc64ed upstream.
+
+There is an erratum for IOMMU hardware which documents
+undefined behavior when forwarding SMI requests from
+peripherals and the DTE of that peripheral has a sysmgt
+value of 01b. This problem caused weird IO_PAGE_FAULTS in my
+case.
+This patch implements the suggested workaround for that
+erratum into the AMD IOMMU driver.  The erratum is
+documented with number 63.
+
+Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/amd_iommu_init.c |   23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+--- a/arch/x86/kernel/amd_iommu_init.c
++++ b/arch/x86/kernel/amd_iommu_init.c
+@@ -430,6 +430,27 @@ static void set_dev_entry_bit(u16 devid,
+       amd_iommu_dev_table[devid].data[i] |= (1 << _bit);
+ }
++static int get_dev_entry_bit(u16 devid, u8 bit)
++{
++      int i = (bit >> 5) & 0x07;
++      int _bit = bit & 0x1f;
++
++      return (amd_iommu_dev_table[devid].data[i] & (1 << _bit)) >> _bit;
++}
++
++
++void amd_iommu_apply_erratum_63(u16 devid)
++{
++      int sysmgt;
++
++      sysmgt = get_dev_entry_bit(devid, DEV_ENTRY_SYSMGT1) |
++              (get_dev_entry_bit(devid, DEV_ENTRY_SYSMGT2) << 1);
++
++      if (sysmgt == 0x01)
++              set_dev_entry_bit(devid, DEV_ENTRY_IW);
++}
++
++
+ /* Writes the specific IOMMU for a device into the rlookup table */
+ static void __init set_iommu_for_device(struct amd_iommu *iommu, u16 devid)
+ {
+@@ -458,6 +479,8 @@ static void __init set_dev_entry_from_ac
+       if (flags & ACPI_DEVFLAG_LINT1)
+               set_dev_entry_bit(devid, DEV_ENTRY_LINT1_PASS);
++      amd_iommu_apply_erratum_63(devid);
++
+       set_iommu_for_device(iommu, devid);
+ }