From: Greg Kroah-Hartman Date: Mon, 19 Feb 2024 19:01:58 +0000 (+0100) Subject: 4.19-stable patches X-Git-Tag: v4.19.307~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0343872b02e08f77104551916a94ddc1a4fa6506;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: irqchip-irq-brcmstb-l2-add-write-memory-barrier-before-exit.patch nfp-use-correct-macro-for-lengthselect-in-bar-config.patch pmdomain-core-move-the-unused-cleanup-to-a-_sync-initcall.patch --- diff --git a/queue-4.19/irqchip-irq-brcmstb-l2-add-write-memory-barrier-before-exit.patch b/queue-4.19/irqchip-irq-brcmstb-l2-add-write-memory-barrier-before-exit.patch new file mode 100644 index 00000000000..5cb1713cf32 --- /dev/null +++ b/queue-4.19/irqchip-irq-brcmstb-l2-add-write-memory-barrier-before-exit.patch @@ -0,0 +1,54 @@ +From b0344d6854d25a8b3b901c778b1728885dd99007 Mon Sep 17 00:00:00 2001 +From: Doug Berger +Date: Fri, 9 Feb 2024 17:24:49 -0800 +Subject: irqchip/irq-brcmstb-l2: Add write memory barrier before exit + +From: Doug Berger + +commit b0344d6854d25a8b3b901c778b1728885dd99007 upstream. + +It was observed on Broadcom devices that use GIC v3 architecture L1 +interrupt controllers as the parent of brcmstb-l2 interrupt controllers +that the deactivation of the parent interrupt could happen before the +brcmstb-l2 deasserted its output. This would lead the GIC to reactivate the +interrupt only to find that no L2 interrupt was pending. The result was a +spurious interrupt invoking handle_bad_irq() with its associated +messaging. While this did not create a functional problem it is a waste of +cycles. + +The hazard exists because the memory mapped bus writes to the brcmstb-l2 +registers are buffered and the GIC v3 architecture uses a very efficient +system register write to deactivate the interrupt. + +Add a write memory barrier prior to invoking chained_irq_exit() to +introduce a dsb(st) on those systems to ensure the system register write +cannot be executed until the memory mapped writes are visible to the +system. + +[ florian: Added Fixes tag ] + +Fixes: 7f646e92766e ("irqchip: brcmstb-l2: Add Broadcom Set Top Box Level-2 interrupt controller") +Signed-off-by: Doug Berger +Signed-off-by: Florian Fainelli +Signed-off-by: Thomas Gleixner +Acked-by: Florian Fainelli +Acked-by: Marc Zyngier +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20240210012449.3009125-1-florian.fainelli@broadcom.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/irqchip/irq-brcmstb-l2.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/irqchip/irq-brcmstb-l2.c ++++ b/drivers/irqchip/irq-brcmstb-l2.c +@@ -121,6 +121,9 @@ static void brcmstb_l2_intc_irq_handle(s + generic_handle_irq(irq_linear_revmap(b->domain, irq)); + } while (status); + out: ++ /* Don't ack parent before all device writes are done */ ++ wmb(); ++ + chained_irq_exit(chip, desc); + } + diff --git a/queue-4.19/nfp-use-correct-macro-for-lengthselect-in-bar-config.patch b/queue-4.19/nfp-use-correct-macro-for-lengthselect-in-bar-config.patch new file mode 100644 index 00000000000..071184077dc --- /dev/null +++ b/queue-4.19/nfp-use-correct-macro-for-lengthselect-in-bar-config.patch @@ -0,0 +1,46 @@ +From b3d4f7f2288901ed2392695919b3c0e24c1b4084 Mon Sep 17 00:00:00 2001 +From: Daniel Basilio +Date: Fri, 2 Feb 2024 13:37:17 +0200 +Subject: nfp: use correct macro for LengthSelect in BAR config + +From: Daniel Basilio + +commit b3d4f7f2288901ed2392695919b3c0e24c1b4084 upstream. + +The 1st and 2nd expansion BAR configuration registers are configured, +when the driver starts up, in variables 'barcfg_msix_general' and +'barcfg_msix_xpb', respectively. The 'LengthSelect' field is ORed in +from bit 0, which is incorrect. The 'LengthSelect' field should +start from bit 27. + +This has largely gone un-noticed because +NFP_PCIE_BAR_PCIE2CPP_LengthSelect_32BIT happens to be 0. + +Fixes: 4cb584e0ee7d ("nfp: add CPP access core") +Cc: stable@vger.kernel.org # 4.11+ +Signed-off-by: Daniel Basilio +Signed-off-by: Louis Peens +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c ++++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c +@@ -571,11 +571,13 @@ static int enable_bars(struct nfp6000_pc + const u32 barcfg_msix_general = + NFP_PCIE_BAR_PCIE2CPP_MapType( + NFP_PCIE_BAR_PCIE2CPP_MapType_GENERAL) | +- NFP_PCIE_BAR_PCIE2CPP_LengthSelect_32BIT; ++ NFP_PCIE_BAR_PCIE2CPP_LengthSelect( ++ NFP_PCIE_BAR_PCIE2CPP_LengthSelect_32BIT); + const u32 barcfg_msix_xpb = + NFP_PCIE_BAR_PCIE2CPP_MapType( + NFP_PCIE_BAR_PCIE2CPP_MapType_BULK) | +- NFP_PCIE_BAR_PCIE2CPP_LengthSelect_32BIT | ++ NFP_PCIE_BAR_PCIE2CPP_LengthSelect( ++ NFP_PCIE_BAR_PCIE2CPP_LengthSelect_32BIT) | + NFP_PCIE_BAR_PCIE2CPP_Target_BaseAddress( + NFP_CPP_TARGET_ISLAND_XPB); + const u32 barcfg_explicit[4] = { diff --git a/queue-4.19/pmdomain-core-move-the-unused-cleanup-to-a-_sync-initcall.patch b/queue-4.19/pmdomain-core-move-the-unused-cleanup-to-a-_sync-initcall.patch new file mode 100644 index 00000000000..ce839b0d03e --- /dev/null +++ b/queue-4.19/pmdomain-core-move-the-unused-cleanup-to-a-_sync-initcall.patch @@ -0,0 +1,34 @@ +From 741ba0134fa7822fcf4e4a0a537a5c4cfd706b20 Mon Sep 17 00:00:00 2001 +From: Konrad Dybcio +Date: Wed, 27 Dec 2023 16:21:24 +0100 +Subject: pmdomain: core: Move the unused cleanup to a _sync initcall + +From: Konrad Dybcio + +commit 741ba0134fa7822fcf4e4a0a537a5c4cfd706b20 upstream. + +The unused clock cleanup uses the _sync initcall to give all users at +earlier initcalls time to probe. Do the same to avoid leaving some PDs +dangling at "on" (which actually happened on qcom!). + +Fixes: 2fe71dcdfd10 ("PM / domains: Add late_initcall to disable unused PM domains") +Signed-off-by: Konrad Dybcio +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20231227-topic-pmdomain_sync_cleanup-v1-1-5f36769d538b@linaro.org +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/base/power/domain.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/base/power/domain.c ++++ b/drivers/base/power/domain.c +@@ -847,7 +847,7 @@ static int __init genpd_power_off_unused + + return 0; + } +-late_initcall(genpd_power_off_unused); ++late_initcall_sync(genpd_power_off_unused); + + #if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_GENERIC_DOMAINS_OF) + diff --git a/queue-4.19/series b/queue-4.19/series index 36e1367addd..f4d72591b34 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -191,3 +191,6 @@ x86-mm-ident_map-use-gbpages-only-where-full-gb-page-should-be-mapped.patch alsa-hda-conexant-add-quirk-for-sws-js201d.patch nilfs2-fix-data-corruption-in-dsync-block-recovery-for-small-block-sizes.patch nilfs2-fix-hang-in-nilfs_lookup_dirty_data_buffers.patch +nfp-use-correct-macro-for-lengthselect-in-bar-config.patch +irqchip-irq-brcmstb-l2-add-write-memory-barrier-before-exit.patch +pmdomain-core-move-the-unused-cleanup-to-a-_sync-initcall.patch