]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.4
authorSasha Levin <sashal@kernel.org>
Tue, 3 Oct 2023 00:58:36 +0000 (20:58 -0400)
committerSasha Levin <sashal@kernel.org>
Tue, 3 Oct 2023 00:58:36 +0000 (20:58 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
13 files changed:
queue-5.4/ata-libata-eh-do-not-clear-ata_pflag_eh_pending-in-a.patch [new file with mode: 0644]
queue-5.4/bpf-clarify-error-expectations-from-bpf_clone_redire.patch [new file with mode: 0644]
queue-5.4/fbdev-sh7760fb-depend-on-fb-y.patch [new file with mode: 0644]
queue-5.4/ncsi-propagate-carrier-gain-loss-events-to-the-ncsi-.patch [new file with mode: 0644]
queue-5.4/parisc-drivers-fix-sparse-warning.patch [new file with mode: 0644]
queue-5.4/parisc-iosapic.c-fix-sparse-warnings.patch [new file with mode: 0644]
queue-5.4/parisc-irq-make-irq_stack_union-static-to-avoid-spar.patch [new file with mode: 0644]
queue-5.4/parisc-sba-fix-compile-warning-wrt-list-of-sba-devic.patch [new file with mode: 0644]
queue-5.4/powerpc-watchpoints-annotate-atomic-context-in-more-.patch [new file with mode: 0644]
queue-5.4/ring-buffer-avoid-softlockup-in-ring_buffer_resize.patch [new file with mode: 0644]
queue-5.4/selftests-ftrace-correctly-enable-event-in-instance-.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/spi-nxp-fspi-reset-the-flshxcr1-registers.patch [new file with mode: 0644]

diff --git a/queue-5.4/ata-libata-eh-do-not-clear-ata_pflag_eh_pending-in-a.patch b/queue-5.4/ata-libata-eh-do-not-clear-ata_pflag_eh_pending-in-a.patch
new file mode 100644 (file)
index 0000000..085c86d
--- /dev/null
@@ -0,0 +1,123 @@
+From bc24fdbaabfa445aa6aedeaee0b5fc36f05b724f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 14 Sep 2023 00:19:16 +0200
+Subject: ata: libata-eh: do not clear ATA_PFLAG_EH_PENDING in ata_eh_reset()
+
+From: Niklas Cassel <niklas.cassel@wdc.com>
+
+[ Upstream commit 80cc944eca4f0baa9c381d0706f3160e491437f2 ]
+
+ata_scsi_port_error_handler() starts off by clearing ATA_PFLAG_EH_PENDING,
+before calling ap->ops->error_handler() (without holding the ap->lock).
+
+If an error IRQ is received while ap->ops->error_handler() is running,
+the irq handler will set ATA_PFLAG_EH_PENDING.
+
+Once ap->ops->error_handler() returns, ata_scsi_port_error_handler()
+checks if ATA_PFLAG_EH_PENDING is set, and if it is, another iteration
+of ATA EH is performed.
+
+The problem is that ATA_PFLAG_EH_PENDING is not only cleared by
+ata_scsi_port_error_handler(), it is also cleared by ata_eh_reset().
+
+ata_eh_reset() is called by ap->ops->error_handler(). This additional
+clearing done by ata_eh_reset() breaks the whole retry logic in
+ata_scsi_port_error_handler(). Thus, if an error IRQ is received while
+ap->ops->error_handler() is running, the port will currently remain
+frozen and will never get re-enabled.
+
+The additional clearing in ata_eh_reset() was introduced in commit
+1e641060c4b5 ("libata: clear eh_info on reset completion").
+
+Looking at the original error report:
+https://marc.info/?l=linux-ide&m=124765325828495&w=2
+
+We can see the following happening:
+[    1.074659] ata3: XXX port freeze
+[    1.074700] ata3: XXX hardresetting link, stopping engine
+[    1.074746] ata3: XXX flipping SControl
+
+[    1.411471] ata3: XXX irq_stat=400040 CONN|PHY
+[    1.411475] ata3: XXX port freeze
+
+[    1.420049] ata3: XXX starting engine
+[    1.420096] ata3: XXX rc=0, class=1
+[    1.420142] ata3: XXX clearing IRQs for thawing
+[    1.420188] ata3: XXX port thawed
+[    1.420234] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
+
+We are not supposed to be able to receive an error IRQ while the port is
+frozen (PxIE is set to 0, i.e. all IRQs for the port are disabled).
+
+AHCI 1.3.1 section 10.7.1.1 First Tier (IS Register) states:
+"Each bit location can be thought of as reporting a '1' if the virtual
+"interrupt line" for that port is indicating it wishes to generate an
+interrupt. That is, if a port has one or more interrupt status bit set,
+and the enables for those status bits are set, then this bit shall be set."
+
+Additionally, AHCI state P:ComInit clearly shows that the state machine
+will only jump to P:ComInitSetIS (which sets IS.IPS(x) to '1'), if PxIE.PCE
+is set to '1'. In our case, PxIE is set to 0, so IS.IPS(x) won't get set.
+
+So IS.IPS(x) only gets set if PxIS and PxIE is set.
+
+AHCI 1.3.1 section 10.7.1.1 First Tier (IS Register) also states:
+"The bits in this register are read/write clear. It is set by the level of
+the virtual interrupt line being a set, and cleared by a write of '1' from
+the software."
+
+So if IS.IPS(x) is set, you need to explicitly clear it by writing a 1 to
+IS.IPS(x) for that port.
+
+Since PxIE is cleared, the only way to get an interrupt while the port is
+frozen, is if IS.IPS(x) is set, and the only way IS.IPS(x) can be set when
+the port is frozen, is if it was set before the port was frozen.
+
+However, since commit 737dd811a3db ("ata: libahci: clear pending interrupt
+status"), we clear both PxIS and IS.IPS(x) after freezing the port, but
+before the COMRESET, so the problem that commit 1e641060c4b5 ("libata:
+clear eh_info on reset completion") fixed can no longer happen.
+
+Thus, revert commit 1e641060c4b5 ("libata: clear eh_info on reset
+completion"), so that the retry logic in ata_scsi_port_error_handler()
+works once again. (The retry logic is still needed, since we can still
+get an error IRQ _after_ the port has been thawed, but before
+ata_scsi_port_error_handler() takes the ap->lock in order to check
+if ATA_PFLAG_EH_PENDING is set.)
+
+Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
+Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/ata/libata-eh.c | 13 +++----------
+ 1 file changed, 3 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
+index fd054dc12a8c4..f82798877702e 100644
+--- a/drivers/ata/libata-eh.c
++++ b/drivers/ata/libata-eh.c
+@@ -2915,18 +2915,11 @@ int ata_eh_reset(struct ata_link *link, int classify,
+                       postreset(slave, classes);
+       }
+-      /*
+-       * Some controllers can't be frozen very well and may set spurious
+-       * error conditions during reset.  Clear accumulated error
+-       * information and re-thaw the port if frozen.  As reset is the
+-       * final recovery action and we cross check link onlineness against
+-       * device classification later, no hotplug event is lost by this.
+-       */
++      /* clear cached SError */
+       spin_lock_irqsave(link->ap->lock, flags);
+-      memset(&link->eh_info, 0, sizeof(link->eh_info));
++      link->eh_info.serror = 0;
+       if (slave)
+-              memset(&slave->eh_info, 0, sizeof(link->eh_info));
+-      ap->pflags &= ~ATA_PFLAG_EH_PENDING;
++              slave->eh_info.serror = 0;
+       spin_unlock_irqrestore(link->ap->lock, flags);
+       if (ap->pflags & ATA_PFLAG_FROZEN)
+-- 
+2.40.1
+
diff --git a/queue-5.4/bpf-clarify-error-expectations-from-bpf_clone_redire.patch b/queue-5.4/bpf-clarify-error-expectations-from-bpf_clone_redire.patch
new file mode 100644 (file)
index 0000000..7cd7ec0
--- /dev/null
@@ -0,0 +1,63 @@
+From d11c52fcabfabf02f0d9c85ed44e39248b51991d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 11 Sep 2023 12:47:30 -0700
+Subject: bpf: Clarify error expectations from bpf_clone_redirect
+
+From: Stanislav Fomichev <sdf@google.com>
+
+[ Upstream commit 7cb779a6867fea00b4209bcf6de2f178a743247d ]
+
+Commit 151e887d8ff9 ("veth: Fixing transmit return status for dropped
+packets") exposed the fact that bpf_clone_redirect is capable of
+returning raw NET_XMIT_XXX return codes.
+
+This is in the conflict with its UAPI doc which says the following:
+"0 on success, or a negative error in case of failure."
+
+Update the UAPI to reflect the fact that bpf_clone_redirect can
+return positive error numbers, but don't explicitly define
+their meaning.
+
+Reported-by: Daniel Borkmann <daniel@iogearbox.net>
+Signed-off-by: Stanislav Fomichev <sdf@google.com>
+Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
+Link: https://lore.kernel.org/bpf/20230911194731.286342-1-sdf@google.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/uapi/linux/bpf.h       | 4 +++-
+ tools/include/uapi/linux/bpf.h | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
+index cb0631098f918..e5250a9b813d6 100644
+--- a/include/uapi/linux/bpf.h
++++ b/include/uapi/linux/bpf.h
+@@ -780,7 +780,9 @@ union bpf_attr {
+  *            performed again, if the helper is used in combination with
+  *            direct packet access.
+  *    Return
+- *            0 on success, or a negative error in case of failure.
++ *            0 on success, or a negative error in case of failure. Positive
++ *            error indicates a potential drop or congestion in the target
++ *            device. The particular positive error codes are not defined.
+  *
+  * u64 bpf_get_current_pid_tgid(void)
+  *    Return
+diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
+index cb0631098f918..e5250a9b813d6 100644
+--- a/tools/include/uapi/linux/bpf.h
++++ b/tools/include/uapi/linux/bpf.h
+@@ -780,7 +780,9 @@ union bpf_attr {
+  *            performed again, if the helper is used in combination with
+  *            direct packet access.
+  *    Return
+- *            0 on success, or a negative error in case of failure.
++ *            0 on success, or a negative error in case of failure. Positive
++ *            error indicates a potential drop or congestion in the target
++ *            device. The particular positive error codes are not defined.
+  *
+  * u64 bpf_get_current_pid_tgid(void)
+  *    Return
+-- 
+2.40.1
+
diff --git a/queue-5.4/fbdev-sh7760fb-depend-on-fb-y.patch b/queue-5.4/fbdev-sh7760fb-depend-on-fb-y.patch
new file mode 100644 (file)
index 0000000..e31ca81
--- /dev/null
@@ -0,0 +1,60 @@
+From 9d06d4c2663c1b5cc5f7d04fec51106a1c7513d9 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 18 Sep 2023 11:03:49 +0200
+Subject: fbdev/sh7760fb: Depend on FB=y
+
+From: Thomas Zimmermann <tzimmermann@suse.de>
+
+[ Upstream commit f75f71b2c418a27a7c05139bb27a0c83adf88d19 ]
+
+Fix linker error if FB=m about missing fb_io_read and fb_io_write. The
+linker's error message suggests that this config setting has already
+been broken for other symbols.
+
+  All errors (new ones prefixed by >>):
+
+     sh4-linux-ld: drivers/video/fbdev/sh7760fb.o: in function `sh7760fb_probe':
+     sh7760fb.c:(.text+0x374): undefined reference to `framebuffer_alloc'
+     sh4-linux-ld: sh7760fb.c:(.text+0x394): undefined reference to `fb_videomode_to_var'
+     sh4-linux-ld: sh7760fb.c:(.text+0x39c): undefined reference to `fb_alloc_cmap'
+     sh4-linux-ld: sh7760fb.c:(.text+0x3a4): undefined reference to `register_framebuffer'
+     sh4-linux-ld: sh7760fb.c:(.text+0x3ac): undefined reference to `fb_dealloc_cmap'
+     sh4-linux-ld: sh7760fb.c:(.text+0x434): undefined reference to `framebuffer_release'
+     sh4-linux-ld: drivers/video/fbdev/sh7760fb.o: in function `sh7760fb_remove':
+     sh7760fb.c:(.text+0x800): undefined reference to `unregister_framebuffer'
+     sh4-linux-ld: sh7760fb.c:(.text+0x804): undefined reference to `fb_dealloc_cmap'
+     sh4-linux-ld: sh7760fb.c:(.text+0x814): undefined reference to `framebuffer_release'
+  >> sh4-linux-ld: drivers/video/fbdev/sh7760fb.o:(.rodata+0xc): undefined reference to `fb_io_read'
+  >> sh4-linux-ld: drivers/video/fbdev/sh7760fb.o:(.rodata+0x10): undefined reference to `fb_io_write'
+     sh4-linux-ld: drivers/video/fbdev/sh7760fb.o:(.rodata+0x2c): undefined reference to `cfb_fillrect'
+     sh4-linux-ld: drivers/video/fbdev/sh7760fb.o:(.rodata+0x30): undefined reference to `cfb_copyarea'
+     sh4-linux-ld: drivers/video/fbdev/sh7760fb.o:(.rodata+0x34): undefined reference to `cfb_imageblit'
+
+Suggested-by: Randy Dunlap <rdunlap@infradead.org>
+Reported-by: kernel test robot <lkp@intel.com>
+Closes: https://lore.kernel.org/oe-kbuild-all/202309130632.LS04CPWu-lkp@intel.com/
+Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
+Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
+Acked-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
+Link: https://patchwork.freedesktop.org/patch/msgid/20230918090400.13264-1-tzimmermann@suse.de
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/video/fbdev/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
+index 124ed0e8454e9..0396df868bc79 100644
+--- a/drivers/video/fbdev/Kconfig
++++ b/drivers/video/fbdev/Kconfig
+@@ -2032,7 +2032,7 @@ config FB_COBALT
+ config FB_SH7760
+       bool "SH7760/SH7763/SH7720/SH7721 LCDC support"
+-      depends on FB && (CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7763 \
++      depends on FB=y && (CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7763 \
+               || CPU_SUBTYPE_SH7720 || CPU_SUBTYPE_SH7721)
+       select FB_CFB_FILLRECT
+       select FB_CFB_COPYAREA
+-- 
+2.40.1
+
diff --git a/queue-5.4/ncsi-propagate-carrier-gain-loss-events-to-the-ncsi-.patch b/queue-5.4/ncsi-propagate-carrier-gain-loss-events-to-the-ncsi-.patch
new file mode 100644 (file)
index 0000000..4f88e18
--- /dev/null
@@ -0,0 +1,40 @@
+From 2a97632d897d2db1c3adb8ee5050ae42a0d16b6a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 15 Sep 2023 09:12:35 -0700
+Subject: ncsi: Propagate carrier gain/loss events to the NCSI controller
+
+From: Johnathan Mantey <johnathanx.mantey@intel.com>
+
+[ Upstream commit 3780bb29311eccb7a1c9641032a112eed237f7e3 ]
+
+Report the carrier/no-carrier state for the network interface
+shared between the BMC and the passthrough channel. Without this
+functionality the BMC is unable to reconfigure the NIC in the event
+of a re-cabling to a different subnet.
+
+Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/ncsi/ncsi-aen.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c
+index 62fb1031763d1..f8854bff286cb 100644
+--- a/net/ncsi/ncsi-aen.c
++++ b/net/ncsi/ncsi-aen.c
+@@ -89,6 +89,11 @@ static int ncsi_aen_handler_lsc(struct ncsi_dev_priv *ndp,
+       if ((had_link == has_link) || chained)
+               return 0;
++      if (had_link)
++              netif_carrier_off(ndp->ndev.dev);
++      else
++              netif_carrier_on(ndp->ndev.dev);
++
+       if (!ndp->multi_package && !nc->package->multi_channel) {
+               if (had_link) {
+                       ndp->flags |= NCSI_DEV_RESHUFFLE;
+-- 
+2.40.1
+
diff --git a/queue-5.4/parisc-drivers-fix-sparse-warning.patch b/queue-5.4/parisc-drivers-fix-sparse-warning.patch
new file mode 100644 (file)
index 0000000..2182841
--- /dev/null
@@ -0,0 +1,35 @@
+From f5b3b5137c00e8bd2cc70b986b50de827683f067 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 31 Aug 2023 22:08:32 +0200
+Subject: parisc: drivers: Fix sparse warning
+
+From: Helge Deller <deller@gmx.de>
+
+[ Upstream commit b137b9d60b8add5620a06c687a71ce18776730b0 ]
+
+Fix "warning: directive in macro's argument list" warning.
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/parisc/kernel/drivers.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c
+index a1476673062e6..f1d4949313286 100644
+--- a/arch/parisc/kernel/drivers.c
++++ b/arch/parisc/kernel/drivers.c
+@@ -924,9 +924,9 @@ static __init void qemu_header(void)
+       pr_info("#define PARISC_MODEL \"%s\"\n\n",
+                       boot_cpu_data.pdc.sys_model_name);
++      #define p ((unsigned long *)&boot_cpu_data.pdc.model)
+       pr_info("#define PARISC_PDC_MODEL 0x%lx, 0x%lx, 0x%lx, "
+               "0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx\n\n",
+-      #define p ((unsigned long *)&boot_cpu_data.pdc.model)
+               p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8]);
+       #undef p
+-- 
+2.40.1
+
diff --git a/queue-5.4/parisc-iosapic.c-fix-sparse-warnings.patch b/queue-5.4/parisc-iosapic.c-fix-sparse-warnings.patch
new file mode 100644 (file)
index 0000000..3952255
--- /dev/null
@@ -0,0 +1,50 @@
+From 25027adc74da45fa503b97021e65d035a27a6d0d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 30 Aug 2023 11:59:55 +0200
+Subject: parisc: iosapic.c: Fix sparse warnings
+
+From: Helge Deller <deller@gmx.de>
+
+[ Upstream commit 927c6c8aa27c284a799b8c18784e37d3373af908 ]
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/parisc/iosapic.c         | 4 ++--
+ drivers/parisc/iosapic_private.h | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c
+index 7914cf3fd24ff..a5d9ec7950deb 100644
+--- a/drivers/parisc/iosapic.c
++++ b/drivers/parisc/iosapic.c
+@@ -202,9 +202,9 @@ static inline void iosapic_write(void __iomem *iosapic, unsigned int reg, u32 va
+ static DEFINE_SPINLOCK(iosapic_lock);
+-static inline void iosapic_eoi(void __iomem *addr, unsigned int data)
++static inline void iosapic_eoi(__le32 __iomem *addr, __le32 data)
+ {
+-      __raw_writel(data, addr);
++      __raw_writel((__force u32)data, addr);
+ }
+ /*
+diff --git a/drivers/parisc/iosapic_private.h b/drivers/parisc/iosapic_private.h
+index 73ecc657ad954..bd8ff40162b4b 100644
+--- a/drivers/parisc/iosapic_private.h
++++ b/drivers/parisc/iosapic_private.h
+@@ -118,8 +118,8 @@ struct iosapic_irt {
+ struct vector_info {
+       struct iosapic_info *iosapic;   /* I/O SAPIC this vector is on */
+       struct irt_entry *irte;         /* IRT entry */
+-      u32 __iomem *eoi_addr;          /* precalculate EOI reg address */
+-      u32     eoi_data;               /* IA64: ?       PA: swapped txn_data */
++      __le32 __iomem *eoi_addr;       /* precalculate EOI reg address */
++      __le32  eoi_data;               /* IA64: ?       PA: swapped txn_data */
+       int     txn_irq;                /* virtual IRQ number for processor */
+       ulong   txn_addr;               /* IA64: id_eid  PA: partial HPA */
+       u32     txn_data;               /* CPU interrupt bit */
+-- 
+2.40.1
+
diff --git a/queue-5.4/parisc-irq-make-irq_stack_union-static-to-avoid-spar.patch b/queue-5.4/parisc-irq-make-irq_stack_union-static-to-avoid-spar.patch
new file mode 100644 (file)
index 0000000..2e999a8
--- /dev/null
@@ -0,0 +1,31 @@
+From 2796d3b9ce115bef5ca16d84b7ead8ad0be7ee07 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 31 Aug 2023 22:36:12 +0200
+Subject: parisc: irq: Make irq_stack_union static to avoid sparse warning
+
+From: Helge Deller <deller@gmx.de>
+
+[ Upstream commit b1bef1388c427cdad7331a9c8eb4ebbbe5b954b0 ]
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/parisc/kernel/irq.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
+index 4d54aa70ea5f3..b4aa5af943ba5 100644
+--- a/arch/parisc/kernel/irq.c
++++ b/arch/parisc/kernel/irq.c
+@@ -388,7 +388,7 @@ union irq_stack_union {
+       volatile unsigned int lock[1];
+ };
+-DEFINE_PER_CPU(union irq_stack_union, irq_stack_union) = {
++static DEFINE_PER_CPU(union irq_stack_union, irq_stack_union) = {
+               .slock = { 1,1,1,1 },
+       };
+ #endif
+-- 
+2.40.1
+
diff --git a/queue-5.4/parisc-sba-fix-compile-warning-wrt-list-of-sba-devic.patch b/queue-5.4/parisc-sba-fix-compile-warning-wrt-list-of-sba-devic.patch
new file mode 100644 (file)
index 0000000..fe9b240
--- /dev/null
@@ -0,0 +1,50 @@
+From 36af087c886a86f381dffb175e60889aba82edab Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 30 Aug 2023 08:10:01 +0200
+Subject: parisc: sba: Fix compile warning wrt list of SBA devices
+
+From: Helge Deller <deller@gmx.de>
+
+[ Upstream commit eb3255ee8f6f4691471a28fbf22db5e8901116cd ]
+
+Fix this makecheck warning:
+drivers/parisc/sba_iommu.c:98:19: warning: symbol 'sba_list'
+       was not declared. Should it be static?
+
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/parisc/include/asm/ropes.h | 3 +++
+ drivers/char/agp/parisc-agp.c   | 2 --
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/arch/parisc/include/asm/ropes.h b/arch/parisc/include/asm/ropes.h
+index 8e51c775c80a6..62399c7ea94a1 100644
+--- a/arch/parisc/include/asm/ropes.h
++++ b/arch/parisc/include/asm/ropes.h
+@@ -86,6 +86,9 @@ struct sba_device {
+       struct ioc              ioc[MAX_IOC];
+ };
++/* list of SBA's in system, see drivers/parisc/sba_iommu.c */
++extern struct sba_device *sba_list;
++
+ #define ASTRO_RUNWAY_PORT     0x582
+ #define IKE_MERCED_PORT               0x803
+ #define REO_MERCED_PORT               0x804
+diff --git a/drivers/char/agp/parisc-agp.c b/drivers/char/agp/parisc-agp.c
+index 514f9f287a781..c6f181702b9a7 100644
+--- a/drivers/char/agp/parisc-agp.c
++++ b/drivers/char/agp/parisc-agp.c
+@@ -394,8 +394,6 @@ find_quicksilver(struct device *dev, void *data)
+ static int __init
+ parisc_agp_init(void)
+ {
+-      extern struct sba_device *sba_list;
+-
+       int err = -1;
+       struct parisc_device *sba = NULL, *lba = NULL;
+       struct lba_device *lbadev = NULL;
+-- 
+2.40.1
+
diff --git a/queue-5.4/powerpc-watchpoints-annotate-atomic-context-in-more-.patch b/queue-5.4/powerpc-watchpoints-annotate-atomic-context-in-more-.patch
new file mode 100644 (file)
index 0000000..b90557f
--- /dev/null
@@ -0,0 +1,58 @@
+From 111666998d83c7e4c6fdf61badcff34a680b8fcb Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 29 Aug 2023 16:34:57 +1000
+Subject: powerpc/watchpoints: Annotate atomic context in more places
+
+From: Benjamin Gray <bgray@linux.ibm.com>
+
+[ Upstream commit 27646b2e02b096a6936b3e3b6ba334ae20763eab ]
+
+It can be easy to miss that the notifier mechanism invokes the callbacks
+in an atomic context, so add some comments to that effect on the two
+handlers we register here.
+
+Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://msgid.link/20230829063457.54157-4-bgray@linux.ibm.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/powerpc/kernel/hw_breakpoint.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c
+index 1007ec36b4cb9..fb736fdb4193f 100644
+--- a/arch/powerpc/kernel/hw_breakpoint.c
++++ b/arch/powerpc/kernel/hw_breakpoint.c
+@@ -247,6 +247,11 @@ static bool stepping_handler(struct pt_regs *regs, struct perf_event *bp,
+       return false;
+ }
++/*
++ * Handle a DABR or DAWR exception.
++ *
++ * Called in atomic context.
++ */
+ int hw_breakpoint_handler(struct die_args *args)
+ {
+       int rc = NOTIFY_STOP;
+@@ -315,6 +320,8 @@ NOKPROBE_SYMBOL(hw_breakpoint_handler);
+ /*
+  * Handle single-step exceptions following a DABR hit.
++ *
++ * Called in atomic context.
+  */
+ static int single_step_dabr_instruction(struct die_args *args)
+ {
+@@ -355,6 +362,8 @@ NOKPROBE_SYMBOL(single_step_dabr_instruction);
+ /*
+  * Handle debug exception notifications.
++ *
++ * Called in atomic context.
+  */
+ int hw_breakpoint_exceptions_notify(
+               struct notifier_block *unused, unsigned long val, void *data)
+-- 
+2.40.1
+
diff --git a/queue-5.4/ring-buffer-avoid-softlockup-in-ring_buffer_resize.patch b/queue-5.4/ring-buffer-avoid-softlockup-in-ring_buffer_resize.patch
new file mode 100644 (file)
index 0000000..6a4644e
--- /dev/null
@@ -0,0 +1,45 @@
+From 9c229928b6d195526d78f514e4656b6d68930d73 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 6 Sep 2023 16:19:30 +0800
+Subject: ring-buffer: Avoid softlockup in ring_buffer_resize()
+
+From: Zheng Yejian <zhengyejian1@huawei.com>
+
+[ Upstream commit f6bd2c92488c30ef53b5bd80c52f0a7eee9d545a ]
+
+When user resize all trace ring buffer through file 'buffer_size_kb',
+then in ring_buffer_resize(), kernel allocates buffer pages for each
+cpu in a loop.
+
+If the kernel preemption model is PREEMPT_NONE and there are many cpus
+and there are many buffer pages to be allocated, it may not give up cpu
+for a long time and finally cause a softlockup.
+
+To avoid it, call cond_resched() after each cpu buffer allocation.
+
+Link: https://lore.kernel.org/linux-trace-kernel/20230906081930.3939106-1-zhengyejian1@huawei.com
+
+Cc: <mhiramat@kernel.org>
+Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
+Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/trace/ring_buffer.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
+index 445475c229b3a..2a4fb4f1e3cad 100644
+--- a/kernel/trace/ring_buffer.c
++++ b/kernel/trace/ring_buffer.c
+@@ -1821,6 +1821,8 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size,
+                               err = -ENOMEM;
+                               goto out_err;
+                       }
++
++                      cond_resched();
+               }
+               get_online_cpus();
+-- 
+2.40.1
+
diff --git a/queue-5.4/selftests-ftrace-correctly-enable-event-in-instance-.patch b/queue-5.4/selftests-ftrace-correctly-enable-event-in-instance-.patch
new file mode 100644 (file)
index 0000000..b65e130
--- /dev/null
@@ -0,0 +1,51 @@
+From e7c6ee36f4711191ea7c06ce6fe6983630efce9d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 26 Jun 2023 08:11:44 +0800
+Subject: selftests/ftrace: Correctly enable event in instance-event.tc
+
+From: Zheng Yejian <zhengyejian1@huawei.com>
+
+[ Upstream commit f4e4ada586995b17f828c6d147d1800eb1471450 ]
+
+Function instance_set() expects to enable event 'sched_switch', so we
+should set 1 to its 'enable' file.
+
+Testcase passed after this patch:
+  # ./ftracetest test.d/instances/instance-event.tc
+  === Ftrace unit tests ===
+  [1] Test creation and deletion of trace instances while setting an event
+  [PASS]
+
+  # of passed:  1
+  # of failed:  0
+  # of unresolved:  0
+  # of untested:  0
+  # of unsupported:  0
+  # of xfailed:  0
+  # of undefined(test bug):  0
+
+Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
+Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
+Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
+Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ .../testing/selftests/ftrace/test.d/instances/instance-event.tc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc b/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc
+index 4fa0f79144f4a..9473934a573a1 100644
+--- a/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc
++++ b/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc
+@@ -43,7 +43,7 @@ instance_read() {
+ instance_set() {
+         while :; do
+-                echo 1 > foo/events/sched/sched_switch
++                echo 1 > foo/events/sched/sched_switch/enable
+         done 2> /dev/null
+ }
+-- 
+2.40.1
+
index e3049afe4de11dd4fb0b2f844c5f52fe8656d6b3..52b8b0eb7fcf115a6a9191e3b2a416e0d0a6d17a 100644 (file)
@@ -52,3 +52,15 @@ xtensa-iss-network-make-functions-static.patch
 xtensa-boot-don-t-add-include-dirs.patch
 xtensa-boot-lib-fix-function-prototypes.patch
 gpio-pmic-eic-sprd-add-can_sleep-flag-for-pmic-eic-c.patch
+parisc-sba-fix-compile-warning-wrt-list-of-sba-devic.patch
+parisc-iosapic.c-fix-sparse-warnings.patch
+parisc-drivers-fix-sparse-warning.patch
+parisc-irq-make-irq_stack_union-static-to-avoid-spar.patch
+selftests-ftrace-correctly-enable-event-in-instance-.patch
+ring-buffer-avoid-softlockup-in-ring_buffer_resize.patch
+ata-libata-eh-do-not-clear-ata_pflag_eh_pending-in-a.patch
+spi-nxp-fspi-reset-the-flshxcr1-registers.patch
+bpf-clarify-error-expectations-from-bpf_clone_redire.patch
+powerpc-watchpoints-annotate-atomic-context-in-more-.patch
+ncsi-propagate-carrier-gain-loss-events-to-the-ncsi-.patch
+fbdev-sh7760fb-depend-on-fb-y.patch
diff --git a/queue-5.4/spi-nxp-fspi-reset-the-flshxcr1-registers.patch b/queue-5.4/spi-nxp-fspi-reset-the-flshxcr1-registers.patch
new file mode 100644 (file)
index 0000000..a3937ad
--- /dev/null
@@ -0,0 +1,41 @@
+From 618551cdef664e8c5caaf20689585c40c2428197 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 6 Sep 2023 13:32:54 -0500
+Subject: spi: nxp-fspi: reset the FLSHxCR1 registers
+
+From: Han Xu <han.xu@nxp.com>
+
+[ Upstream commit 18495676f7886e105133f1dc06c1d5e8d5436f32 ]
+
+Reset the FLSHxCR1 registers to default value. ROM may set the register
+value and it affects the SPI NAND normal functions.
+
+Signed-off-by: Han Xu <han.xu@nxp.com>
+Link: https://lore.kernel.org/r/20230906183254.235847-1-han.xu@nxp.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/spi/spi-nxp-fspi.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c
+index 36a44a837031d..ee1b488d7dedc 100644
+--- a/drivers/spi/spi-nxp-fspi.c
++++ b/drivers/spi/spi-nxp-fspi.c
+@@ -897,6 +897,13 @@ static int nxp_fspi_default_setup(struct nxp_fspi *f)
+       fspi_writel(f, FSPI_AHBCR_PREF_EN | FSPI_AHBCR_RDADDROPT,
+                base + FSPI_AHBCR);
++      /* Reset the FLSHxCR1 registers. */
++      reg = FSPI_FLSHXCR1_TCSH(0x3) | FSPI_FLSHXCR1_TCSS(0x3);
++      fspi_writel(f, reg, base + FSPI_FLSHA1CR1);
++      fspi_writel(f, reg, base + FSPI_FLSHA2CR1);
++      fspi_writel(f, reg, base + FSPI_FLSHB1CR1);
++      fspi_writel(f, reg, base + FSPI_FLSHB2CR1);
++
+       /* AHB Read - Set lut sequence ID for all CS. */
+       fspi_writel(f, SEQID_LUT, base + FSPI_FLSHA1CR2);
+       fspi_writel(f, SEQID_LUT, base + FSPI_FLSHA2CR2);
+-- 
+2.40.1
+