From: Greg Kroah-Hartman Date: Tue, 19 Oct 2010 23:33:31 +0000 (-0700) Subject: .35 patches X-Git-Tag: v2.6.27.55~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8fbdb368125f8d1ef9df735a9c8b8b2dfdae5360;p=thirdparty%2Fkernel%2Fstable-queue.git .35 patches --- diff --git a/queue-2.6.35/i7core_edac-fix-panic-in-udimm-sysfs-attributes-registration.patch b/queue-2.6.35/i7core_edac-fix-panic-in-udimm-sysfs-attributes-registration.patch new file mode 100644 index 00000000000..3b2ce326768 --- /dev/null +++ b/queue-2.6.35/i7core_edac-fix-panic-in-udimm-sysfs-attributes-registration.patch @@ -0,0 +1,50 @@ +From 64aab720bdf8771214a7c88872bd8e3194c2d279 Mon Sep 17 00:00:00 2001 +From: Marcin Slusarz +Date: Thu, 30 Sep 2010 15:15:30 -0700 +Subject: i7core_edac: fix panic in udimm sysfs attributes registration + +From: Marcin Slusarz + +commit 64aab720bdf8771214a7c88872bd8e3194c2d279 upstream. + +Array of udimm sysfs attributes was not ended with NULL marker, leading to +dereference of random memory. + + EDAC DEBUG: edac_create_mci_instance_attributes: edac_create_mci_instance_attributes() file udimm0 + EDAC DEBUG: edac_create_mci_instance_attributes: edac_create_mci_instance_attributes() file udimm1 + EDAC DEBUG: edac_create_mci_instance_attributes: edac_create_mci_instance_attributes() file udimm2 + BUG: unable to handle kernel NULL pointer dereference at 00000000000001a4 + IP: [] edac_create_mci_instance_attributes+0x148/0x1f1 + Pid: 1, comm: swapper Not tainted 2.6.36-rc3-nv+ #483 P6T SE/System Product Name + RIP: 0010:[] [] edac_create_mci_instance_attributes+0x148/0x1f1 + (...) + Call Trace: + [] edac_create_mci_instance_attributes+0x198/0x1f1 + [] edac_create_sysfs_mci_device+0xbb/0x2b2 + [] edac_mc_add_mc+0x46b/0x557 + [] i7core_probe+0xccf/0xec0 + RIP [] edac_create_mci_instance_attributes+0x148/0x1f1 + ---[ end trace 20de320855b81d78 ]--- + Kernel panic - not syncing: Attempted to kill init! + +Signed-off-by: Marcin Slusarz +Cc: Mauro Carvalho Chehab +Acked-by: Doug Thompson +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/edac/i7core_edac.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/edac/i7core_edac.c ++++ b/drivers/edac/i7core_edac.c +@@ -1140,6 +1140,7 @@ static struct mcidev_sysfs_attribute i7c + ATTR_COUNTER(0), + ATTR_COUNTER(1), + ATTR_COUNTER(2), ++ { .attr = { .name = NULL } } + }; + + static struct mcidev_sysfs_group i7core_udimm_counters = { diff --git a/queue-2.6.35/ksm-fix-bad-user-data-when-swapping.patch b/queue-2.6.35/ksm-fix-bad-user-data-when-swapping.patch new file mode 100644 index 00000000000..2e326c51947 --- /dev/null +++ b/queue-2.6.35/ksm-fix-bad-user-data-when-swapping.patch @@ -0,0 +1,64 @@ +From 4e31635c367a9e21a43cfbfae4c9deda2e19d1f4 Mon Sep 17 00:00:00 2001 +From: Hugh Dickins +Date: Sat, 2 Oct 2010 17:49:08 -0700 +Subject: ksm: fix bad user data when swapping + +From: Hugh Dickins + +commit 4e31635c367a9e21a43cfbfae4c9deda2e19d1f4 upstream. + +Building under memory pressure, with KSM on 2.6.36-rc5, collapsed with +an internal compiler error: typically indicating an error in swapping. + +Perhaps there's a timing issue which makes it now more likely, perhaps +it's just a long time since I tried for so long: this bug goes back to +KSM swapping in 2.6.33. + +Notice how reuse_swap_page() allows an exclusive page to be reused, but +only does SetPageDirty if it can delete it from swap cache right then - +if it's currently under Writeback, it has to be left in cache and we +don't SetPageDirty, but the page can be reused. Fine, the dirty bit +will get set in the pte; but notice how zap_pte_range() does not bother +to transfer pte_dirty to page_dirty when unmapping a PageAnon. + +If KSM chooses to share such a page, it will look like a clean copy of +swapcache, and not be written out to swap when its memory is needed; +then stale data read back from swap when it's needed again. + +We could fix this in reuse_swap_page() (or even refuse to reuse a +page under writeback), but it's more honest to fix my oversight in +KSM's write_protect_page(). Several days of testing on three machines +confirms that this fixes the issue they showed. + +Signed-off-by: Hugh Dickins +Cc: Andrew Morton +Cc: Andrea Arcangeli +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/ksm.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/mm/ksm.c ++++ b/mm/ksm.c +@@ -731,7 +731,7 @@ static int write_protect_page(struct vm_ + if (!ptep) + goto out; + +- if (pte_write(*ptep)) { ++ if (pte_write(*ptep) || pte_dirty(*ptep)) { + pte_t entry; + + swapped = PageSwapCache(page); +@@ -754,7 +754,9 @@ static int write_protect_page(struct vm_ + set_pte_at(mm, addr, ptep, entry); + goto out_unlock; + } +- entry = pte_wrprotect(entry); ++ if (pte_dirty(entry)) ++ set_page_dirty(page); ++ entry = pte_mkclean(pte_wrprotect(entry)); + set_pte_at_notify(mm, addr, ptep, entry); + } + *orig_pte = *ptep; diff --git a/queue-2.6.35/mmc-sdhci-s3c-fix-null-ptr-access-in-sdhci_s3c_remove.patch b/queue-2.6.35/mmc-sdhci-s3c-fix-null-ptr-access-in-sdhci_s3c_remove.patch new file mode 100644 index 00000000000..502d8ac9042 --- /dev/null +++ b/queue-2.6.35/mmc-sdhci-s3c-fix-null-ptr-access-in-sdhci_s3c_remove.patch @@ -0,0 +1,38 @@ +From 9320f7cbbdd5febf013b0e91db29189724057738 Mon Sep 17 00:00:00 2001 +From: Marek Szyprowski +Date: Thu, 23 Sep 2010 16:22:05 +0200 +Subject: mmc: sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove + +From: Marek Szyprowski + +commit 9320f7cbbdd5febf013b0e91db29189724057738 upstream. + +If not all clocks have been defined in platform data, the driver will +cause a null pointer dereference when it is removed. This patch fixes +this issue. + +Signed-off-by: Marek Szyprowski +Signed-off-by: Kyungmin Park +Signed-off-by: Andrew Morton +Signed-off-by: Chris Ball +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/host/sdhci-s3c.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/mmc/host/sdhci-s3c.c ++++ b/drivers/mmc/host/sdhci-s3c.c +@@ -372,8 +372,10 @@ static int __devexit sdhci_s3c_remove(st + sdhci_remove_host(host, 1); + + for (ptr = 0; ptr < 3; ptr++) { +- clk_disable(sc->clk_bus[ptr]); +- clk_put(sc->clk_bus[ptr]); ++ if (sc->clk_bus[ptr]) { ++ clk_disable(sc->clk_bus[ptr]); ++ clk_put(sc->clk_bus[ptr]); ++ } + } + clk_disable(sc->clk_io); + clk_put(sc->clk_io); diff --git a/queue-2.6.35/series b/queue-2.6.35/series index 43f633cfd8a..8e7ca26da87 100644 --- a/queue-2.6.35/series +++ b/queue-2.6.35/series @@ -22,3 +22,11 @@ arm-6400-1-at91-fix-arch_gettimeoffset-fallout.patch arm-6395-1-vexpress-set-bit-22-in-the-pl310-cache-controller-auxctlr-register.patch v4l-dvb-gspca-main-fix-a-crash-of-some-webcams-on-arm-arch.patch v4l-dvb-gspca-sn9c20x-bad-transfer-size-of-bayer-images.patch +mmc-sdhci-s3c-fix-null-ptr-access-in-sdhci_s3c_remove.patch +x86-amd-iommu-set-iommu-configuration-flags-in-enable-loop.patch +x86-amd-iommu-fix-rounding-bug-in-__unmap_single.patch +x86-amd-iommu-work-around-s3-bios-bug.patch +tracing-x86-don-t-use-mcount-in-pvclock.c.patch +tracing-x86-don-t-use-mcount-in-kvmclock.c.patch +ksm-fix-bad-user-data-when-swapping.patch +i7core_edac-fix-panic-in-udimm-sysfs-attributes-registration.patch diff --git a/queue-2.6.35/tracing-x86-don-t-use-mcount-in-kvmclock.c.patch b/queue-2.6.35/tracing-x86-don-t-use-mcount-in-kvmclock.c.patch new file mode 100644 index 00000000000..2044a9a4b87 --- /dev/null +++ b/queue-2.6.35/tracing-x86-don-t-use-mcount-in-kvmclock.c.patch @@ -0,0 +1,34 @@ +From 258af47479980d8238a04568b94a4e55aa1cb537 Mon Sep 17 00:00:00 2001 +From: Steven Rostedt +Date: Wed, 22 Sep 2010 22:22:25 -0400 +Subject: tracing/x86: Don't use mcount in kvmclock.c + +From: Steven Rostedt + +commit 258af47479980d8238a04568b94a4e55aa1cb537 upstream. + +The guest can use the paravirt clock in kvmclock.c which is used +by sched_clock(), which in turn is used by the tracing mechanism +for timestamps, which leads to infinite recursion. + +Disable mcount/tracing for kvmclock.o. + +Cc: Jeremy Fitzhardinge +Cc: Avi Kivity +Signed-off-by: Steven Rostedt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/Makefile | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/x86/kernel/Makefile ++++ b/arch/x86/kernel/Makefile +@@ -12,6 +12,7 @@ CFLAGS_REMOVE_tsc.o = -pg + CFLAGS_REMOVE_rtc.o = -pg + CFLAGS_REMOVE_paravirt-spinlocks.o = -pg + CFLAGS_REMOVE_pvclock.o = -pg ++CFLAGS_REMOVE_kvmclock.o = -pg + CFLAGS_REMOVE_ftrace.o = -pg + CFLAGS_REMOVE_early_printk.o = -pg + endif diff --git a/queue-2.6.35/tracing-x86-don-t-use-mcount-in-pvclock.c.patch b/queue-2.6.35/tracing-x86-don-t-use-mcount-in-pvclock.c.patch new file mode 100644 index 00000000000..aedcd015b78 --- /dev/null +++ b/queue-2.6.35/tracing-x86-don-t-use-mcount-in-pvclock.c.patch @@ -0,0 +1,34 @@ +From 9ecd4e1689208afe9b059a5ce1333acb2f42c4d2 Mon Sep 17 00:00:00 2001 +From: Jeremy Fitzhardinge +Date: Wed, 22 Sep 2010 17:07:27 -0700 +Subject: tracing/x86: Don't use mcount in pvclock.c + +From: Jeremy Fitzhardinge + +commit 9ecd4e1689208afe9b059a5ce1333acb2f42c4d2 upstream. + +When using a paravirt clock, pvclock.c can be used by sched_clock(), +which in turn is used by the tracing mechanism for timestamps, +which leads to infinite recursion. + +Disable mcount/tracing for pvclock.o. + +Signed-off-by: Jeremy Fitzhardinge +LKML-Reference: <4C9A9A3F.4040201@goop.org> +Signed-off-by: Steven Rostedt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/Makefile | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/x86/kernel/Makefile ++++ b/arch/x86/kernel/Makefile +@@ -11,6 +11,7 @@ ifdef CONFIG_FUNCTION_TRACER + CFLAGS_REMOVE_tsc.o = -pg + CFLAGS_REMOVE_rtc.o = -pg + CFLAGS_REMOVE_paravirt-spinlocks.o = -pg ++CFLAGS_REMOVE_pvclock.o = -pg + CFLAGS_REMOVE_ftrace.o = -pg + CFLAGS_REMOVE_early_printk.o = -pg + endif diff --git a/queue-2.6.35/x86-amd-iommu-fix-rounding-bug-in-__unmap_single.patch b/queue-2.6.35/x86-amd-iommu-fix-rounding-bug-in-__unmap_single.patch new file mode 100644 index 00000000000..d206b71bab2 --- /dev/null +++ b/queue-2.6.35/x86-amd-iommu-fix-rounding-bug-in-__unmap_single.patch @@ -0,0 +1,51 @@ +From 04e0463e088b41060c08c255eb0d3278a504f094 Mon Sep 17 00:00:00 2001 +From: Joerg Roedel +Date: Thu, 23 Sep 2010 16:12:48 +0200 +Subject: x86/amd-iommu: Fix rounding-bug in __unmap_single + +From: Joerg Roedel + +commit 04e0463e088b41060c08c255eb0d3278a504f094 upstream. + +In the __unmap_single function the dma_addr is rounded down +to a page boundary before the dma pages are unmapped. The +address is later also used to flush the TLB entries for that +mapping. But without the offset into the dma page the amount +of pages to flush might be miscalculated in the TLB flushing +path. This patch fixes this bug by using the original +address to flush the TLB. + +Signed-off-by: Joerg Roedel +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/amd_iommu.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/arch/x86/kernel/amd_iommu.c ++++ b/arch/x86/kernel/amd_iommu.c +@@ -1953,6 +1953,7 @@ static void __unmap_single(struct dma_op + size_t size, + int dir) + { ++ dma_addr_t flush_addr; + dma_addr_t i, start; + unsigned int pages; + +@@ -1960,6 +1961,7 @@ static void __unmap_single(struct dma_op + (dma_addr + size > dma_dom->aperture_size)) + return; + ++ flush_addr = dma_addr; + pages = iommu_num_pages(dma_addr, size, PAGE_SIZE); + dma_addr &= PAGE_MASK; + start = dma_addr; +@@ -1974,7 +1976,7 @@ static void __unmap_single(struct dma_op + dma_ops_free_addresses(dma_dom, dma_addr, pages); + + if (amd_iommu_unmap_flush || dma_dom->need_flush) { +- iommu_flush_pages(&dma_dom->domain, dma_addr, size); ++ iommu_flush_pages(&dma_dom->domain, flush_addr, size); + dma_dom->need_flush = false; + } + } diff --git a/queue-2.6.35/x86-amd-iommu-set-iommu-configuration-flags-in-enable-loop.patch b/queue-2.6.35/x86-amd-iommu-set-iommu-configuration-flags-in-enable-loop.patch new file mode 100644 index 00000000000..eda9fbc89f0 --- /dev/null +++ b/queue-2.6.35/x86-amd-iommu-set-iommu-configuration-flags-in-enable-loop.patch @@ -0,0 +1,107 @@ +From e9bf51971157e367aabfc111a8219db010f69cd4 Mon Sep 17 00:00:00 2001 +From: Joerg Roedel +Date: Mon, 20 Sep 2010 14:33:07 +0200 +Subject: x86/amd-iommu: Set iommu configuration flags in enable-loop + +From: Joerg Roedel + +commit e9bf51971157e367aabfc111a8219db010f69cd4 upstream. + +This patch moves the setting of the configuration and +feature flags out out the acpi table parsing path and moves +it into the iommu-enable path. This is needed to reliably +fix resume-from-s3. + +Signed-off-by: Joerg Roedel +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/include/asm/amd_iommu_types.h | 3 ++ + arch/x86/kernel/amd_iommu_init.c | 49 ++++++++++++++++++--------------- + 2 files changed, 30 insertions(+), 22 deletions(-) + +--- a/arch/x86/include/asm/amd_iommu_types.h ++++ b/arch/x86/include/asm/amd_iommu_types.h +@@ -368,6 +368,9 @@ struct amd_iommu { + /* capabilities of that IOMMU read from ACPI */ + u32 cap; + ++ /* flags read from acpi table */ ++ u8 acpi_flags; ++ + /* + * Capability pointer. There could be more than one IOMMU per PCI + * device function if there are more than one AMD IOMMU capability +--- a/arch/x86/kernel/amd_iommu_init.c ++++ b/arch/x86/kernel/amd_iommu_init.c +@@ -649,29 +649,9 @@ static void __init init_iommu_from_acpi( + struct ivhd_entry *e; + + /* +- * First set the recommended feature enable bits from ACPI +- * into the IOMMU control registers ++ * First save the recommended feature enable bits from ACPI + */ +- h->flags & IVHD_FLAG_HT_TUN_EN_MASK ? +- iommu_feature_enable(iommu, CONTROL_HT_TUN_EN) : +- iommu_feature_disable(iommu, CONTROL_HT_TUN_EN); +- +- h->flags & IVHD_FLAG_PASSPW_EN_MASK ? +- iommu_feature_enable(iommu, CONTROL_PASSPW_EN) : +- iommu_feature_disable(iommu, CONTROL_PASSPW_EN); +- +- h->flags & IVHD_FLAG_RESPASSPW_EN_MASK ? +- iommu_feature_enable(iommu, CONTROL_RESPASSPW_EN) : +- iommu_feature_disable(iommu, CONTROL_RESPASSPW_EN); +- +- h->flags & IVHD_FLAG_ISOC_EN_MASK ? +- iommu_feature_enable(iommu, CONTROL_ISOC_EN) : +- iommu_feature_disable(iommu, CONTROL_ISOC_EN); +- +- /* +- * make IOMMU memory accesses cache coherent +- */ +- iommu_feature_enable(iommu, CONTROL_COHERENT_EN); ++ iommu->acpi_flags = h->flags; + + /* + * Done. Now parse the device entries +@@ -1116,6 +1096,30 @@ static void init_device_table(void) + } + } + ++static void iommu_init_flags(struct amd_iommu *iommu) ++{ ++ iommu->acpi_flags & IVHD_FLAG_HT_TUN_EN_MASK ? ++ iommu_feature_enable(iommu, CONTROL_HT_TUN_EN) : ++ iommu_feature_disable(iommu, CONTROL_HT_TUN_EN); ++ ++ iommu->acpi_flags & IVHD_FLAG_PASSPW_EN_MASK ? ++ iommu_feature_enable(iommu, CONTROL_PASSPW_EN) : ++ iommu_feature_disable(iommu, CONTROL_PASSPW_EN); ++ ++ iommu->acpi_flags & IVHD_FLAG_RESPASSPW_EN_MASK ? ++ iommu_feature_enable(iommu, CONTROL_RESPASSPW_EN) : ++ iommu_feature_disable(iommu, CONTROL_RESPASSPW_EN); ++ ++ iommu->acpi_flags & IVHD_FLAG_ISOC_EN_MASK ? ++ iommu_feature_enable(iommu, CONTROL_ISOC_EN) : ++ iommu_feature_disable(iommu, CONTROL_ISOC_EN); ++ ++ /* ++ * make IOMMU memory accesses cache coherent ++ */ ++ iommu_feature_enable(iommu, CONTROL_COHERENT_EN); ++} ++ + /* + * This function finally enables all IOMMUs found in the system after + * they have been initialized +@@ -1126,6 +1130,7 @@ static void enable_iommus(void) + + for_each_iommu(iommu) { + iommu_disable(iommu); ++ iommu_init_flags(iommu); + iommu_set_device_table(iommu); + iommu_enable_command_buffer(iommu); + iommu_enable_event_buffer(iommu); diff --git a/queue-2.6.35/x86-amd-iommu-work-around-s3-bios-bug.patch b/queue-2.6.35/x86-amd-iommu-work-around-s3-bios-bug.patch new file mode 100644 index 00000000000..ee243b7412d --- /dev/null +++ b/queue-2.6.35/x86-amd-iommu-work-around-s3-bios-bug.patch @@ -0,0 +1,113 @@ +From 4c894f47bb49284008073d351c0ddaac8860864e Mon Sep 17 00:00:00 2001 +From: Joerg Roedel +Date: Thu, 23 Sep 2010 15:15:19 +0200 +Subject: x86/amd-iommu: Work around S3 BIOS bug + +From: Joerg Roedel + +commit 4c894f47bb49284008073d351c0ddaac8860864e upstream. + +This patch adds a workaround for an IOMMU BIOS problem to +the AMD IOMMU driver. The result of the bug is that the +IOMMU does not execute commands anymore when the system +comes out of the S3 state resulting in system failure. The +bug in the BIOS is that is does not restore certain hardware +specific registers correctly. This workaround reads out the +contents of these registers at boot time and restores them +on resume from S3. The workaround is limited to the specific +IOMMU chipset where this problem occurs. + +Signed-off-by: Joerg Roedel +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/include/asm/amd_iommu_proto.h | 6 ++++++ + arch/x86/include/asm/amd_iommu_types.h | 9 +++++++++ + arch/x86/kernel/amd_iommu_init.c | 18 ++++++++++++++++++ + include/linux/pci_ids.h | 3 +++ + 4 files changed, 36 insertions(+) + +--- a/arch/x86/include/asm/amd_iommu_proto.h ++++ b/arch/x86/include/asm/amd_iommu_proto.h +@@ -38,4 +38,10 @@ static inline void amd_iommu_stats_init( + + #endif /* !CONFIG_AMD_IOMMU_STATS */ + ++static inline bool is_rd890_iommu(struct pci_dev *pdev) ++{ ++ return (pdev->vendor == PCI_VENDOR_ID_ATI) && ++ (pdev->device == PCI_DEVICE_ID_RD890_IOMMU); ++} ++ + #endif /* _ASM_X86_AMD_IOMMU_PROTO_H */ +--- a/arch/x86/include/asm/amd_iommu_types.h ++++ b/arch/x86/include/asm/amd_iommu_types.h +@@ -414,6 +414,15 @@ struct amd_iommu { + + /* default dma_ops domain for that IOMMU */ + struct dma_ops_domain *default_dom; ++ ++ /* ++ * This array is required to work around a potential BIOS bug. ++ * The BIOS may miss to restore parts of the PCI configuration ++ * space when the system resumes from S3. The result is that the ++ * IOMMU does not execute commands anymore which leads to system ++ * failure. ++ */ ++ u32 cache_cfg[4]; + }; + + /* +--- a/arch/x86/kernel/amd_iommu_init.c ++++ b/arch/x86/kernel/amd_iommu_init.c +@@ -632,6 +632,13 @@ static void __init init_iommu_from_pci(s + iommu->last_device = calc_devid(MMIO_GET_BUS(range), + MMIO_GET_LD(range)); + iommu->evt_msi_num = MMIO_MSI_NUM(misc); ++ ++ if (is_rd890_iommu(iommu->dev)) { ++ pci_read_config_dword(iommu->dev, 0xf0, &iommu->cache_cfg[0]); ++ pci_read_config_dword(iommu->dev, 0xf4, &iommu->cache_cfg[1]); ++ pci_read_config_dword(iommu->dev, 0xf8, &iommu->cache_cfg[2]); ++ pci_read_config_dword(iommu->dev, 0xfc, &iommu->cache_cfg[3]); ++ } + } + + /* +@@ -1120,6 +1127,16 @@ static void iommu_init_flags(struct amd_ + iommu_feature_enable(iommu, CONTROL_COHERENT_EN); + } + ++static void iommu_apply_quirks(struct amd_iommu *iommu) ++{ ++ if (is_rd890_iommu(iommu->dev)) { ++ pci_write_config_dword(iommu->dev, 0xf0, iommu->cache_cfg[0]); ++ pci_write_config_dword(iommu->dev, 0xf4, iommu->cache_cfg[1]); ++ pci_write_config_dword(iommu->dev, 0xf8, iommu->cache_cfg[2]); ++ pci_write_config_dword(iommu->dev, 0xfc, iommu->cache_cfg[3]); ++ } ++} ++ + /* + * This function finally enables all IOMMUs found in the system after + * they have been initialized +@@ -1130,6 +1147,7 @@ static void enable_iommus(void) + + for_each_iommu(iommu) { + iommu_disable(iommu); ++ iommu_apply_quirks(iommu); + iommu_init_flags(iommu); + iommu_set_device_table(iommu); + iommu_enable_command_buffer(iommu); +--- a/include/linux/pci_ids.h ++++ b/include/linux/pci_ids.h +@@ -393,6 +393,9 @@ + #define PCI_DEVICE_ID_VLSI_82C147 0x0105 + #define PCI_DEVICE_ID_VLSI_VAS96011 0x0702 + ++/* AMD RD890 Chipset */ ++#define PCI_DEVICE_ID_RD890_IOMMU 0x5a23 ++ + #define PCI_VENDOR_ID_ADL 0x1005 + #define PCI_DEVICE_ID_ADL_2301 0x2301 +