From 4b105ee4f1a79d26a0dd7f29443449a867d318a3 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 27 Nov 2023 12:44:28 +0000 Subject: [PATCH] drop queue-5.15/powerpc-pseries-iommu-enable_ddw-incorrectly-returns.patch --- ...iommu-enable_ddw-incorrectly-returns.patch | 74 ------------------- queue-5.15/series | 1 - 2 files changed, 75 deletions(-) delete mode 100644 queue-5.15/powerpc-pseries-iommu-enable_ddw-incorrectly-returns.patch diff --git a/queue-5.15/powerpc-pseries-iommu-enable_ddw-incorrectly-returns.patch b/queue-5.15/powerpc-pseries-iommu-enable_ddw-incorrectly-returns.patch deleted file mode 100644 index 278d0448743..00000000000 --- a/queue-5.15/powerpc-pseries-iommu-enable_ddw-incorrectly-returns.patch +++ /dev/null @@ -1,74 +0,0 @@ -From df6fb58a767fd174a6fdcc76ce2b86124b567419 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 2 Oct 2023 22:08:02 -0500 -Subject: powerpc/pseries/iommu: enable_ddw incorrectly returns direct mapping - for SR-IOV device - -From: Gaurav Batra - -[ Upstream commit 3bf983e4e93ce8e6d69e9d63f52a66ec0856672e ] - -When a device is initialized, the driver invokes dma_supported() twice - -first for streaming mappings followed by coherent mappings. For an -SR-IOV device, default window is deleted and DDW created. With vPMEM -enabled, TCE mappings are dynamically created for both vPMEM and SR-IOV -device. There are no direct mappings. - -First time when dma_supported() is called with 64 bit mask, DDW is created -and marked as dynamic window. The second time dma_supported() is called, -enable_ddw() finds existing window for the device and incorrectly returns -it as "direct mapping". - -This only happens when size of DDW is big enough to map max LPAR memory. - -This results in streaming TCEs to not get dynamically mapped, since code -incorrently assumes these are already pre-mapped. The adapter initially -comes up but goes down due to EEH. - -Fixes: 381ceda88c4c ("powerpc/pseries/iommu: Make use of DDW for indirect mapping") -Cc: stable@vger.kernel.org # v5.15+ -Signed-off-by: Gaurav Batra -Signed-off-by: Michael Ellerman -Link: https://msgid.link/20231003030802.47914-1-gbatra@linux.vnet.ibm.com -Signed-off-by: Sasha Levin ---- - arch/powerpc/platforms/pseries/iommu.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c -index aa5f8074e9b10..bee61292de23b 100644 ---- a/arch/powerpc/platforms/pseries/iommu.c -+++ b/arch/powerpc/platforms/pseries/iommu.c -@@ -891,7 +891,8 @@ static int remove_ddw(struct device_node *np, bool remove_prop, const char *win_ - return 0; - } - --static bool find_existing_ddw(struct device_node *pdn, u64 *dma_addr, int *window_shift) -+static bool find_existing_ddw(struct device_node *pdn, u64 *dma_addr, int *window_shift, -+ bool *direct_mapping) - { - struct dma_win *window; - const struct dynamic_dma_window_prop *dma64; -@@ -904,6 +905,7 @@ static bool find_existing_ddw(struct device_node *pdn, u64 *dma_addr, int *windo - dma64 = window->prop; - *dma_addr = be64_to_cpu(dma64->dma_base); - *window_shift = be32_to_cpu(dma64->window_shift); -+ *direct_mapping = window->direct; - found = true; - break; - } -@@ -1253,10 +1255,8 @@ static bool enable_ddw(struct pci_dev *dev, struct device_node *pdn) - - mutex_lock(&dma_win_init_mutex); - -- if (find_existing_ddw(pdn, &dev->dev.archdata.dma_offset, &len)) { -- direct_mapping = (len >= max_ram_len); -+ if (find_existing_ddw(pdn, &dev->dev.archdata.dma_offset, &len, &direct_mapping)) - goto out_unlock; -- } - - /* - * If we already went through this for a previous function of --- -2.42.0 - diff --git a/queue-5.15/series b/queue-5.15/series index 9eee137f6d4..8df23e4bd56 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -244,7 +244,6 @@ ksmbd-fix-slab-out-of-bounds-write-in-smb_inherit_da.patch arm64-dts-qcom-ipq6018-switch-tcsr-mutex-to-mmio.patch arm64-dts-qcom-ipq6018-fix-tcsr_mutex-register-size.patch powerpc-pseries-ddw-simplify-enable_ddw.patch -powerpc-pseries-iommu-enable_ddw-incorrectly-returns.patch revert-ncsi-propagate-carrier-gain-loss-events-to-the-ncsi-controller.patch revert-i2c-pxa-move-to-generic-gpio-recovery.patch lsm-fix-default-return-value-for-vm_enough_memory.patch -- 2.47.3