]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.15
authorSasha Levin <sashal@kernel.org>
Tue, 18 Apr 2023 01:24:49 +0000 (21:24 -0400)
committerSasha Levin <sashal@kernel.org>
Tue, 18 Apr 2023 01:24:49 +0000 (21:24 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
20 files changed:
queue-5.15/cgroup-cpuset-make-cpuset_fork-handle-clone_into_cgr.patch [new file with mode: 0644]
queue-5.15/cgroup-cpuset-skip-spread-flags-update-on-v2.patch [new file with mode: 0644]
queue-5.15/i2c-ocores-generate-stop-condition-after-timeout-in-.patch [new file with mode: 0644]
queue-5.15/kbuild-use-more-subdir-for-visiting-subdirectories-w.patch [new file with mode: 0644]
queue-5.15/nvme-pci-add-nvme_quirk_bogus_nid-for-adata-xpg-gamm.patch [new file with mode: 0644]
queue-5.15/nvme-pci-add-nvme_quirk_bogus_nid-for-lexar-nm610.patch [new file with mode: 0644]
queue-5.15/nvme-pci-add-nvme_quirk_bogus_nid-for-lexar-nm760.patch [new file with mode: 0644]
queue-5.15/nvme-pci-add-nvme_quirk_bogus_nid-for-t-force-z330-s.patch [new file with mode: 0644]
queue-5.15/nvme-pci-avoid-the-deepest-sleep-state-on-zhitai-tip.patch [new file with mode: 0644]
queue-5.15/nvme-pci-crucial-p2-has-bogus-namespace-ids.patch [new file with mode: 0644]
queue-5.15/nvme-pci-mark-lexar-nm760-as-ignore_dev_subnqn.patch [new file with mode: 0644]
queue-5.15/powerpc-papr_scm-update-the-numa-distance-table-for-.patch [new file with mode: 0644]
queue-5.15/purgatory-fix-disabling-debug-info.patch [new file with mode: 0644]
queue-5.15/sched-fair-fix-imbalance-overflow.patch [new file with mode: 0644]
queue-5.15/sched-fair-move-calculate-of-avg_load-to-a-better-lo.patch [new file with mode: 0644]
queue-5.15/series
queue-5.15/sh-remove-meaningless-archclean-line.patch [new file with mode: 0644]
queue-5.15/ubi-fix-deadlock-caused-by-recursively-holding-work_.patch [new file with mode: 0644]
queue-5.15/ubi-fix-failure-attaching-when-vid_hdr-offset-equals.patch [new file with mode: 0644]
queue-5.15/x86-rtc-remove-__init-for-runtime-functions.patch [new file with mode: 0644]

diff --git a/queue-5.15/cgroup-cpuset-make-cpuset_fork-handle-clone_into_cgr.patch b/queue-5.15/cgroup-cpuset-make-cpuset_fork-handle-clone_into_cgr.patch
new file mode 100644 (file)
index 0000000..6b8c947
--- /dev/null
@@ -0,0 +1,133 @@
+From cf2b50f99e27a18051e57b2c7beebebdc7036e46 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 11 Apr 2023 09:35:58 -0400
+Subject: cgroup/cpuset: Make cpuset_fork() handle CLONE_INTO_CGROUP properly
+
+From: Waiman Long <longman@redhat.com>
+
+[ Upstream commit 42a11bf5c5436e91b040aeb04063be1710bb9f9c ]
+
+By default, the clone(2) syscall spawn a child process into the same
+cgroup as its parent. With the use of the CLONE_INTO_CGROUP flag
+introduced by commit ef2c41cf38a7 ("clone3: allow spawning processes
+into cgroups"), the child will be spawned into a different cgroup which
+is somewhat similar to writing the child's tid into "cgroup.threads".
+
+The current cpuset_fork() method does not properly handle the
+CLONE_INTO_CGROUP case where the cpuset of the child may be different
+from that of its parent.  Update the cpuset_fork() method to treat the
+CLONE_INTO_CGROUP case similar to cpuset_attach().
+
+Since the newly cloned task has not been running yet, its actual
+memory usage isn't known. So it is not necessary to make change to mm
+in cpuset_fork().
+
+Fixes: ef2c41cf38a7 ("clone3: allow spawning processes into cgroups")
+Reported-by: Giuseppe Scrivano <gscrivan@redhat.com>
+Signed-off-by: Waiman Long <longman@redhat.com>
+Cc: stable@vger.kernel.org # v5.7+
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/cgroup/cpuset.c | 62 ++++++++++++++++++++++++++++--------------
+ 1 file changed, 42 insertions(+), 20 deletions(-)
+
+diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
+index 3d254498eb275..a6829e21b50c3 100644
+--- a/kernel/cgroup/cpuset.c
++++ b/kernel/cgroup/cpuset.c
+@@ -2242,16 +2242,33 @@ static void cpuset_cancel_attach(struct cgroup_taskset *tset)
+ }
+ /*
+- * Protected by cpuset_rwsem.  cpus_attach is used only by cpuset_attach()
++ * Protected by cpuset_rwsem. cpus_attach is used only by cpuset_attach_task()
+  * but we can't allocate it dynamically there.  Define it global and
+  * allocate from cpuset_init().
+  */
+ static cpumask_var_t cpus_attach;
++static nodemask_t cpuset_attach_nodemask_to;
++
++static void cpuset_attach_task(struct cpuset *cs, struct task_struct *task)
++{
++      percpu_rwsem_assert_held(&cpuset_rwsem);
++
++      if (cs != &top_cpuset)
++              guarantee_online_cpus(task, cpus_attach);
++      else
++              cpumask_copy(cpus_attach, task_cpu_possible_mask(task));
++      /*
++       * can_attach beforehand should guarantee that this doesn't
++       * fail.  TODO: have a better way to handle failure here
++       */
++      WARN_ON_ONCE(set_cpus_allowed_ptr(task, cpus_attach));
++
++      cpuset_change_task_nodemask(task, &cpuset_attach_nodemask_to);
++      cpuset_update_task_spread_flags(cs, task);
++}
+ static void cpuset_attach(struct cgroup_taskset *tset)
+ {
+-      /* static buf protected by cpuset_rwsem */
+-      static nodemask_t cpuset_attach_nodemask_to;
+       struct task_struct *task;
+       struct task_struct *leader;
+       struct cgroup_subsys_state *css;
+@@ -2266,20 +2283,8 @@ static void cpuset_attach(struct cgroup_taskset *tset)
+       guarantee_online_mems(cs, &cpuset_attach_nodemask_to);
+-      cgroup_taskset_for_each(task, css, tset) {
+-              if (cs != &top_cpuset)
+-                      guarantee_online_cpus(task, cpus_attach);
+-              else
+-                      cpumask_copy(cpus_attach, task_cpu_possible_mask(task));
+-              /*
+-               * can_attach beforehand should guarantee that this doesn't
+-               * fail.  TODO: have a better way to handle failure here
+-               */
+-              WARN_ON_ONCE(set_cpus_allowed_ptr(task, cpus_attach));
+-
+-              cpuset_change_task_nodemask(task, &cpuset_attach_nodemask_to);
+-              cpuset_update_task_spread_flags(cs, task);
+-      }
++      cgroup_taskset_for_each(task, css, tset)
++              cpuset_attach_task(cs, task);
+       /*
+        * Change mm for all threadgroup leaders. This is expensive and may
+@@ -2952,11 +2957,28 @@ static void cpuset_bind(struct cgroup_subsys_state *root_css)
+  */
+ static void cpuset_fork(struct task_struct *task)
+ {
+-      if (task_css_is_root(task, cpuset_cgrp_id))
++      struct cpuset *cs;
++      bool same_cs;
++
++      rcu_read_lock();
++      cs = task_cs(task);
++      same_cs = (cs == task_cs(current));
++      rcu_read_unlock();
++
++      if (same_cs) {
++              if (cs == &top_cpuset)
++                      return;
++
++              set_cpus_allowed_ptr(task, current->cpus_ptr);
++              task->mems_allowed = current->mems_allowed;
+               return;
++      }
+-      set_cpus_allowed_ptr(task, current->cpus_ptr);
+-      task->mems_allowed = current->mems_allowed;
++      /* CLONE_INTO_CGROUP */
++      percpu_down_write(&cpuset_rwsem);
++      guarantee_online_mems(cs, &cpuset_attach_nodemask_to);
++      cpuset_attach_task(cs, task);
++      percpu_up_write(&cpuset_rwsem);
+ }
+ struct cgroup_subsys cpuset_cgrp_subsys = {
+-- 
+2.39.2
+
diff --git a/queue-5.15/cgroup-cpuset-skip-spread-flags-update-on-v2.patch b/queue-5.15/cgroup-cpuset-skip-spread-flags-update-on-v2.patch
new file mode 100644 (file)
index 0000000..079c1d7
--- /dev/null
@@ -0,0 +1,65 @@
+From 964498edc3a87e450ee8c127ce2700db134d67de Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 12 Nov 2022 17:19:38 -0500
+Subject: cgroup/cpuset: Skip spread flags update on v2
+
+From: Waiman Long <longman@redhat.com>
+
+[ Upstream commit 18f9a4d47527772515ad6cbdac796422566e6440 ]
+
+Cpuset v2 has no spread flags to set. So we can skip spread
+flags update if cpuset v2 is being used. Also change the name to
+cpuset_update_task_spread_flags() to indicate that there are multiple
+spread flags.
+
+Signed-off-by: Waiman Long <longman@redhat.com>
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Stable-dep-of: 42a11bf5c543 ("cgroup/cpuset: Make cpuset_fork() handle CLONE_INTO_CGROUP properly")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/cgroup/cpuset.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
+index fb895eaf3a7c3..3d254498eb275 100644
+--- a/kernel/cgroup/cpuset.c
++++ b/kernel/cgroup/cpuset.c
+@@ -450,11 +450,15 @@ static void guarantee_online_mems(struct cpuset *cs, nodemask_t *pmask)
+ /*
+  * update task's spread flag if cpuset's page/slab spread flag is set
+  *
+- * Call with callback_lock or cpuset_rwsem held.
++ * Call with callback_lock or cpuset_rwsem held. The check can be skipped
++ * if on default hierarchy.
+  */
+-static void cpuset_update_task_spread_flag(struct cpuset *cs,
++static void cpuset_update_task_spread_flags(struct cpuset *cs,
+                                       struct task_struct *tsk)
+ {
++      if (cgroup_subsys_on_dfl(cpuset_cgrp_subsys))
++              return;
++
+       if (is_spread_page(cs))
+               task_set_spread_page(tsk);
+       else
+@@ -1941,7 +1945,7 @@ static void update_tasks_flags(struct cpuset *cs)
+       css_task_iter_start(&cs->css, 0, &it);
+       while ((task = css_task_iter_next(&it)))
+-              cpuset_update_task_spread_flag(cs, task);
++              cpuset_update_task_spread_flags(cs, task);
+       css_task_iter_end(&it);
+ }
+@@ -2274,7 +2278,7 @@ static void cpuset_attach(struct cgroup_taskset *tset)
+               WARN_ON_ONCE(set_cpus_allowed_ptr(task, cpus_attach));
+               cpuset_change_task_nodemask(task, &cpuset_attach_nodemask_to);
+-              cpuset_update_task_spread_flag(cs, task);
++              cpuset_update_task_spread_flags(cs, task);
+       }
+       /*
+-- 
+2.39.2
+
diff --git a/queue-5.15/i2c-ocores-generate-stop-condition-after-timeout-in-.patch b/queue-5.15/i2c-ocores-generate-stop-condition-after-timeout-in-.patch
new file mode 100644 (file)
index 0000000..d7bfec0
--- /dev/null
@@ -0,0 +1,106 @@
+From 7e90687cda10f503a5d49283939e47e00708cf9d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 13 Apr 2023 11:37:37 +0200
+Subject: i2c: ocores: generate stop condition after timeout in polling mode
+
+From: Gregor Herburger <gregor.herburger@tq-group.com>
+
+[ Upstream commit f8160d3b35fc94491bb0cb974dbda310ef96c0e2 ]
+
+In polling mode, no stop condition is generated after a timeout. This
+causes SCL to remain low and thereby block the bus. If this happens
+during a transfer it can cause slaves to misinterpret the subsequent
+transfer and return wrong values.
+
+To solve this, pass the ETIMEDOUT error up from ocores_process_polling()
+instead of setting STATE_ERROR directly. The caller is adjusted to call
+ocores_process_timeout() on error both in polling and in IRQ mode, which
+will set STATE_ERROR and generate a stop condition.
+
+Fixes: 69c8c0c0efa8 ("i2c: ocores: add polling interface")
+Signed-off-by: Gregor Herburger <gregor.herburger@tq-group.com>
+Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
+Acked-by: Peter Korsgaard <peter@korsgaard.com>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Reviewed-by: Federico Vaga <federico.vaga@cern.ch>
+Signed-off-by: Wolfram Sang <wsa@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/i2c/busses/i2c-ocores.c | 35 ++++++++++++++++++---------------
+ 1 file changed, 19 insertions(+), 16 deletions(-)
+
+diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
+index a0af027db04c1..2e575856c5cd5 100644
+--- a/drivers/i2c/busses/i2c-ocores.c
++++ b/drivers/i2c/busses/i2c-ocores.c
+@@ -342,18 +342,18 @@ static int ocores_poll_wait(struct ocores_i2c *i2c)
+  * ocores_isr(), we just add our polling code around it.
+  *
+  * It can run in atomic context
++ *
++ * Return: 0 on success, -ETIMEDOUT on timeout
+  */
+-static void ocores_process_polling(struct ocores_i2c *i2c)
++static int ocores_process_polling(struct ocores_i2c *i2c)
+ {
+-      while (1) {
+-              irqreturn_t ret;
+-              int err;
++      irqreturn_t ret;
++      int err = 0;
++      while (1) {
+               err = ocores_poll_wait(i2c);
+-              if (err) {
+-                      i2c->state = STATE_ERROR;
++              if (err)
+                       break; /* timeout */
+-              }
+               ret = ocores_isr(-1, i2c);
+               if (ret == IRQ_NONE)
+@@ -364,13 +364,15 @@ static void ocores_process_polling(struct ocores_i2c *i2c)
+                                       break;
+               }
+       }
++
++      return err;
+ }
+ static int ocores_xfer_core(struct ocores_i2c *i2c,
+                           struct i2c_msg *msgs, int num,
+                           bool polling)
+ {
+-      int ret;
++      int ret = 0;
+       u8 ctrl;
+       ctrl = oc_getreg(i2c, OCI2C_CONTROL);
+@@ -388,15 +390,16 @@ static int ocores_xfer_core(struct ocores_i2c *i2c,
+       oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_START);
+       if (polling) {
+-              ocores_process_polling(i2c);
++              ret = ocores_process_polling(i2c);
+       } else {
+-              ret = wait_event_timeout(i2c->wait,
+-                                       (i2c->state == STATE_ERROR) ||
+-                                       (i2c->state == STATE_DONE), HZ);
+-              if (ret == 0) {
+-                      ocores_process_timeout(i2c);
+-                      return -ETIMEDOUT;
+-              }
++              if (wait_event_timeout(i2c->wait,
++                                     (i2c->state == STATE_ERROR) ||
++                                     (i2c->state == STATE_DONE), HZ) == 0)
++                      ret = -ETIMEDOUT;
++      }
++      if (ret) {
++              ocores_process_timeout(i2c);
++              return ret;
+       }
+       return (i2c->state == STATE_DONE) ? num : -EIO;
+-- 
+2.39.2
+
diff --git a/queue-5.15/kbuild-use-more-subdir-for-visiting-subdirectories-w.patch b/queue-5.15/kbuild-use-more-subdir-for-visiting-subdirectories-w.patch
new file mode 100644 (file)
index 0000000..f2204b9
--- /dev/null
@@ -0,0 +1,678 @@
+From 90e1d062db3a94d30ad294eb8a7cba4401765875 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 13 Oct 2021 15:36:22 +0900
+Subject: kbuild: use more subdir- for visiting subdirectories while cleaning
+
+From: Masahiro Yamada <masahiroy@kernel.org>
+
+[ Upstream commit 8212f8986d311ccf6a72305e6bdbd814691701d6 ]
+
+Documentation/kbuild/makefiles.rst suggests to use "archclean" for
+cleaning arch/$(SRCARCH)/boot/, but it is not a hard requirement.
+
+Since commit d92cc4d51643 ("kbuild: require all architectures to have
+arch/$(SRCARCH)/Kbuild"), we can use the "subdir- += boot" trick for
+all architectures. This can take advantage of the parallel option (-j)
+for "make clean".
+
+I also cleaned up the comments in arch/$(SRCARCH)/Makefile. The "archdep"
+target no longer exists.
+
+Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
+Reviewed-by: Kees Cook <keescook@chromium.org>
+Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
+Stable-dep-of: d83806c4c0cc ("purgatory: fix disabling debug info")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ Documentation/kbuild/makefiles.rst | 17 ++---------------
+ arch/alpha/Kbuild                  |  3 +++
+ arch/alpha/Makefile                |  3 ---
+ arch/arc/Kbuild                    |  3 +++
+ arch/arc/Makefile                  |  3 ---
+ arch/arm/Kbuild                    |  3 +++
+ arch/arm/Makefile                  |  4 ----
+ arch/arm64/Kbuild                  |  3 +++
+ arch/arm64/Makefile                |  7 -------
+ arch/arm64/kernel/Makefile         |  3 +++
+ arch/csky/Kbuild                   |  3 +++
+ arch/csky/Makefile                 |  3 ---
+ arch/h8300/Kbuild                  |  3 +++
+ arch/h8300/Makefile                |  3 ---
+ arch/ia64/Makefile                 |  2 --
+ arch/m68k/Makefile                 |  4 +---
+ arch/microblaze/Kbuild             |  3 +++
+ arch/microblaze/Makefile           |  3 ---
+ arch/mips/Kbuild                   |  3 +++
+ arch/mips/Makefile                 |  8 +-------
+ arch/mips/boot/Makefile            |  3 +++
+ arch/nds32/Kbuild                  |  3 +++
+ arch/nds32/Makefile                |  3 ---
+ arch/nios2/Kbuild                  |  3 +++
+ arch/nios2/Makefile                |  6 +-----
+ arch/openrisc/Kbuild               |  3 +++
+ arch/openrisc/Makefile             |  7 +------
+ arch/parisc/Kbuild                 |  3 +++
+ arch/parisc/Makefile               |  7 +------
+ arch/powerpc/Kbuild                |  3 +++
+ arch/powerpc/Makefile              |  7 +------
+ arch/riscv/Kbuild                  |  3 +++
+ arch/riscv/Makefile                |  7 +------
+ arch/s390/Kbuild                   |  3 +++
+ arch/s390/Makefile                 |  8 +-------
+ arch/sh/Kbuild                     |  3 +++
+ arch/sh/Makefile                   |  3 ---
+ arch/sparc/Kbuild                  |  3 +++
+ arch/sparc/Makefile                |  3 ---
+ arch/x86/Kbuild                    |  3 +++
+ arch/x86/Makefile                  |  2 --
+ arch/xtensa/Makefile               |  4 +---
+ 42 files changed, 71 insertions(+), 103 deletions(-)
+
+diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst
+index db3af0b45bafa..b008b90b92c9f 100644
+--- a/Documentation/kbuild/makefiles.rst
++++ b/Documentation/kbuild/makefiles.rst
+@@ -1050,22 +1050,9 @@ is not sufficient this sometimes needs to be explicit.
+ The above assignment instructs kbuild to descend down in the
+ directory compressed/ when "make clean" is executed.
+-To support the clean infrastructure in the Makefiles that build the
+-final bootimage there is an optional target named archclean:
+-
+-      Example::
+-
+-              #arch/x86/Makefile
+-              archclean:
+-                      $(Q)$(MAKE) $(clean)=arch/x86/boot
+-
+-When "make clean" is executed, make will descend down in arch/x86/boot,
+-and clean as usual. The Makefile located in arch/x86/boot/ may use
+-the subdir- trick to descend further down.
+-
+ Note 1: arch/$(SRCARCH)/Makefile cannot use "subdir-", because that file is
+-included in the top level makefile, and the kbuild infrastructure
+-is not operational at that point.
++included in the top level makefile. Instead, arch/$(SRCARCH)/Kbuild can use
++"subdir-".
+ Note 2: All directories listed in core-y, libs-y, drivers-y and net-y will
+ be visited during "make clean".
+diff --git a/arch/alpha/Kbuild b/arch/alpha/Kbuild
+index c2302017403a9..345d79df24bb9 100644
+--- a/arch/alpha/Kbuild
++++ b/arch/alpha/Kbuild
+@@ -1,3 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0-only
+ obj-y                 += kernel/ mm/
+ obj-$(CONFIG_MATHEMU) += math-emu/
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile
+index 52529ee42dac9..881cb913e23ab 100644
+--- a/arch/alpha/Makefile
++++ b/arch/alpha/Makefile
+@@ -55,9 +55,6 @@ $(boot)/vmlinux.gz: vmlinux
+ bootimage bootpfile bootpzfile: vmlinux
+       $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+-
+ archheaders:
+       $(Q)$(MAKE) $(build)=arch/alpha/kernel/syscalls all
+diff --git a/arch/arc/Kbuild b/arch/arc/Kbuild
+index 699d8cae9b1fc..b94102fff68b4 100644
+--- a/arch/arc/Kbuild
++++ b/arch/arc/Kbuild
+@@ -1,3 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ obj-y += kernel/
+ obj-y += mm/
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/arc/Makefile b/arch/arc/Makefile
+index 8782a03f24a8e..f252e7b924e96 100644
+--- a/arch/arc/Makefile
++++ b/arch/arc/Makefile
+@@ -112,6 +112,3 @@ uImage: $(uimage-default-y)
+       @$(kecho) '  Image $(boot)/uImage is ready'
+ CLEAN_FILES += $(boot)/uImage
+-
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+diff --git a/arch/arm/Kbuild b/arch/arm/Kbuild
+index 5208f7061524b..b506622e7e23a 100644
+--- a/arch/arm/Kbuild
++++ b/arch/arm/Kbuild
+@@ -9,3 +9,6 @@ obj-y                          += kernel/ mm/ common/
+ obj-y                         += probes/
+ obj-y                         += net/
+ obj-y                         += crypto/
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/arm/Makefile b/arch/arm/Makefile
+index fa45837b8065c..0fa2a6218e5eb 100644
+--- a/arch/arm/Makefile
++++ b/arch/arm/Makefile
+@@ -317,10 +317,6 @@ ifeq ($(CONFIG_VDSO),y)
+       $(Q)$(MAKE) $(build)=arch/arm/vdso $@
+ endif
+-# We use MRPROPER_FILES and CLEAN_FILES now
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+-
+ # My testing targets (bypasses dependencies)
+ bp:;  $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage
+diff --git a/arch/arm64/Kbuild b/arch/arm64/Kbuild
+index ea7ab4ca81f92..5bfbf7d79c99b 100644
+--- a/arch/arm64/Kbuild
++++ b/arch/arm64/Kbuild
+@@ -4,3 +4,6 @@ obj-$(CONFIG_KVM)      += kvm/
+ obj-$(CONFIG_XEN)     += xen/
+ obj-$(subst m,y,$(CONFIG_HYPERV))     += hyperv/
+ obj-$(CONFIG_CRYPTO)  += crypto/
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
+index c744b1e7b3569..e8cfc5868aa8e 100644
+--- a/arch/arm64/Makefile
++++ b/arch/arm64/Makefile
+@@ -182,13 +182,6 @@ ifeq ($(CONFIG_ARM64_USE_LSE_ATOMICS),y)
+   endif
+ endif
+-
+-# We use MRPROPER_FILES and CLEAN_FILES now
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+-      $(Q)$(MAKE) $(clean)=arch/arm64/kernel/vdso
+-      $(Q)$(MAKE) $(clean)=arch/arm64/kernel/vdso32
+-
+ ifeq ($(KBUILD_EXTMOD),)
+ # We need to generate vdso-offsets.h before compiling certain files in kernel/.
+ # In order to do that, we should use the archprepare target, but we can't since
+diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile
+index 749e31475e413..db557856854e7 100644
+--- a/arch/arm64/kernel/Makefile
++++ b/arch/arm64/kernel/Makefile
+@@ -85,3 +85,6 @@ extra-y                                      += $(head-y) vmlinux.lds
+ ifeq ($(CONFIG_DEBUG_EFI),y)
+ AFLAGS_head.o += -DVMLINUX_PATH="\"$(realpath $(objtree)/vmlinux)\""
+ endif
++
++# for cleaning
++subdir- += vdso vdso32
+diff --git a/arch/csky/Kbuild b/arch/csky/Kbuild
+index a4e40e534e6a8..4e39f7abdeb6d 100644
+--- a/arch/csky/Kbuild
++++ b/arch/csky/Kbuild
+@@ -1 +1,4 @@
+ # SPDX-License-Identifier: GPL-2.0-only
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/csky/Makefile b/arch/csky/Makefile
+index 37f593a4bf536..8668050776364 100644
+--- a/arch/csky/Makefile
++++ b/arch/csky/Makefile
+@@ -76,9 +76,6 @@ all: zImage
+ zImage Image uImage: vmlinux
+       $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+-
+ define archhelp
+   echo  '* zImage       - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
+   echo  '  Image        - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
+diff --git a/arch/h8300/Kbuild b/arch/h8300/Kbuild
+index b2583e7efbd1d..e4703f3534cca 100644
+--- a/arch/h8300/Kbuild
++++ b/arch/h8300/Kbuild
+@@ -1,2 +1,5 @@
+ # SPDX-License-Identifier: GPL-2.0-only
+ obj-y += kernel/ mm/ boot/dts/
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
+index eb4cb8f6830c5..807f41e60ee4a 100644
+--- a/arch/h8300/Makefile
++++ b/arch/h8300/Makefile
+@@ -34,9 +34,6 @@ libs-y       += arch/$(ARCH)/lib/
+ boot := arch/h8300/boot
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+-
+ vmlinux.srec vmlinux.bin zImage uImage.bin: vmlinux
+       $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
+diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
+index 7e548c654a290..3b3ac3e1f2728 100644
+--- a/arch/ia64/Makefile
++++ b/arch/ia64/Makefile
+@@ -67,8 +67,6 @@ vmlinux.bin: vmlinux FORCE
+ unwcheck: vmlinux
+       -$(Q)READELF=$(READELF) $(PYTHON3) $(srctree)/arch/ia64/scripts/unwcheck.py $<
+-archclean:
+-
+ archheaders:
+       $(Q)$(MAKE) $(build)=arch/ia64/kernel/syscalls all
+diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
+index dd0c0ec67f670..740fc97b9c0f0 100644
+--- a/arch/m68k/Makefile
++++ b/arch/m68k/Makefile
+@@ -2,9 +2,7 @@
+ # m68k/Makefile
+ #
+ # This file is included by the global makefile so that you can add your own
+-# architecture-specific flags and dependencies. Remember to do have actions
+-# for "archclean" and "archdep" for cleaning up and making dependencies for
+-# this architecture
++# architecture-specific flags and dependencies.
+ #
+ # This file is subject to the terms and conditions of the GNU General Public
+ # License.  See the file "COPYING" in the main directory of this archive
+diff --git a/arch/microblaze/Kbuild b/arch/microblaze/Kbuild
+index a1c5978893198..077a0b8e96157 100644
+--- a/arch/microblaze/Kbuild
++++ b/arch/microblaze/Kbuild
+@@ -3,3 +3,6 @@ obj-y                  += kernel/
+ obj-y                 += mm/
+ obj-$(CONFIG_PCI)     += pci/
+ obj-y                 += boot/dts/
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile
+index 9adc6b6434dfe..e775a696aa6fc 100644
+--- a/arch/microblaze/Makefile
++++ b/arch/microblaze/Makefile
+@@ -60,9 +60,6 @@ export DTB
+ all: linux.bin
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+-
+ archheaders:
+       $(Q)$(MAKE) $(build)=arch/microblaze/kernel/syscalls all
+diff --git a/arch/mips/Kbuild b/arch/mips/Kbuild
+index d5d6ef9bb9867..9e8071f0e58ff 100644
+--- a/arch/mips/Kbuild
++++ b/arch/mips/Kbuild
+@@ -25,3 +25,6 @@ obj-y += vdso/
+ ifdef CONFIG_KVM
+ obj-y += kvm/
+ endif
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/mips/Makefile b/arch/mips/Makefile
+index f7b58da2f3889..ace7f033de07c 100644
+--- a/arch/mips/Makefile
++++ b/arch/mips/Makefile
+@@ -8,8 +8,7 @@
+ # Copyright (C) 2002, 2003, 2004  Maciej W. Rozycki
+ #
+ # This file is included by the global makefile so that you can add your own
+-# architecture-specific flags and dependencies. Remember to do have actions
+-# for "archclean" cleaning up for this architecture.
++# architecture-specific flags and dependencies.
+ #
+ archscripts: scripts_basic
+@@ -428,11 +427,6 @@ endif
+       $(Q)install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE)
+       $(Q)install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)
+-archclean:
+-      $(Q)$(MAKE) $(clean)=arch/mips/boot
+-      $(Q)$(MAKE) $(clean)=arch/mips/boot/compressed
+-      $(Q)$(MAKE) $(clean)=arch/mips/boot/tools
+-
+ archheaders:
+       $(Q)$(MAKE) $(build)=arch/mips/kernel/syscalls all
+diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile
+index a3da2c5d63c21..196c44fa72d90 100644
+--- a/arch/mips/boot/Makefile
++++ b/arch/mips/boot/Makefile
+@@ -171,3 +171,6 @@ $(obj)/vmlinux.itb: $(obj)/vmlinux.its $(obj)/vmlinux.bin FORCE
+ $(obj)/vmlinux.%.itb: $(obj)/vmlinux.%.its $(obj)/vmlinux.bin.% FORCE
+       $(call if_changed,itb-image,$<)
++
++# for cleaning
++subdir- += compressed tools
+diff --git a/arch/nds32/Kbuild b/arch/nds32/Kbuild
+index a4e40e534e6a8..4e39f7abdeb6d 100644
+--- a/arch/nds32/Kbuild
++++ b/arch/nds32/Kbuild
+@@ -1 +1,4 @@
+ # SPDX-License-Identifier: GPL-2.0-only
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile
+index ccdca71420201..1aa8659786096 100644
+--- a/arch/nds32/Makefile
++++ b/arch/nds32/Makefile
+@@ -62,9 +62,6 @@ prepare: vdso_prepare
+ vdso_prepare: prepare0
+       $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+-
+ define archhelp
+   echo  '  Image         - kernel image (arch/$(ARCH)/boot/Image)'
+ endef
+diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild
+index a4e40e534e6a8..4e39f7abdeb6d 100644
+--- a/arch/nios2/Kbuild
++++ b/arch/nios2/Kbuild
+@@ -1 +1,4 @@
+ # SPDX-License-Identifier: GPL-2.0-only
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/nios2/Makefile b/arch/nios2/Makefile
+index 52c03e60b114d..ef41d1446302f 100644
+--- a/arch/nios2/Makefile
++++ b/arch/nios2/Makefile
+@@ -8,8 +8,7 @@
+ # Written by Fredrik Markstrom
+ #
+ # This file is included by the global makefile so that you can add your own
+-# architecture-specific flags and dependencies. Remember to do have actions
+-# for "archclean" cleaning up for this architecture.
++# architecture-specific flags and dependencies.
+ #
+ # Nios2 port by Wind River Systems Inc trough:
+ #   fredrik.markstrom@gmail.com and ivarholmqvist@gmail.com
+@@ -53,9 +52,6 @@ core-y       += $(nios2-boot)/dts/
+ all: vmImage
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(nios2-boot)
+-
+ $(BOOT_TARGETS): vmlinux
+       $(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
+diff --git a/arch/openrisc/Kbuild b/arch/openrisc/Kbuild
+index 4234b4c03e725..b0b0f2b03f872 100644
+--- a/arch/openrisc/Kbuild
++++ b/arch/openrisc/Kbuild
+@@ -1,3 +1,6 @@
+ # SPDX-License-Identifier: GPL-2.0
+ obj-y += lib/ kernel/ mm/
+ obj-y += boot/dts/
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
+index c52de526e5189..760b734fb8227 100644
+--- a/arch/openrisc/Makefile
++++ b/arch/openrisc/Makefile
+@@ -1,9 +1,7 @@
+ # BK Id: %F% %I% %G% %U% %#%
+ #
+ # This file is included by the global makefile so that you can add your own
+-# architecture-specific flags and dependencies. Remember to do have actions
+-# for "archclean" and "archdep" for cleaning up and making dependencies for
+-# this architecture
++# architecture-specific flags and dependencies.
+ #
+ # This file is subject to the terms and conditions of the GNU General Public
+ # License.  See the file "COPYING" in the main directory of this archive
+@@ -48,6 +46,3 @@ PHONY += vmlinux.bin
+ vmlinux.bin: vmlinux
+       $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
+-
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+diff --git a/arch/parisc/Kbuild b/arch/parisc/Kbuild
+index 3c068b700a810..a6d3b280ba0c2 100644
+--- a/arch/parisc/Kbuild
++++ b/arch/parisc/Kbuild
+@@ -1,2 +1,5 @@
+ # SPDX-License-Identifier: GPL-2.0-only
+ obj-y += mm/ kernel/ math-emu/
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
+index fadb098de1545..82d77f4b0d083 100644
+--- a/arch/parisc/Makefile
++++ b/arch/parisc/Makefile
+@@ -2,9 +2,7 @@
+ # parisc/Makefile
+ #
+ # This file is included by the global makefile so that you can add your own
+-# architecture-specific flags and dependencies. Remember to do have actions
+-# for "archclean" and "archdep" for cleaning up and making dependencies for
+-# this architecture
++# architecture-specific flags and dependencies.
+ #
+ # This file is subject to the terms and conditions of the GNU General Public
+ # License.  See the file "COPYING" in the main directory of this archive
+@@ -186,8 +184,5 @@ define archhelp
+       @echo  '  zinstall      - Install compressed vmlinuz kernel'
+ endef
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+-
+ archheaders:
+       $(Q)$(MAKE) $(build)=arch/parisc/kernel/syscalls all
+diff --git a/arch/powerpc/Kbuild b/arch/powerpc/Kbuild
+index 5e2f9eaa3ee7d..22cd0d55a8924 100644
+--- a/arch/powerpc/Kbuild
++++ b/arch/powerpc/Kbuild
+@@ -16,3 +16,6 @@ obj-$(CONFIG_KVM)  += kvm/
+ obj-$(CONFIG_PERF_EVENTS) += perf/
+ obj-$(CONFIG_KEXEC_CORE)  += kexec/
+ obj-$(CONFIG_KEXEC_FILE)  += purgatory/
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
+index a8e52e64c1a5b..3353188f1defb 100644
+--- a/arch/powerpc/Makefile
++++ b/arch/powerpc/Makefile
+@@ -1,7 +1,5 @@
+ # This file is included by the global makefile so that you can add your own
+-# architecture-specific flags and dependencies. Remember to do have actions
+-# for "archclean" and "archdep" for cleaning up and making dependencies for
+-# this architecture.
++# architecture-specific flags and dependencies.
+ #
+ # This file is subject to the terms and conditions of the GNU General Public
+ # License.  See the file "COPYING" in the main directory of this archive
+@@ -387,9 +385,6 @@ install:
+       sh -x $(srctree)/$(boot)/install.sh "$(KERNELRELEASE)" vmlinux \
+       System.map "$(INSTALL_PATH)"
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+-
+ ifeq ($(KBUILD_EXTMOD),)
+ # We need to generate vdso-offsets.h before compiling certain files in kernel/.
+ # In order to do that, we should use the archprepare target, but we can't since
+diff --git a/arch/riscv/Kbuild b/arch/riscv/Kbuild
+index 4614c01ba5b32..fb3397223d520 100644
+--- a/arch/riscv/Kbuild
++++ b/arch/riscv/Kbuild
+@@ -2,3 +2,6 @@
+ obj-y += kernel/ mm/ net/
+ obj-$(CONFIG_BUILTIN_DTB) += boot/dts/
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
+index 0f17c6b6b7294..96772a32a87db 100644
+--- a/arch/riscv/Makefile
++++ b/arch/riscv/Makefile
+@@ -1,7 +1,5 @@
+ # This file is included by the global makefile so that you can add your own
+-# architecture-specific flags and dependencies. Remember to do have actions
+-# for "archclean" and "archdep" for cleaning up and making dependencies for
+-# this architecture
++# architecture-specific flags and dependencies.
+ #
+ # This file is subject to the terms and conditions of the GNU General Public
+ # License.  See the file "COPYING" in the main directory of this archive
+@@ -157,6 +155,3 @@ zinstall: install-image = Image.gz
+ install zinstall:
+       $(CONFIG_SHELL) $(srctree)/$(boot)/install.sh $(KERNELRELEASE) \
+       $(boot)/$(install-image) System.map "$(INSTALL_PATH)"
+-
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+diff --git a/arch/s390/Kbuild b/arch/s390/Kbuild
+index 8b98c501142df..76e3622771791 100644
+--- a/arch/s390/Kbuild
++++ b/arch/s390/Kbuild
+@@ -8,3 +8,6 @@ obj-$(CONFIG_APPLDATA_BASE)    += appldata/
+ obj-y                         += net/
+ obj-$(CONFIG_PCI)             += pci/
+ obj-$(CONFIG_ARCH_HAS_KEXEC_PURGATORY) += purgatory/
++
++# for cleaning
++subdir- += boot tools
+diff --git a/arch/s390/Makefile b/arch/s390/Makefile
+index c7b7a60f6405d..6e42252214dd8 100644
+--- a/arch/s390/Makefile
++++ b/arch/s390/Makefile
+@@ -3,9 +3,7 @@
+ # s390/Makefile
+ #
+ # This file is included by the global makefile so that you can add your own
+-# architecture-specific flags and dependencies. Remember to do have actions
+-# for "archclean" and "archdep" for cleaning up and making dependencies for
+-# this architecture
++# architecture-specific flags and dependencies.
+ #
+ # Copyright (C) 1994 by Linus Torvalds
+ #
+@@ -159,10 +157,6 @@ zfcpdump:
+ vdso_install:
+       $(Q)$(MAKE) $(build)=arch/$(ARCH)/kernel/vdso64 $@
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+-      $(Q)$(MAKE) $(clean)=$(tools)
+-
+ archheaders:
+       $(Q)$(MAKE) $(build)=$(syscalls) uapi
+diff --git a/arch/sh/Kbuild b/arch/sh/Kbuild
+index 48c2a091a0720..be171880977e5 100644
+--- a/arch/sh/Kbuild
++++ b/arch/sh/Kbuild
+@@ -2,3 +2,6 @@
+ obj-y                         += kernel/ mm/ boards/
+ obj-$(CONFIG_SH_FPU_EMU)      += math-emu/
+ obj-$(CONFIG_USE_BUILTIN_DTB) += boot/dts/
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/sh/Makefile b/arch/sh/Makefile
+index 7814639006213..b39412bf91fb0 100644
+--- a/arch/sh/Makefile
++++ b/arch/sh/Makefile
+@@ -198,9 +198,6 @@ compressed: zImage
+ archprepare:
+       $(Q)$(MAKE) $(build)=arch/sh/tools include/generated/machtypes.h
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+-
+ archheaders:
+       $(Q)$(MAKE) $(build)=arch/sh/kernel/syscalls all
+diff --git a/arch/sparc/Kbuild b/arch/sparc/Kbuild
+index c9e574906a9b9..71cb3d934bf6c 100644
+--- a/arch/sparc/Kbuild
++++ b/arch/sparc/Kbuild
+@@ -9,3 +9,6 @@ obj-y += math-emu/
+ obj-y += net/
+ obj-y += crypto/
+ obj-$(CONFIG_SPARC64) += vdso/
++
++# for cleaning
++subdir- += boot
+diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
+index 24fb5a99f4394..c7008bbebc4cd 100644
+--- a/arch/sparc/Makefile
++++ b/arch/sparc/Makefile
+@@ -75,9 +75,6 @@ install:
+       sh $(srctree)/$(boot)/install.sh $(KERNELRELEASE) $(KBUILD_IMAGE) \
+               System.map "$(INSTALL_PATH)"
+-archclean:
+-      $(Q)$(MAKE) $(clean)=$(boot)
+-
+ archheaders:
+       $(Q)$(MAKE) $(build)=arch/sparc/kernel/syscalls all
+diff --git a/arch/x86/Kbuild b/arch/x86/Kbuild
+index 30dec019756b9..f384cb1a4f7a8 100644
+--- a/arch/x86/Kbuild
++++ b/arch/x86/Kbuild
+@@ -25,3 +25,6 @@ obj-y += platform/
+ obj-y += net/
+ obj-$(CONFIG_KEXEC_FILE) += purgatory/
++
++# for cleaning
++subdir- += boot tools
+diff --git a/arch/x86/Makefile b/arch/x86/Makefile
+index 9c09bbd390cec..15c54fa1b435d 100644
+--- a/arch/x86/Makefile
++++ b/arch/x86/Makefile
+@@ -287,8 +287,6 @@ endif
+ archclean:
+       $(Q)rm -rf $(objtree)/arch/i386
+       $(Q)rm -rf $(objtree)/arch/x86_64
+-      $(Q)$(MAKE) $(clean)=$(boot)
+-      $(Q)$(MAKE) $(clean)=arch/x86/tools
+ define archhelp
+   echo  '* bzImage            - Compressed kernel image (arch/x86/boot/bzImage)'
+diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
+index 96714ef7c89e3..9778216d6e09d 100644
+--- a/arch/xtensa/Makefile
++++ b/arch/xtensa/Makefile
+@@ -7,9 +7,7 @@
+ # Copyright (C) 2014 Cadence Design Systems Inc.
+ #
+ # This file is included by the global makefile so that you can add your own
+-# architecture-specific flags and dependencies. Remember to do have actions
+-# for "archclean" and "archdep" for cleaning up and making dependencies for
+-# this architecture
++# architecture-specific flags and dependencies.
+ # Core configuration.
+ # (Use VAR=<xtensa_config> to use another default compiler.)
+-- 
+2.39.2
+
diff --git a/queue-5.15/nvme-pci-add-nvme_quirk_bogus_nid-for-adata-xpg-gamm.patch b/queue-5.15/nvme-pci-add-nvme_quirk_bogus_nid-for-adata-xpg-gamm.patch
new file mode 100644 (file)
index 0000000..8149772
--- /dev/null
@@ -0,0 +1,38 @@
+From fb8a780175850bd89702ad0c37952b427b5d26db Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 6 Jun 2022 13:01:29 +0000
+Subject: nvme-pci: add NVME_QUIRK_BOGUS_NID for ADATA XPG GAMMIX S50
+
+From: Stefan Reiter <stefan@pimaker.at>
+
+[ Upstream commit 3765fad508964f433ac111c127d6bedd19bdfa04 ]
+
+ADATA XPG GAMMIX S50 drives report bogus eui64 values that appear to
+be the same across drives in one system. Quirk them out so they are
+not marked as "non globally unique" duplicates.
+
+Signed-off-by: Stefan Reiter <stefan@pimaker.at>
+Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Stable-dep-of: 74391b3e6985 ("nvme-pci: add NVME_QUIRK_BOGUS_NID for T-FORCE Z330 SSD")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/pci.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
+index 6539332b42b31..e0f0c9aa9391a 100644
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -3388,6 +3388,8 @@ static const struct pci_device_id nvme_id_table[] = {
+               .driver_data = NVME_QUIRK_BOGUS_NID, },
+       { PCI_DEVICE(0x1e4B, 0x1202),   /* MAXIO MAP1202 */
+               .driver_data = NVME_QUIRK_BOGUS_NID, },
++      { PCI_DEVICE(0x1cc1, 0x5350),   /* ADATA XPG GAMMIX S50 */
++              .driver_data = NVME_QUIRK_BOGUS_NID, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061),
+               .driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065),
+-- 
+2.39.2
+
diff --git a/queue-5.15/nvme-pci-add-nvme_quirk_bogus_nid-for-lexar-nm610.patch b/queue-5.15/nvme-pci-add-nvme_quirk_bogus_nid-for-lexar-nm610.patch
new file mode 100644 (file)
index 0000000..dd456c1
--- /dev/null
@@ -0,0 +1,39 @@
+From 9e4d87e7e25dfd33ae126987cb4edbfef9e51e38 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 26 Aug 2022 09:51:40 -0700
+Subject: nvme-pci: add NVME_QUIRK_BOGUS_NID for Lexar NM610
+
+From: Shyamin Ayesh <me@shyamin.com>
+
+[ Upstream commit 200dccd07df21b504a2168960059f0a971bf415d ]
+
+Lexar NM610 reports bogus eui64 values that appear to be the same across
+all drives. Quirk them out so they are not marked as "non globally unique"
+duplicates.
+
+Signed-off-by: Shyamin Ayesh <me@shyamin.com>
+[patch formatting]
+Signed-off-by: Keith Busch <kbusch@kernel.org>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Stable-dep-of: 74391b3e6985 ("nvme-pci: add NVME_QUIRK_BOGUS_NID for T-FORCE Z330 SSD")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/pci.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
+index 4e75d329562fa..4023cce17cf8b 100644
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -3394,6 +3394,8 @@ static const struct pci_device_id nvme_id_table[] = {
+               .driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
+       { PCI_DEVICE(0xc0a9, 0x540a),   /* Crucial P2 */
+               .driver_data = NVME_QUIRK_BOGUS_NID, },
++      { PCI_DEVICE(0x1d97, 0x2263), /* Lexar NM610 */
++              .driver_data = NVME_QUIRK_BOGUS_NID, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061),
+               .driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065),
+-- 
+2.39.2
+
diff --git a/queue-5.15/nvme-pci-add-nvme_quirk_bogus_nid-for-lexar-nm760.patch b/queue-5.15/nvme-pci-add-nvme_quirk_bogus_nid-for-lexar-nm760.patch
new file mode 100644 (file)
index 0000000..3f7cda5
--- /dev/null
@@ -0,0 +1,35 @@
+From aae93f5737e71cd8bf9671f47db08f618f772e5b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 10 Oct 2022 10:30:05 +0200
+Subject: nvme-pci: add NVME_QUIRK_BOGUS_NID for Lexar NM760
+
+From: Abhijit <abhijit@abhijittomar.com>
+
+[ Upstream commit 80b2624094c8d369a3c6eab515e8f1564d2e5db2 ]
+
+Add a quirk to fix Lexar NM760 SSD drives reporting duplicate nsids.
+
+Signed-off-by: Abhijit <abhijit@abhijittomar.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Stable-dep-of: 74391b3e6985 ("nvme-pci: add NVME_QUIRK_BOGUS_NID for T-FORCE Z330 SSD")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/pci.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
+index 4023cce17cf8b..308dda1e4cb58 100644
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -3396,6 +3396,8 @@ static const struct pci_device_id nvme_id_table[] = {
+               .driver_data = NVME_QUIRK_BOGUS_NID, },
+       { PCI_DEVICE(0x1d97, 0x2263), /* Lexar NM610 */
+               .driver_data = NVME_QUIRK_BOGUS_NID, },
++      { PCI_DEVICE(0x1d97, 0x2269), /* Lexar NM760 */
++              .driver_data = NVME_QUIRK_BOGUS_NID, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061),
+               .driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065),
+-- 
+2.39.2
+
diff --git a/queue-5.15/nvme-pci-add-nvme_quirk_bogus_nid-for-t-force-z330-s.patch b/queue-5.15/nvme-pci-add-nvme_quirk_bogus_nid-for-t-force-z330-s.patch
new file mode 100644 (file)
index 0000000..6da8686
--- /dev/null
@@ -0,0 +1,36 @@
+From 8abca59b438ada31ebfe9cffc62ad8b4e22f7a7b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 13 Apr 2023 17:55:48 -0700
+Subject: nvme-pci: add NVME_QUIRK_BOGUS_NID for T-FORCE Z330 SSD
+
+From: Duy Truong <dory@dory.moe>
+
+[ Upstream commit 74391b3e69855e7dd65a9cef36baf5fc1345affd ]
+
+Added a quirk to fix the TeamGroup T-Force Cardea Zero Z330 SSDs reporting
+duplicate NGUIDs.
+
+Signed-off-by: Duy Truong <dory@dory.moe>
+Cc: stable@vger.kernel.org
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/pci.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
+index bd8dbaaa3715c..30c730a9f5188 100644
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -3399,6 +3399,8 @@ static const struct pci_device_id nvme_id_table[] = {
+       { PCI_DEVICE(0x1d97, 0x2269), /* Lexar NM760 */
+               .driver_data = NVME_QUIRK_BOGUS_NID |
+                               NVME_QUIRK_IGNORE_DEV_SUBNQN, },
++      { PCI_DEVICE(0x10ec, 0x5763), /* TEAMGROUP T-FORCE CARDEA ZERO Z330 SSD */
++              .driver_data = NVME_QUIRK_BOGUS_NID, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061),
+               .driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065),
+-- 
+2.39.2
+
diff --git a/queue-5.15/nvme-pci-avoid-the-deepest-sleep-state-on-zhitai-tip.patch b/queue-5.15/nvme-pci-avoid-the-deepest-sleep-state-on-zhitai-tip.patch
new file mode 100644 (file)
index 0000000..3ba49e5
--- /dev/null
@@ -0,0 +1,65 @@
+From d72fba6960ae02614dec6784576ff6d0846dfe45 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 5 Jun 2022 20:36:48 +0000
+Subject: nvme-pci: avoid the deepest sleep state on ZHITAI TiPro7000 SSDs
+
+From: Ning Wang <ningwang35@outlook.com>
+
+[ Upstream commit 6b961bce50e489186232cef51036ddb8d672bc3b ]
+
+When ZHITAI TiPro7000 SSDs entered deepest power state(ps4)
+it has the same APST sleep problem as Kingston A2000.
+by chance the system crashes and displays the same dmesg info:
+
+https://bugzilla.kernel.org/show_bug.cgi?id=195039#c65
+
+As the Archlinux wiki suggest (enlat + exlat) < 25000 is fine
+and my testing shows no system crashes ever since.
+Therefore disabling the deepest power state will fix the APST sleep issue.
+
+https://wiki.archlinux.org/title/Solid_state_drive/NVMe
+
+This is the APST data from 'nvme id-ctrl /dev/nvme1'
+
+NVME Identify Controller:
+vid       : 0x1e49
+ssvid     : 0x1e49
+sn        : [...]
+mn        : ZHITAI TiPro7000 1TB
+fr        : ZTA32F3Y
+[...]
+ps    0 : mp:3.50W operational enlat:5 exlat:5 rrt:0 rrl:0
+          rwt:0 rwl:0 idle_power:- active_power:-
+ps    1 : mp:3.30W operational enlat:50 exlat:100 rrt:1 rrl:1
+          rwt:1 rwl:1 idle_power:- active_power:-
+ps    2 : mp:2.80W operational enlat:50 exlat:200 rrt:2 rrl:2
+          rwt:2 rwl:2 idle_power:- active_power:-
+ps    3 : mp:0.1500W non-operational enlat:500 exlat:5000 rrt:3 rrl:3
+          rwt:3 rwl:3 idle_power:- active_power:-
+ps    4 : mp:0.0200W non-operational enlat:2000 exlat:60000 rrt:4 rrl:4
+          rwt:4 rwl:4 idle_power:- active_power:-
+
+Signed-off-by: Ning Wang <ningwang35@outlook.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Stable-dep-of: 74391b3e6985 ("nvme-pci: add NVME_QUIRK_BOGUS_NID for T-FORCE Z330 SSD")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/pci.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
+index e0f0c9aa9391a..7b0331848664d 100644
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -3390,6 +3390,8 @@ static const struct pci_device_id nvme_id_table[] = {
+               .driver_data = NVME_QUIRK_BOGUS_NID, },
+       { PCI_DEVICE(0x1cc1, 0x5350),   /* ADATA XPG GAMMIX S50 */
+               .driver_data = NVME_QUIRK_BOGUS_NID, },
++      { PCI_DEVICE(0x1e49, 0x0041),   /* ZHITAI TiPro7000 NVMe SSD */
++              .driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061),
+               .driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065),
+-- 
+2.39.2
+
diff --git a/queue-5.15/nvme-pci-crucial-p2-has-bogus-namespace-ids.patch b/queue-5.15/nvme-pci-crucial-p2-has-bogus-namespace-ids.patch
new file mode 100644 (file)
index 0000000..f2b2d1a
--- /dev/null
@@ -0,0 +1,35 @@
+From 0591df9688f5af21006543480b5404f2dbca53bf Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 22 Jul 2022 19:05:57 +0200
+Subject: nvme-pci: Crucial P2 has bogus namespace ids
+
+From: Tobias Gruetzmacher <tobias-git@23.gs>
+
+[ Upstream commit d6c52fa3e955b97f8eb3ac824d2a3e0af147b3ce ]
+
+This adds a quirk for the Crucial P2.
+
+Signed-off-by: Tobias Gruetzmacher <tobias-git@23.gs>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Stable-dep-of: 74391b3e6985 ("nvme-pci: add NVME_QUIRK_BOGUS_NID for T-FORCE Z330 SSD")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/pci.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
+index 7b0331848664d..4e75d329562fa 100644
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -3392,6 +3392,8 @@ static const struct pci_device_id nvme_id_table[] = {
+               .driver_data = NVME_QUIRK_BOGUS_NID, },
+       { PCI_DEVICE(0x1e49, 0x0041),   /* ZHITAI TiPro7000 NVMe SSD */
+               .driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
++      { PCI_DEVICE(0xc0a9, 0x540a),   /* Crucial P2 */
++              .driver_data = NVME_QUIRK_BOGUS_NID, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061),
+               .driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065),
+-- 
+2.39.2
+
diff --git a/queue-5.15/nvme-pci-mark-lexar-nm760-as-ignore_dev_subnqn.patch b/queue-5.15/nvme-pci-mark-lexar-nm760-as-ignore_dev_subnqn.patch
new file mode 100644 (file)
index 0000000..27f812a
--- /dev/null
@@ -0,0 +1,64 @@
+From ade390892beb41208a7862464bb7c0c5ab8248ee Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 26 Mar 2023 11:29:49 +0200
+Subject: nvme-pci: mark Lexar NM760 as IGNORE_DEV_SUBNQN
+
+From: Juraj Pecigos <kernel@juraj.dev>
+
+[ Upstream commit 1231363aec86704a6b0467a12e3ca7bdf890e01d ]
+
+A system with more than one of these SSDs will only have one usable.
+The kernel fails to detect more than one nvme device due to duplicate
+cntlids.
+
+before:
+[    9.395229] nvme 0000:01:00.0: platform quirk: setting simple suspend
+[    9.395262] nvme nvme0: pci function 0000:01:00.0
+[    9.395282] nvme 0000:03:00.0: platform quirk: setting simple suspend
+[    9.395305] nvme nvme1: pci function 0000:03:00.0
+[    9.409873] nvme nvme0: Duplicate cntlid 1 with nvme1, subsys nqn.2022-07.com.siliconmotion:nvm-subsystem-sn-                    , rejecting
+[    9.409982] nvme nvme0: Removing after probe failure status: -22
+[    9.427487] nvme nvme1: allocated 64 MiB host memory buffer.
+[    9.445088] nvme nvme1: 16/0/0 default/read/poll queues
+[    9.449898] nvme nvme1: Ignoring bogus Namespace Identifiers
+
+after:
+[    1.161890] nvme 0000:01:00.0: platform quirk: setting simple suspend
+[    1.162660] nvme nvme0: pci function 0000:01:00.0
+[    1.162684] nvme 0000:03:00.0: platform quirk: setting simple suspend
+[    1.162707] nvme nvme1: pci function 0000:03:00.0
+[    1.191354] nvme nvme0: allocated 64 MiB host memory buffer.
+[    1.193378] nvme nvme1: allocated 64 MiB host memory buffer.
+[    1.211044] nvme nvme1: 16/0/0 default/read/poll queues
+[    1.211080] nvme nvme0: 16/0/0 default/read/poll queues
+[    1.216145] nvme nvme0: Ignoring bogus Namespace Identifiers
+[    1.216261] nvme nvme1: Ignoring bogus Namespace Identifiers
+
+Adding the NVME_QUIRK_IGNORE_DEV_SUBNQN quirk to resolves the issue.
+
+Signed-off-by: Juraj Pecigos <kernel@juraj.dev>
+Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Stable-dep-of: 74391b3e6985 ("nvme-pci: add NVME_QUIRK_BOGUS_NID for T-FORCE Z330 SSD")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nvme/host/pci.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
+index 308dda1e4cb58..bd8dbaaa3715c 100644
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -3397,7 +3397,8 @@ static const struct pci_device_id nvme_id_table[] = {
+       { PCI_DEVICE(0x1d97, 0x2263), /* Lexar NM610 */
+               .driver_data = NVME_QUIRK_BOGUS_NID, },
+       { PCI_DEVICE(0x1d97, 0x2269), /* Lexar NM760 */
+-              .driver_data = NVME_QUIRK_BOGUS_NID, },
++              .driver_data = NVME_QUIRK_BOGUS_NID |
++                              NVME_QUIRK_IGNORE_DEV_SUBNQN, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061),
+               .driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065),
+-- 
+2.39.2
+
diff --git a/queue-5.15/powerpc-papr_scm-update-the-numa-distance-table-for-.patch b/queue-5.15/powerpc-papr_scm-update-the-numa-distance-table-for-.patch
new file mode 100644 (file)
index 0000000..e586eaf
--- /dev/null
@@ -0,0 +1,84 @@
+From 6f10cc2df7a3f21bcf639e9b787b21fa262f7d4c Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 4 Apr 2023 09:44:33 +0530
+Subject: powerpc/papr_scm: Update the NUMA distance table for the target node
+
+From: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
+
+[ Upstream commit b277fc793daf258877b4c0744b52f69d6e6ba22e ]
+
+Platform device helper routines won't update the NUMA distance table
+while creating a platform device, even if the device is present on a
+NUMA node that doesn't have memory or CPU. This is especially true for
+pmem devices. If the target node of the pmem device is not online, we
+find the nearest online node to the device and associate the pmem device
+with that online node. To find the nearest online node, we should have
+the numa distance table updated correctly. Update the distance
+information during the device probe.
+
+For a papr scm device on NUMA node 3 distance_lookup_table value for
+distance_ref_points_depth = 2 before and after fix is below:
+
+Before fix:
+  node 3 distance depth 0  - 0
+  node 3 distance depth 1  - 0
+  node 4 distance depth 0  - 4
+  node 4 distance depth 1  - 2
+  node 5 distance depth 0  - 5
+  node 5 distance depth 1  - 1
+
+After fix
+  node 3 distance depth 0  - 3
+  node 3 distance depth 1  - 1
+  node 4 distance depth 0  - 4
+  node 4 distance depth 1  - 2
+  node 5 distance depth 0  - 5
+  node 5 distance depth 1  - 1
+
+Without the fix, the nearest numa node to the pmem device (NUMA node 3)
+will be picked as 4. After the fix, we get the correct numa node which
+is 5.
+
+Fixes: da1115fdbd6e ("powerpc/nvdimm: Pick nearby online node if the device node is not online")
+Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://msgid.link/20230404041433.1781804-1-aneesh.kumar@linux.ibm.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/powerpc/mm/numa.c                    | 1 +
+ arch/powerpc/platforms/pseries/papr_scm.c | 7 +++++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
+index 5fb829256b59d..9c038c8cebebc 100644
+--- a/arch/powerpc/mm/numa.c
++++ b/arch/powerpc/mm/numa.c
+@@ -367,6 +367,7 @@ void update_numa_distance(struct device_node *node)
+       WARN(numa_distance_table[nid][nid] == -1,
+            "NUMA distance details for node %d not provided\n", nid);
+ }
++EXPORT_SYMBOL_GPL(update_numa_distance);
+ /*
+  * ibm,numa-lookup-index-table= {N, domainid1, domainid2, ..... domainidN}
+diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c
+index f48e87ac89c9b..3cfcc748052e9 100644
+--- a/arch/powerpc/platforms/pseries/papr_scm.c
++++ b/arch/powerpc/platforms/pseries/papr_scm.c
+@@ -1159,6 +1159,13 @@ static int papr_scm_probe(struct platform_device *pdev)
+               return -ENODEV;
+       }
++      /*
++       * open firmware platform device create won't update the NUMA 
++       * distance table. For PAPR SCM devices we use numa_map_to_online_node()
++       * to find the nearest online NUMA node and that requires correct
++       * distance table information.
++       */
++      update_numa_distance(dn);
+       p = kzalloc(sizeof(*p), GFP_KERNEL);
+       if (!p)
+-- 
+2.39.2
+
diff --git a/queue-5.15/purgatory-fix-disabling-debug-info.patch b/queue-5.15/purgatory-fix-disabling-debug-info.patch
new file mode 100644 (file)
index 0000000..4d61f31
--- /dev/null
@@ -0,0 +1,42 @@
+From 618ea690941689fe28fa9c150f90bb096db5f8a5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 26 Mar 2023 18:21:21 +0000
+Subject: purgatory: fix disabling debug info
+
+From: Alyssa Ross <hi@alyssa.is>
+
+[ Upstream commit d83806c4c0cccc0d6d3c3581a11983a9c186a138 ]
+
+Since 32ef9e5054ec, -Wa,-gdwarf-2 is no longer used in KBUILD_AFLAGS.
+Instead, it includes -g, the appropriate -gdwarf-* flag, and also the
+-Wa versions of both of those if building with Clang and GNU as.  As a
+result, debug info was being generated for the purgatory objects, even
+though the intention was that it not be.
+
+Fixes: 32ef9e5054ec ("Makefile.debug: re-enable debug info for .S files")
+Signed-off-by: Alyssa Ross <hi@alyssa.is>
+Cc: stable@vger.kernel.org
+Acked-by: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/x86/purgatory/Makefile | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile
+index 95ea17a9d20cb..1d6ccd4214d5a 100644
+--- a/arch/x86/purgatory/Makefile
++++ b/arch/x86/purgatory/Makefile
+@@ -64,8 +64,7 @@ CFLAGS_sha256.o                      += $(PURGATORY_CFLAGS)
+ CFLAGS_REMOVE_string.o                += $(PURGATORY_CFLAGS_REMOVE)
+ CFLAGS_string.o                       += $(PURGATORY_CFLAGS)
+-AFLAGS_REMOVE_setup-x86_$(BITS).o     += -Wa,-gdwarf-2
+-AFLAGS_REMOVE_entry64.o                       += -Wa,-gdwarf-2
++asflags-remove-y              += $(foreach x, -g -gdwarf-4 -gdwarf-5, $(x) -Wa,$(x))
+ $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE
+               $(call if_changed,ld)
+-- 
+2.39.2
+
diff --git a/queue-5.15/sched-fair-fix-imbalance-overflow.patch b/queue-5.15/sched-fair-fix-imbalance-overflow.patch
new file mode 100644 (file)
index 0000000..f4da6b7
--- /dev/null
@@ -0,0 +1,48 @@
+From 2efaa3a226e2c319ec1627d980e235a3296dddb6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 11 Apr 2023 11:06:11 +0200
+Subject: sched/fair: Fix imbalance overflow
+
+From: Vincent Guittot <vincent.guittot@linaro.org>
+
+[ Upstream commit 91dcf1e8068e9a8823e419a7a34ff4341275fb70 ]
+
+When local group is fully busy but its average load is above system load,
+computing the imbalance will overflow and local group is not the best
+target for pulling this load.
+
+Fixes: 0b0695f2b34a ("sched/fair: Rework load_balance()")
+Reported-by: Tingjia Cao <tjcao980311@gmail.com>
+Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Tested-by: Tingjia Cao <tjcao980311@gmail.com>
+Link: https://lore.kernel.org/lkml/CABcWv9_DAhVBOq2=W=2ypKE9dKM5s2DvoV8-U0+GDwwuKZ89jQ@mail.gmail.com/T/
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/sched/fair.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
+index 024d18d85526d..7ac00dede846c 100644
+--- a/kernel/sched/fair.c
++++ b/kernel/sched/fair.c
+@@ -9647,6 +9647,16 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s
+               sds->avg_load = (sds->total_load * SCHED_CAPACITY_SCALE) /
+                               sds->total_capacity;
++
++              /*
++               * If the local group is more loaded than the average system
++               * load, don't try to pull any tasks.
++               */
++              if (local->avg_load >= sds->avg_load) {
++                      env->imbalance = 0;
++                      return;
++              }
++
+       }
+       /*
+-- 
+2.39.2
+
diff --git a/queue-5.15/sched-fair-move-calculate-of-avg_load-to-a-better-lo.patch b/queue-5.15/sched-fair-move-calculate-of-avg_load-to-a-better-lo.patch
new file mode 100644 (file)
index 0000000..e24fa8b
--- /dev/null
@@ -0,0 +1,50 @@
+From b9529a41e0d3e64077f5fdd91272e830ccbee6a0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 6 Apr 2022 17:57:05 +0800
+Subject: sched/fair: Move calculate of avg_load to a better location
+
+From: zgpeng <zgpeng.linux@gmail.com>
+
+[ Upstream commit 06354900787f25bf5be3c07a68e3cdbc5bf0fa69 ]
+
+In calculate_imbalance function, when the value of local->avg_load is
+greater than or equal to busiest->avg_load, the calculated sds->avg_load is
+not used. So this calculation can be placed in a more appropriate position.
+
+Signed-off-by: zgpeng <zgpeng@tencent.com>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Reviewed-by: Samuel Liao <samuelliao@tencent.com>
+Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
+Link: https://lore.kernel.org/r/1649239025-10010-1-git-send-email-zgpeng@tencent.com
+Stable-dep-of: 91dcf1e8068e ("sched/fair: Fix imbalance overflow")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/sched/fair.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
+index 8f5a5e72bdb3e..024d18d85526d 100644
+--- a/kernel/sched/fair.c
++++ b/kernel/sched/fair.c
+@@ -9636,8 +9636,6 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s
+               local->avg_load = (local->group_load * SCHED_CAPACITY_SCALE) /
+                                 local->group_capacity;
+-              sds->avg_load = (sds->total_load * SCHED_CAPACITY_SCALE) /
+-                              sds->total_capacity;
+               /*
+                * If the local group is more loaded than the selected
+                * busiest group don't try to pull any tasks.
+@@ -9646,6 +9644,9 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s
+                       env->imbalance = 0;
+                       return;
+               }
++
++              sds->avg_load = (sds->total_load * SCHED_CAPACITY_SCALE) /
++                              sds->total_capacity;
+       }
+       /*
+-- 
+2.39.2
+
index c4fd2c77d47f438b54681a05bc606f8190bcca4b..d1306f14a30b5e126d0131af73678e06c1f9b882 100644 (file)
@@ -64,3 +64,22 @@ x86-pci-add-quirk-for-amd-xhci-controller-that-loses-msi-x-state-in-d3hot.patch
 cgroup-cpuset-wake-up-cpuset_attach_wq-tasks-in-cpuset_cancel_attach.patch
 mptcp-use-mptcp_schedule_work-instead-of-open-coding-it.patch
 mptcp-stricter-state-check-in-mptcp_worker.patch
+ubi-fix-deadlock-caused-by-recursively-holding-work_.patch
+ubi-fix-failure-attaching-when-vid_hdr-offset-equals.patch
+powerpc-papr_scm-update-the-numa-distance-table-for-.patch
+sched-fair-move-calculate-of-avg_load-to-a-better-lo.patch
+sched-fair-fix-imbalance-overflow.patch
+x86-rtc-remove-__init-for-runtime-functions.patch
+i2c-ocores-generate-stop-condition-after-timeout-in-.patch
+sh-remove-meaningless-archclean-line.patch
+kbuild-use-more-subdir-for-visiting-subdirectories-w.patch
+purgatory-fix-disabling-debug-info.patch
+nvme-pci-add-nvme_quirk_bogus_nid-for-adata-xpg-gamm.patch
+nvme-pci-avoid-the-deepest-sleep-state-on-zhitai-tip.patch
+nvme-pci-crucial-p2-has-bogus-namespace-ids.patch
+nvme-pci-add-nvme_quirk_bogus_nid-for-lexar-nm610.patch
+nvme-pci-add-nvme_quirk_bogus_nid-for-lexar-nm760.patch
+nvme-pci-mark-lexar-nm760-as-ignore_dev_subnqn.patch
+nvme-pci-add-nvme_quirk_bogus_nid-for-t-force-z330-s.patch
+cgroup-cpuset-skip-spread-flags-update-on-v2.patch
+cgroup-cpuset-make-cpuset_fork-handle-clone_into_cgr.patch
diff --git a/queue-5.15/sh-remove-meaningless-archclean-line.patch b/queue-5.15/sh-remove-meaningless-archclean-line.patch
new file mode 100644 (file)
index 0000000..35b28df
--- /dev/null
@@ -0,0 +1,36 @@
+From 7bc030eb406f9fbfed89e07d6cc215eb323a05d5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 13 Oct 2021 15:36:21 +0900
+Subject: sh: remove meaningless archclean line
+
+From: Masahiro Yamada <masahiroy@kernel.org>
+
+[ Upstream commit 10c6ae274fe29f732ca9bbcd7016e9827673c954 ]
+
+The vsyscall directory is cleaned up by the ordinary way
+via arch/sh/kernel/Makefile:
+
+  obj-$(CONFIG_VSYSCALL)          += vsyscall/
+
+Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
+Stable-dep-of: d83806c4c0cc ("purgatory: fix disabling debug info")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/sh/Makefile | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/arch/sh/Makefile b/arch/sh/Makefile
+index 88ddb6f1c75b0..7814639006213 100644
+--- a/arch/sh/Makefile
++++ b/arch/sh/Makefile
+@@ -200,7 +200,6 @@ archprepare:
+ archclean:
+       $(Q)$(MAKE) $(clean)=$(boot)
+-      $(Q)$(MAKE) $(clean)=arch/sh/kernel/vsyscall
+ archheaders:
+       $(Q)$(MAKE) $(build)=arch/sh/kernel/syscalls all
+-- 
+2.39.2
+
diff --git a/queue-5.15/ubi-fix-deadlock-caused-by-recursively-holding-work_.patch b/queue-5.15/ubi-fix-deadlock-caused-by-recursively-holding-work_.patch
new file mode 100644 (file)
index 0000000..299a6e2
--- /dev/null
@@ -0,0 +1,66 @@
+From c3e31d9e288876ab672569e50888b8836e93b988 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 4 Mar 2023 09:41:41 +0800
+Subject: ubi: Fix deadlock caused by recursively holding work_sem
+
+From: ZhaoLong Wang <wangzhaolong1@huawei.com>
+
+[ Upstream commit f773f0a331d6c41733b17bebbc1b6cae12e016f5 ]
+
+During the processing of the bgt, if the sync_erase() return -EBUSY
+or some other error code in __erase_worker(),schedule_erase() called
+again lead to the down_read(ubi->work_sem) hold twice and may get
+block by down_write(ubi->work_sem) in ubi_update_fastmap(),
+which cause deadlock.
+
+          ubi bgt                        other task
+ do_work
+  down_read(&ubi->work_sem)          ubi_update_fastmap
+  erase_worker                         # Blocked by down_read
+   __erase_worker                      down_write(&ubi->work_sem)
+    schedule_erase
+     schedule_ubi_work
+      down_read(&ubi->work_sem)
+
+Fix this by changing input parameter @nested of the schedule_erase() to
+'true' to avoid recursively acquiring the down_read(&ubi->work_sem).
+
+Also, fix the incorrect comment about @nested parameter of the
+schedule_erase() because when down_write(ubi->work_sem) is held, the
+@nested is also need be true.
+
+Link: https://bugzilla.kernel.org/show_bug.cgi?id=217093
+Fixes: 2e8f08deabbc ("ubi: Fix races around ubi_refill_pools()")
+Signed-off-by: ZhaoLong Wang <wangzhaolong1@huawei.com>
+Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/mtd/ubi/wl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
+index 2ee0e60c43c2e..4427018ad4d9b 100644
+--- a/drivers/mtd/ubi/wl.c
++++ b/drivers/mtd/ubi/wl.c
+@@ -575,7 +575,7 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,
+  * @vol_id: the volume ID that last used this PEB
+  * @lnum: the last used logical eraseblock number for the PEB
+  * @torture: if the physical eraseblock has to be tortured
+- * @nested: denotes whether the work_sem is already held in read mode
++ * @nested: denotes whether the work_sem is already held
+  *
+  * This function returns zero in case of success and a %-ENOMEM in case of
+  * failure.
+@@ -1121,7 +1121,7 @@ static int __erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk)
+               int err1;
+               /* Re-schedule the LEB for erasure */
+-              err1 = schedule_erase(ubi, e, vol_id, lnum, 0, false);
++              err1 = schedule_erase(ubi, e, vol_id, lnum, 0, true);
+               if (err1) {
+                       spin_lock(&ubi->wl_lock);
+                       wl_entry_destroy(ubi, e);
+-- 
+2.39.2
+
diff --git a/queue-5.15/ubi-fix-failure-attaching-when-vid_hdr-offset-equals.patch b/queue-5.15/ubi-fix-failure-attaching-when-vid_hdr-offset-equals.patch
new file mode 100644 (file)
index 0000000..711f129
--- /dev/null
@@ -0,0 +1,79 @@
+From 1783fa50ab4afa94d2b42388a880a3b49375163f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 6 Mar 2023 09:33:08 +0800
+Subject: ubi: Fix failure attaching when vid_hdr offset equals to (sub)page
+ size
+
+From: Zhihao Cheng <chengzhihao1@huawei.com>
+
+[ Upstream commit 1e020e1b96afdecd20680b5b5be2a6ffc3d27628 ]
+
+Following process will make ubi attaching failed since commit
+1b42b1a36fc946 ("ubi: ensure that VID header offset ... size"):
+
+ID="0xec,0xa1,0x00,0x15" # 128M 128KB 2KB
+modprobe nandsim id_bytes=$ID
+flash_eraseall /dev/mtd0
+modprobe ubi mtd="0,2048"  # set vid_hdr offset as 2048 (one page)
+(dmesg):
+  ubi0 error: ubi_attach_mtd_dev [ubi]: VID header offset 2048 too large.
+  UBI error: cannot attach mtd0
+  UBI error: cannot initialize UBI, error -22
+
+Rework original solution, the key point is making sure
+'vid_hdr_shift + UBI_VID_HDR_SIZE < ubi->vid_hdr_alsize',
+so we should check vid_hdr_shift rather not vid_hdr_offset.
+Then, ubi still support (sub)page aligined VID header offset.
+
+Fixes: 1b42b1a36fc946 ("ubi: ensure that VID header offset ... size")
+Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
+Tested-by: Nicolas Schichan <nschichan@freebox.fr>
+Tested-by: Miquel Raynal <miquel.raynal@bootlin.com> # v5.10, v4.19
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/mtd/ubi/build.c | 21 +++++++++++++++------
+ 1 file changed, 15 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
+index 3499ff2649d54..762dc14aef742 100644
+--- a/drivers/mtd/ubi/build.c
++++ b/drivers/mtd/ubi/build.c
+@@ -664,12 +664,6 @@ static int io_init(struct ubi_device *ubi, int max_beb_per1024)
+       ubi->ec_hdr_alsize = ALIGN(UBI_EC_HDR_SIZE, ubi->hdrs_min_io_size);
+       ubi->vid_hdr_alsize = ALIGN(UBI_VID_HDR_SIZE, ubi->hdrs_min_io_size);
+-      if (ubi->vid_hdr_offset && ((ubi->vid_hdr_offset + UBI_VID_HDR_SIZE) >
+-          ubi->vid_hdr_alsize)) {
+-              ubi_err(ubi, "VID header offset %d too large.", ubi->vid_hdr_offset);
+-              return -EINVAL;
+-      }
+-
+       dbg_gen("min_io_size      %d", ubi->min_io_size);
+       dbg_gen("max_write_size   %d", ubi->max_write_size);
+       dbg_gen("hdrs_min_io_size %d", ubi->hdrs_min_io_size);
+@@ -687,6 +681,21 @@ static int io_init(struct ubi_device *ubi, int max_beb_per1024)
+                                               ubi->vid_hdr_aloffset;
+       }
++      /*
++       * Memory allocation for VID header is ubi->vid_hdr_alsize
++       * which is described in comments in io.c.
++       * Make sure VID header shift + UBI_VID_HDR_SIZE not exceeds
++       * ubi->vid_hdr_alsize, so that all vid header operations
++       * won't access memory out of bounds.
++       */
++      if ((ubi->vid_hdr_shift + UBI_VID_HDR_SIZE) > ubi->vid_hdr_alsize) {
++              ubi_err(ubi, "Invalid VID header offset %d, VID header shift(%d)"
++                      " + VID header size(%zu) > VID header aligned size(%d).",
++                      ubi->vid_hdr_offset, ubi->vid_hdr_shift,
++                      UBI_VID_HDR_SIZE, ubi->vid_hdr_alsize);
++              return -EINVAL;
++      }
++
+       /* Similar for the data offset */
+       ubi->leb_start = ubi->vid_hdr_offset + UBI_VID_HDR_SIZE;
+       ubi->leb_start = ALIGN(ubi->leb_start, ubi->min_io_size);
+-- 
+2.39.2
+
diff --git a/queue-5.15/x86-rtc-remove-__init-for-runtime-functions.patch b/queue-5.15/x86-rtc-remove-__init-for-runtime-functions.patch
new file mode 100644 (file)
index 0000000..f944243
--- /dev/null
@@ -0,0 +1,53 @@
+From 33bd270820f25d50a7394fafd56ffea8bfd150af Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 6 Apr 2023 08:26:52 +0200
+Subject: x86/rtc: Remove __init for runtime functions
+
+From: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com>
+
+[ Upstream commit 775d3c514c5b2763a50ab7839026d7561795924d ]
+
+set_rtc_noop(), get_rtc_noop() are after booting, therefore their __init
+annotation is wrong.
+
+A crash was observed on an x86 platform where CMOS RTC is unused and
+disabled via device tree. set_rtc_noop() was invoked from ntp:
+sync_hw_clock(), although CONFIG_RTC_SYSTOHC=n, however sync_cmos_clock()
+doesn't honour that.
+
+  Workqueue: events_power_efficient sync_hw_clock
+  RIP: 0010:set_rtc_noop
+  Call Trace:
+   update_persistent_clock64
+   sync_hw_clock
+
+Fix this by dropping the __init annotation from set/get_rtc_noop().
+
+Fixes: c311ed6183f4 ("x86/init: Allow DT configured systems to disable RTC at boot time")
+Signed-off-by: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Link: https://lore.kernel.org/r/59f7ceb1-446b-1d3d-0bc8-1f0ee94b1e18@nokia.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/x86/kernel/x86_init.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
+index 8b395821cb8d0..d3e3b16ea9cf3 100644
+--- a/arch/x86/kernel/x86_init.c
++++ b/arch/x86/kernel/x86_init.c
+@@ -32,8 +32,8 @@ static int __init iommu_init_noop(void) { return 0; }
+ static void iommu_shutdown_noop(void) { }
+ bool __init bool_x86_init_noop(void) { return false; }
+ void x86_op_int_noop(int cpu) { }
+-static __init int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; }
+-static __init void get_rtc_noop(struct timespec64 *now) { }
++static int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; }
++static void get_rtc_noop(struct timespec64 *now) { }
+ static __initconst const struct of_device_id of_cmos_match[] = {
+       { .compatible = "motorola,mc146818" },
+-- 
+2.39.2
+