From 65571a5a6a9a3f922b9c9678ad75e5f68d9bbc98 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 25 Jan 2022 13:43:17 +0100 Subject: [PATCH] drop pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch from everywhere --- ...loop-in-irq-handler-upon-power-fault.patch | 76 ------------------- queue-5.10/series | 1 - ...loop-in-irq-handler-upon-power-fault.patch | 76 ------------------- queue-5.15/series | 1 - ...loop-in-irq-handler-upon-power-fault.patch | 76 ------------------- queue-5.16/series | 1 - ...loop-in-irq-handler-upon-power-fault.patch | 76 ------------------- queue-5.4/series | 1 - 8 files changed, 308 deletions(-) delete mode 100644 queue-5.10/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch delete mode 100644 queue-5.15/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch delete mode 100644 queue-5.16/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch delete mode 100644 queue-5.4/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch diff --git a/queue-5.10/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch b/queue-5.10/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch deleted file mode 100644 index 2c812afab0d..00000000000 --- a/queue-5.10/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 23584c1ed3e15a6f4bfab8dc5a88d94ab929ee12 Mon Sep 17 00:00:00 2001 -From: Lukas Wunner -Date: Wed, 17 Nov 2021 23:22:09 +0100 -Subject: PCI: pciehp: Fix infinite loop in IRQ handler upon power fault - -From: Lukas Wunner - -commit 23584c1ed3e15a6f4bfab8dc5a88d94ab929ee12 upstream. - -The Power Fault Detected bit in the Slot Status register differs from -all other hotplug events in that it is sticky: It can only be cleared -after turning off slot power. Per PCIe r5.0, sec. 6.7.1.8: - - If a power controller detects a main power fault on the hot-plug slot, - it must automatically set its internal main power fault latch [...]. - The main power fault latch is cleared when software turns off power to - the hot-plug slot. - -The stickiness used to cause interrupt storms and infinite loops which -were fixed in 2009 by commits 5651c48cfafe ("PCI pciehp: fix power fault -interrupt storm problem") and 99f0169c17f3 ("PCI: pciehp: enable -software notification on empty slots"). - -Unfortunately in 2020 the infinite loop issue was inadvertently -reintroduced by commit 8edf5332c393 ("PCI: pciehp: Fix MSI interrupt -race"): The hardirq handler pciehp_isr() clears the PFD bit until -pciehp's power_fault_detected flag is set. That happens in the IRQ -thread pciehp_ist(), which never learns of the event because the hardirq -handler is stuck in an infinite loop. Fix by setting the -power_fault_detected flag already in the hardirq handler. - -Link: https://bugzilla.kernel.org/show_bug.cgi?id=214989 -Link: https://lore.kernel.org/linux-pci/DM8PR11MB5702255A6A92F735D90A4446868B9@DM8PR11MB5702.namprd11.prod.outlook.com -Fixes: 8edf5332c393 ("PCI: pciehp: Fix MSI interrupt race") -Link: https://lore.kernel.org/r/66eaeef31d4997ceea357ad93259f290ededecfd.1637187226.git.lukas@wunner.de -Reported-by: Joseph Bao -Tested-by: Joseph Bao -Signed-off-by: Lukas Wunner -Signed-off-by: Bjorn Helgaas -Cc: stable@vger.kernel.org # v4.19+ -Cc: Stuart Hayes -Signed-off-by: Greg Kroah-Hartman ---- - drivers/pci/hotplug/pciehp_hpc.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - ---- a/drivers/pci/hotplug/pciehp_hpc.c -+++ b/drivers/pci/hotplug/pciehp_hpc.c -@@ -642,6 +642,8 @@ read_status: - */ - if (ctrl->power_fault_detected) - status &= ~PCI_EXP_SLTSTA_PFD; -+ else if (status & PCI_EXP_SLTSTA_PFD) -+ ctrl->power_fault_detected = true; - - events |= status; - if (!events) { -@@ -651,7 +653,7 @@ read_status: - } - - if (status) { -- pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, events); -+ pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, status); - - /* - * In MSI mode, all event bits must be zero before the port -@@ -725,8 +727,7 @@ static irqreturn_t pciehp_ist(int irq, v - } - - /* Check Power Fault Detected */ -- if ((events & PCI_EXP_SLTSTA_PFD) && !ctrl->power_fault_detected) { -- ctrl->power_fault_detected = 1; -+ if (events & PCI_EXP_SLTSTA_PFD) { - ctrl_err(ctrl, "Slot(%s): Power fault\n", slot_name(ctrl)); - pciehp_set_indicators(ctrl, PCI_EXP_SLTCTL_PWR_IND_OFF, - PCI_EXP_SLTCTL_ATTN_IND_ON); diff --git a/queue-5.10/series b/queue-5.10/series index a9535684f98..7f549eb4147 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -456,7 +456,6 @@ parisc-fix-lpa-and-lpa_user-defines.patch powerpc-64s-radix-fix-huge-vmap-false-positive.patch pci-xgene-fix-ib-window-setup.patch pci-pciehp-use-down_read-write_nested-reset_lock-to-fix-lockdep-errors.patch -pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch pci-pci-bridge-emul-make-expansion-rom-base-address-register-read-only.patch pci-pci-bridge-emul-properly-mark-reserved-pcie-bits-in-pci-config-space.patch pci-pci-bridge-emul-fix-definitions-of-reserved-bits.patch diff --git a/queue-5.15/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch b/queue-5.15/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch deleted file mode 100644 index 2c812afab0d..00000000000 --- a/queue-5.15/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 23584c1ed3e15a6f4bfab8dc5a88d94ab929ee12 Mon Sep 17 00:00:00 2001 -From: Lukas Wunner -Date: Wed, 17 Nov 2021 23:22:09 +0100 -Subject: PCI: pciehp: Fix infinite loop in IRQ handler upon power fault - -From: Lukas Wunner - -commit 23584c1ed3e15a6f4bfab8dc5a88d94ab929ee12 upstream. - -The Power Fault Detected bit in the Slot Status register differs from -all other hotplug events in that it is sticky: It can only be cleared -after turning off slot power. Per PCIe r5.0, sec. 6.7.1.8: - - If a power controller detects a main power fault on the hot-plug slot, - it must automatically set its internal main power fault latch [...]. - The main power fault latch is cleared when software turns off power to - the hot-plug slot. - -The stickiness used to cause interrupt storms and infinite loops which -were fixed in 2009 by commits 5651c48cfafe ("PCI pciehp: fix power fault -interrupt storm problem") and 99f0169c17f3 ("PCI: pciehp: enable -software notification on empty slots"). - -Unfortunately in 2020 the infinite loop issue was inadvertently -reintroduced by commit 8edf5332c393 ("PCI: pciehp: Fix MSI interrupt -race"): The hardirq handler pciehp_isr() clears the PFD bit until -pciehp's power_fault_detected flag is set. That happens in the IRQ -thread pciehp_ist(), which never learns of the event because the hardirq -handler is stuck in an infinite loop. Fix by setting the -power_fault_detected flag already in the hardirq handler. - -Link: https://bugzilla.kernel.org/show_bug.cgi?id=214989 -Link: https://lore.kernel.org/linux-pci/DM8PR11MB5702255A6A92F735D90A4446868B9@DM8PR11MB5702.namprd11.prod.outlook.com -Fixes: 8edf5332c393 ("PCI: pciehp: Fix MSI interrupt race") -Link: https://lore.kernel.org/r/66eaeef31d4997ceea357ad93259f290ededecfd.1637187226.git.lukas@wunner.de -Reported-by: Joseph Bao -Tested-by: Joseph Bao -Signed-off-by: Lukas Wunner -Signed-off-by: Bjorn Helgaas -Cc: stable@vger.kernel.org # v4.19+ -Cc: Stuart Hayes -Signed-off-by: Greg Kroah-Hartman ---- - drivers/pci/hotplug/pciehp_hpc.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - ---- a/drivers/pci/hotplug/pciehp_hpc.c -+++ b/drivers/pci/hotplug/pciehp_hpc.c -@@ -642,6 +642,8 @@ read_status: - */ - if (ctrl->power_fault_detected) - status &= ~PCI_EXP_SLTSTA_PFD; -+ else if (status & PCI_EXP_SLTSTA_PFD) -+ ctrl->power_fault_detected = true; - - events |= status; - if (!events) { -@@ -651,7 +653,7 @@ read_status: - } - - if (status) { -- pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, events); -+ pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, status); - - /* - * In MSI mode, all event bits must be zero before the port -@@ -725,8 +727,7 @@ static irqreturn_t pciehp_ist(int irq, v - } - - /* Check Power Fault Detected */ -- if ((events & PCI_EXP_SLTSTA_PFD) && !ctrl->power_fault_detected) { -- ctrl->power_fault_detected = 1; -+ if (events & PCI_EXP_SLTSTA_PFD) { - ctrl_err(ctrl, "Slot(%s): Power fault\n", slot_name(ctrl)); - pciehp_set_indicators(ctrl, PCI_EXP_SLTCTL_PWR_IND_OFF, - PCI_EXP_SLTCTL_ATTN_IND_ON); diff --git a/queue-5.15/series b/queue-5.15/series index c5ca6e137cb..c56f35e7bdb 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -695,7 +695,6 @@ drm-amdgpu-don-t-do-resets-on-apus-which-don-t-support-it.patch drm-i915-display-ehl-update-voltage-swing-table.patch pci-xgene-fix-ib-window-setup.patch pci-pciehp-use-down_read-write_nested-reset_lock-to-fix-lockdep-errors.patch -pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch pci-pci-bridge-emul-make-expansion-rom-base-address-register-read-only.patch pci-pci-bridge-emul-properly-mark-reserved-pcie-bits-in-pci-config-space.patch pci-pci-bridge-emul-fix-definitions-of-reserved-bits.patch diff --git a/queue-5.16/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch b/queue-5.16/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch deleted file mode 100644 index 2c812afab0d..00000000000 --- a/queue-5.16/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 23584c1ed3e15a6f4bfab8dc5a88d94ab929ee12 Mon Sep 17 00:00:00 2001 -From: Lukas Wunner -Date: Wed, 17 Nov 2021 23:22:09 +0100 -Subject: PCI: pciehp: Fix infinite loop in IRQ handler upon power fault - -From: Lukas Wunner - -commit 23584c1ed3e15a6f4bfab8dc5a88d94ab929ee12 upstream. - -The Power Fault Detected bit in the Slot Status register differs from -all other hotplug events in that it is sticky: It can only be cleared -after turning off slot power. Per PCIe r5.0, sec. 6.7.1.8: - - If a power controller detects a main power fault on the hot-plug slot, - it must automatically set its internal main power fault latch [...]. - The main power fault latch is cleared when software turns off power to - the hot-plug slot. - -The stickiness used to cause interrupt storms and infinite loops which -were fixed in 2009 by commits 5651c48cfafe ("PCI pciehp: fix power fault -interrupt storm problem") and 99f0169c17f3 ("PCI: pciehp: enable -software notification on empty slots"). - -Unfortunately in 2020 the infinite loop issue was inadvertently -reintroduced by commit 8edf5332c393 ("PCI: pciehp: Fix MSI interrupt -race"): The hardirq handler pciehp_isr() clears the PFD bit until -pciehp's power_fault_detected flag is set. That happens in the IRQ -thread pciehp_ist(), which never learns of the event because the hardirq -handler is stuck in an infinite loop. Fix by setting the -power_fault_detected flag already in the hardirq handler. - -Link: https://bugzilla.kernel.org/show_bug.cgi?id=214989 -Link: https://lore.kernel.org/linux-pci/DM8PR11MB5702255A6A92F735D90A4446868B9@DM8PR11MB5702.namprd11.prod.outlook.com -Fixes: 8edf5332c393 ("PCI: pciehp: Fix MSI interrupt race") -Link: https://lore.kernel.org/r/66eaeef31d4997ceea357ad93259f290ededecfd.1637187226.git.lukas@wunner.de -Reported-by: Joseph Bao -Tested-by: Joseph Bao -Signed-off-by: Lukas Wunner -Signed-off-by: Bjorn Helgaas -Cc: stable@vger.kernel.org # v4.19+ -Cc: Stuart Hayes -Signed-off-by: Greg Kroah-Hartman ---- - drivers/pci/hotplug/pciehp_hpc.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - ---- a/drivers/pci/hotplug/pciehp_hpc.c -+++ b/drivers/pci/hotplug/pciehp_hpc.c -@@ -642,6 +642,8 @@ read_status: - */ - if (ctrl->power_fault_detected) - status &= ~PCI_EXP_SLTSTA_PFD; -+ else if (status & PCI_EXP_SLTSTA_PFD) -+ ctrl->power_fault_detected = true; - - events |= status; - if (!events) { -@@ -651,7 +653,7 @@ read_status: - } - - if (status) { -- pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, events); -+ pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, status); - - /* - * In MSI mode, all event bits must be zero before the port -@@ -725,8 +727,7 @@ static irqreturn_t pciehp_ist(int irq, v - } - - /* Check Power Fault Detected */ -- if ((events & PCI_EXP_SLTSTA_PFD) && !ctrl->power_fault_detected) { -- ctrl->power_fault_detected = 1; -+ if (events & PCI_EXP_SLTSTA_PFD) { - ctrl_err(ctrl, "Slot(%s): Power fault\n", slot_name(ctrl)); - pciehp_set_indicators(ctrl, PCI_EXP_SLTCTL_PWR_IND_OFF, - PCI_EXP_SLTCTL_ATTN_IND_ON); diff --git a/queue-5.16/series b/queue-5.16/series index 39ecda0e564..f4fc51bbfca 100644 --- a/queue-5.16/series +++ b/queue-5.16/series @@ -867,7 +867,6 @@ drm-amd-display-revert-w-a-for-hard-hangs-on-dcn20-dcn21.patch drm-i915-display-ehl-update-voltage-swing-table.patch pci-xgene-fix-ib-window-setup.patch pci-pciehp-use-down_read-write_nested-reset_lock-to-fix-lockdep-errors.patch -pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch pci-pci-bridge-emul-make-expansion-rom-base-address-register-read-only.patch pci-pci-bridge-emul-properly-mark-reserved-pcie-bits-in-pci-config-space.patch pci-pci-bridge-emul-fix-definitions-of-reserved-bits.patch diff --git a/queue-5.4/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch b/queue-5.4/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch deleted file mode 100644 index 8a24039f343..00000000000 --- a/queue-5.4/pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 23584c1ed3e15a6f4bfab8dc5a88d94ab929ee12 Mon Sep 17 00:00:00 2001 -From: Lukas Wunner -Date: Wed, 17 Nov 2021 23:22:09 +0100 -Subject: PCI: pciehp: Fix infinite loop in IRQ handler upon power fault - -From: Lukas Wunner - -commit 23584c1ed3e15a6f4bfab8dc5a88d94ab929ee12 upstream. - -The Power Fault Detected bit in the Slot Status register differs from -all other hotplug events in that it is sticky: It can only be cleared -after turning off slot power. Per PCIe r5.0, sec. 6.7.1.8: - - If a power controller detects a main power fault on the hot-plug slot, - it must automatically set its internal main power fault latch [...]. - The main power fault latch is cleared when software turns off power to - the hot-plug slot. - -The stickiness used to cause interrupt storms and infinite loops which -were fixed in 2009 by commits 5651c48cfafe ("PCI pciehp: fix power fault -interrupt storm problem") and 99f0169c17f3 ("PCI: pciehp: enable -software notification on empty slots"). - -Unfortunately in 2020 the infinite loop issue was inadvertently -reintroduced by commit 8edf5332c393 ("PCI: pciehp: Fix MSI interrupt -race"): The hardirq handler pciehp_isr() clears the PFD bit until -pciehp's power_fault_detected flag is set. That happens in the IRQ -thread pciehp_ist(), which never learns of the event because the hardirq -handler is stuck in an infinite loop. Fix by setting the -power_fault_detected flag already in the hardirq handler. - -Link: https://bugzilla.kernel.org/show_bug.cgi?id=214989 -Link: https://lore.kernel.org/linux-pci/DM8PR11MB5702255A6A92F735D90A4446868B9@DM8PR11MB5702.namprd11.prod.outlook.com -Fixes: 8edf5332c393 ("PCI: pciehp: Fix MSI interrupt race") -Link: https://lore.kernel.org/r/66eaeef31d4997ceea357ad93259f290ededecfd.1637187226.git.lukas@wunner.de -Reported-by: Joseph Bao -Tested-by: Joseph Bao -Signed-off-by: Lukas Wunner -Signed-off-by: Bjorn Helgaas -Cc: stable@vger.kernel.org # v4.19+ -Cc: Stuart Hayes -Signed-off-by: Greg Kroah-Hartman ---- - drivers/pci/hotplug/pciehp_hpc.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - ---- a/drivers/pci/hotplug/pciehp_hpc.c -+++ b/drivers/pci/hotplug/pciehp_hpc.c -@@ -577,6 +577,8 @@ read_status: - */ - if (ctrl->power_fault_detected) - status &= ~PCI_EXP_SLTSTA_PFD; -+ else if (status & PCI_EXP_SLTSTA_PFD) -+ ctrl->power_fault_detected = true; - - events |= status; - if (!events) { -@@ -586,7 +588,7 @@ read_status: - } - - if (status) { -- pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, events); -+ pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, status); - - /* - * In MSI mode, all event bits must be zero before the port -@@ -660,8 +662,7 @@ static irqreturn_t pciehp_ist(int irq, v - } - - /* Check Power Fault Detected */ -- if ((events & PCI_EXP_SLTSTA_PFD) && !ctrl->power_fault_detected) { -- ctrl->power_fault_detected = 1; -+ if (events & PCI_EXP_SLTSTA_PFD) { - ctrl_err(ctrl, "Slot(%s): Power fault\n", slot_name(ctrl)); - pciehp_set_indicators(ctrl, PCI_EXP_SLTCTL_PWR_IND_OFF, - PCI_EXP_SLTCTL_ATTN_IND_ON); diff --git a/queue-5.4/series b/queue-5.4/series index c2a3a20fd6c..06c1f6370ee 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -254,7 +254,6 @@ s390-mm-fix-2kb-pgtable-release-race.patch drm-etnaviv-limit-submit-sizes.patch drm-nouveau-kms-nv04-use-vzalloc-for-nv04_display.patch drm-bridge-analogix_dp-make-psr-exit-block-less.patch -pci-pciehp-fix-infinite-loop-in-irq-handler-upon-power-fault.patch pci-pci-bridge-emul-properly-mark-reserved-pcie-bits-in-pci-config-space.patch pci-pci-bridge-emul-correctly-set-pcie-capabilities.patch pci-pci-bridge-emul-set-pci_status_cap_list-for-pcie-device.patch -- 2.47.2