]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jun 2022 09:57:27 +0000 (11:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jun 2022 09:57:27 +0000 (11:57 +0200)
added patches:
ext4-only-allow-test_dummy_encryption-when-supported.patch
interconnect-qcom-icc-rpmh-add-bcms-to-commit-list-in-pre_aggregate.patch
interconnect-qcom-sc7180-drop-ip0-interconnects.patch
mips-ip27-remove-incorrect-cpu_has_fpu-override.patch
mips-ip30-remove-incorrect-cpu_has_fpu-override.patch

queue-5.15/ext4-only-allow-test_dummy_encryption-when-supported.patch [new file with mode: 0644]
queue-5.15/interconnect-qcom-icc-rpmh-add-bcms-to-commit-list-in-pre_aggregate.patch [new file with mode: 0644]
queue-5.15/interconnect-qcom-sc7180-drop-ip0-interconnects.patch [new file with mode: 0644]
queue-5.15/mips-ip27-remove-incorrect-cpu_has_fpu-override.patch [new file with mode: 0644]
queue-5.15/mips-ip30-remove-incorrect-cpu_has_fpu-override.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/ext4-only-allow-test_dummy_encryption-when-supported.patch b/queue-5.15/ext4-only-allow-test_dummy_encryption-when-supported.patch
new file mode 100644 (file)
index 0000000..b3ee910
--- /dev/null
@@ -0,0 +1,107 @@
+From 5f41fdaea63ddf96d921ab36b2af4a90ccdb5744 Mon Sep 17 00:00:00 2001
+From: Eric Biggers <ebiggers@google.com>
+Date: Thu, 19 May 2022 13:44:37 -0700
+Subject: ext4: only allow test_dummy_encryption when supported
+
+From: Eric Biggers <ebiggers@google.com>
+
+commit 5f41fdaea63ddf96d921ab36b2af4a90ccdb5744 upstream.
+
+Make the test_dummy_encryption mount option require that the encrypt
+feature flag be already enabled on the filesystem, rather than
+automatically enabling it.  Practically, this means that "-O encrypt"
+will need to be included in MKFS_OPTIONS when running xfstests with the
+test_dummy_encryption mount option.  (ext4/053 also needs an update.)
+
+Moreover, as long as the preconditions for test_dummy_encryption are
+being tightened anyway, take the opportunity to start rejecting it when
+!CONFIG_FS_ENCRYPTION rather than ignoring it.
+
+The motivation for requiring the encrypt feature flag is that:
+
+- Having the filesystem auto-enable feature flags is problematic, as it
+  bypasses the usual sanity checks.  The specific issue which came up
+  recently is that in kernel versions where ext4 supports casefold but
+  not encrypt+casefold (v5.1 through v5.10), the kernel will happily add
+  the encrypt flag to a filesystem that has the casefold flag, making it
+  unmountable -- but only for subsequent mounts, not the initial one.
+  This confused the casefold support detection in xfstests, causing
+  generic/556 to fail rather than be skipped.
+
+- The xfstests-bld test runners (kvm-xfstests et al.) already use the
+  required mkfs flag, so they will not be affected by this change.  Only
+  users of test_dummy_encryption alone will be affected.  But, this
+  option has always been for testing only, so it should be fine to
+  require that the few users of this option update their test scripts.
+
+- f2fs already requires it (for its equivalent feature flag).
+
+Signed-off-by: Eric Biggers <ebiggers@google.com>
+Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>
+Link: https://lore.kernel.org/r/20220519204437.61645-1-ebiggers@kernel.org
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/ext4/ext4.h  |    6 ------
+ fs/ext4/super.c |   18 ++++++++++--------
+ 2 files changed, 10 insertions(+), 14 deletions(-)
+
+--- a/fs/ext4/ext4.h
++++ b/fs/ext4/ext4.h
+@@ -1435,12 +1435,6 @@ struct ext4_super_block {
+ #ifdef __KERNEL__
+-#ifdef CONFIG_FS_ENCRYPTION
+-#define DUMMY_ENCRYPTION_ENABLED(sbi) ((sbi)->s_dummy_enc_policy.policy != NULL)
+-#else
+-#define DUMMY_ENCRYPTION_ENABLED(sbi) (0)
+-#endif
+-
+ /* Number of quota types we support */
+ #define EXT4_MAXQUOTAS 3
+--- a/fs/ext4/super.c
++++ b/fs/ext4/super.c
+@@ -2059,6 +2059,12 @@ static int ext4_set_test_dummy_encryptio
+       struct ext4_sb_info *sbi = EXT4_SB(sb);
+       int err;
++      if (!ext4_has_feature_encrypt(sb)) {
++              ext4_msg(sb, KERN_WARNING,
++                       "test_dummy_encryption requires encrypt feature");
++              return -1;
++      }
++
+       /*
+        * This mount option is just for testing, and it's not worthwhile to
+        * implement the extra complexity (e.g. RCU protection) that would be
+@@ -2086,11 +2092,13 @@ static int ext4_set_test_dummy_encryptio
+               return -1;
+       }
+       ext4_msg(sb, KERN_WARNING, "Test dummy encryption mode enabled");
++      return 1;
+ #else
+       ext4_msg(sb, KERN_WARNING,
+-               "Test dummy encryption mount option ignored");
++               "test_dummy_encryption option not supported");
++      return -1;
++
+ #endif
+-      return 1;
+ }
+ struct ext4_parsed_options {
+@@ -4784,12 +4792,6 @@ no_journal:
+               goto failed_mount_wq;
+       }
+-      if (DUMMY_ENCRYPTION_ENABLED(sbi) && !sb_rdonly(sb) &&
+-          !ext4_has_feature_encrypt(sb)) {
+-              ext4_set_feature_encrypt(sb);
+-              ext4_commit_super(sb);
+-      }
+-
+       /*
+        * Get the # of file system overhead blocks from the
+        * superblock if present.
diff --git a/queue-5.15/interconnect-qcom-icc-rpmh-add-bcms-to-commit-list-in-pre_aggregate.patch b/queue-5.15/interconnect-qcom-icc-rpmh-add-bcms-to-commit-list-in-pre_aggregate.patch
new file mode 100644 (file)
index 0000000..bf34711
--- /dev/null
@@ -0,0 +1,104 @@
+From b95b668eaaa2574e8ee72f143c52075e9955177e Mon Sep 17 00:00:00 2001
+From: Mike Tipton <mdtipton@codeaurora.org>
+Date: Thu, 25 Nov 2021 19:47:51 +0200
+Subject: interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate
+
+From: Mike Tipton <mdtipton@codeaurora.org>
+
+commit b95b668eaaa2574e8ee72f143c52075e9955177e upstream.
+
+We're only adding BCMs to the commit list in aggregate(), but there are
+cases where pre_aggregate() is called without subsequently calling
+aggregate(). In particular, in icc_sync_state() when a node with initial
+BW has zero requests. Since BCMs aren't added to the commit list in
+these cases, we don't actually send the zero BW request to HW. So the
+resources remain on unnecessarily.
+
+Add BCMs to the commit list in pre_aggregate() instead, which is always
+called even when there are no requests.
+
+Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
+[georgi: remove icc_sync_state for platforms with incomplete support]
+Link: https://lore.kernel.org/r/20211125174751.25317-1-djakov@kernel.org
+Signed-off-by: Georgi Djakov <djakov@kernel.org>
+Signed-off-by: Stephen Boyd <swboyd@chromium.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/interconnect/qcom/icc-rpmh.c |   10 +++++-----
+ drivers/interconnect/qcom/sm8150.c   |    1 -
+ drivers/interconnect/qcom/sm8250.c   |    1 -
+ drivers/interconnect/qcom/sm8350.c   |    1 -
+ 4 files changed, 5 insertions(+), 8 deletions(-)
+
+--- a/drivers/interconnect/qcom/icc-rpmh.c
++++ b/drivers/interconnect/qcom/icc-rpmh.c
+@@ -21,13 +21,18 @@ void qcom_icc_pre_aggregate(struct icc_n
+ {
+       size_t i;
+       struct qcom_icc_node *qn;
++      struct qcom_icc_provider *qp;
+       qn = node->data;
++      qp = to_qcom_provider(node->provider);
+       for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
+               qn->sum_avg[i] = 0;
+               qn->max_peak[i] = 0;
+       }
++
++      for (i = 0; i < qn->num_bcms; i++)
++              qcom_icc_bcm_voter_add(qp->voter, qn->bcms[i]);
+ }
+ EXPORT_SYMBOL_GPL(qcom_icc_pre_aggregate);
+@@ -45,10 +50,8 @@ int qcom_icc_aggregate(struct icc_node *
+ {
+       size_t i;
+       struct qcom_icc_node *qn;
+-      struct qcom_icc_provider *qp;
+       qn = node->data;
+-      qp = to_qcom_provider(node->provider);
+       if (!tag)
+               tag = QCOM_ICC_TAG_ALWAYS;
+@@ -68,9 +71,6 @@ int qcom_icc_aggregate(struct icc_node *
+       *agg_avg += avg_bw;
+       *agg_peak = max_t(u32, *agg_peak, peak_bw);
+-      for (i = 0; i < qn->num_bcms; i++)
+-              qcom_icc_bcm_voter_add(qp->voter, qn->bcms[i]);
+-
+       return 0;
+ }
+ EXPORT_SYMBOL_GPL(qcom_icc_aggregate);
+--- a/drivers/interconnect/qcom/sm8150.c
++++ b/drivers/interconnect/qcom/sm8150.c
+@@ -535,7 +535,6 @@ static struct platform_driver qnoc_drive
+       .driver = {
+               .name = "qnoc-sm8150",
+               .of_match_table = qnoc_of_match,
+-              .sync_state = icc_sync_state,
+       },
+ };
+ module_platform_driver(qnoc_driver);
+--- a/drivers/interconnect/qcom/sm8250.c
++++ b/drivers/interconnect/qcom/sm8250.c
+@@ -551,7 +551,6 @@ static struct platform_driver qnoc_drive
+       .driver = {
+               .name = "qnoc-sm8250",
+               .of_match_table = qnoc_of_match,
+-              .sync_state = icc_sync_state,
+       },
+ };
+ module_platform_driver(qnoc_driver);
+--- a/drivers/interconnect/qcom/sm8350.c
++++ b/drivers/interconnect/qcom/sm8350.c
+@@ -531,7 +531,6 @@ static struct platform_driver qnoc_drive
+       .driver = {
+               .name = "qnoc-sm8350",
+               .of_match_table = qnoc_of_match,
+-              .sync_state = icc_sync_state,
+       },
+ };
+ module_platform_driver(qnoc_driver);
diff --git a/queue-5.15/interconnect-qcom-sc7180-drop-ip0-interconnects.patch b/queue-5.15/interconnect-qcom-sc7180-drop-ip0-interconnects.patch
new file mode 100644 (file)
index 0000000..67dd15c
--- /dev/null
@@ -0,0 +1,159 @@
+From 2f3724930eb4bba74f7d10bc3bef5bb22dd323df Mon Sep 17 00:00:00 2001
+From: Stephen Boyd <swboyd@chromium.org>
+Date: Tue, 12 Apr 2022 15:00:32 -0700
+Subject: interconnect: qcom: sc7180: Drop IP0 interconnects
+
+From: Stephen Boyd <swboyd@chromium.org>
+
+commit 2f3724930eb4bba74f7d10bc3bef5bb22dd323df upstream.
+
+The IPA BCM resource ("IP0") on sc7180 was moved to the clk-rpmh driver
+in commit bcd63d222b60 ("clk: qcom: rpmh: Add IPA clock for SC7180") and
+modeled as a clk, but this interconnect driver still had it modeled as
+an interconnect. This was mostly OK because nobody used the interconnect
+definition, until the interconnect framework started dropping bandwidth
+requests on interconnects that aren't used via the sync_state callback
+in commit 7d3b0b0d8184 ("interconnect: qcom: Use icc_sync_state"). Once
+that patch was applied the IP0 resource was going to be controlled from
+two places, the clk framework and the interconnect framework.
+
+Even then, things were probably going to be OK, because commit
+b95b668eaaa2 ("interconnect: qcom: icc-rpmh: Add BCMs to commit list in
+pre_aggregate") was needed to actually drop bandwidth requests on unused
+interconnects, of which the IPA was one of the interconnect that wasn't
+getting dropped to zero. Combining the three commits together leads to
+bad behavior where the interconnect framework is disabling the IP0
+resource because it has no users while the clk framework thinks the IP0
+resource is on because the only user, the IPA driver, has turned it on
+via clk_prepare_enable(). Depending on when sync_state is called, we can
+get into a situation like below:
+
+  IPA driver probes
+  IPA driver gets notified modem started
+   runtime PM get()
+    IPA clk enabled -> IP0 resource is ON
+  sync_state runs
+   interconnect zeroes out the IP0 resource -> IP0 resource is off
+  IPA driver tries to access a register and blows up
+
+The crash is an unclocked access that manifest as an SError.
+
+ SError Interrupt on CPU0, code 0xbe000011 -- SError
+ CPU: 0 PID: 3595 Comm: mmdata_mgr Not tainted 5.17.1+ #166
+ Hardware name: Google Lazor (rev1 - 2) with LTE (DT)
+ pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
+ pc : mutex_lock+0x4c/0x80
+ lr : mutex_lock+0x30/0x80
+ sp : ffffffc00da9b9c0
+ x29: ffffffc00da9b9c0 x28: 0000000000000000 x27: 0000000000000000
+ x26: ffffffc00da9bc90 x25: ffffff80c2024010 x24: ffffff80c2024000
+ x23: ffffff8083100000 x22: ffffff80831000d0 x21: ffffff80831000a8
+ x20: ffffff80831000a8 x19: ffffff8083100070 x18: 00000000ffff0a00
+ x17: 000000002f7254f1 x16: 0000000000000100 x15: 0000000000000000
+ x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
+ x11: 000000000001f0b8 x10: ffffffc00931f0b8 x9 : 0000000000000000
+ x8 : 0000000000000000 x7 : fefefefefeff2f60 x6 : 0000808080808080
+ x5 : 0000000000000000 x4 : 8080808080800000 x3 : ffffff80d2d4ee28
+ x2 : ffffff808c1d6e40 x1 : 0000000000000000 x0 : ffffff8083100070
+ Kernel panic - not syncing: Asynchronous SError Interrupt
+ CPU: 0 PID: 3595 Comm: mmdata_mgr Not tainted 5.17.1+ #166
+ Hardware name: Google Lazor (rev1 - 2) with LTE (DT)
+ Call trace:
+  dump_backtrace+0xf4/0x114
+  show_stack+0x24/0x30
+  dump_stack_lvl+0x64/0x7c
+  dump_stack+0x18/0x38
+  panic+0x150/0x38c
+  nmi_panic+0x88/0xa0
+  arm64_serror_panic+0x74/0x80
+  do_serror+0x0/0x80
+  do_serror+0x58/0x80
+  el1h_64_error_handler+0x34/0x4c
+  el1h_64_error+0x78/0x7c
+  mutex_lock+0x4c/0x80
+  __gsi_channel_start+0x50/0x17c
+  gsi_channel_start+0x54/0x90
+  ipa_endpoint_enable_one+0x34/0xc0
+  ipa_open+0x4c/0x120
+
+Remove all IP0 resource management from the interconnect driver so that
+clk-rpmh is the sole owner. This fixes the issue by preventing the
+interconnect driver from overwriting the IP0 resource data that the
+clk-rpmh driver wrote.
+
+Cc: Alex Elder <elder@linaro.org>
+Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
+Cc: Taniya Das <quic_tdas@quicinc.com>
+Cc: Mike Tipton <quic_mdtipton@quicinc.com>
+Fixes: b95b668eaaa2 ("interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate")
+Fixes: bcd63d222b60 ("clk: qcom: rpmh: Add IPA clock for SC7180")
+Fixes: 7d3b0b0d8184 ("interconnect: qcom: Use icc_sync_state")
+Signed-off-by: Stephen Boyd <swboyd@chromium.org>
+Tested-by: Alex Elder <elder@linaro.org>
+Reviewed-by: Alex Elder <elder@linaro.org>
+Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
+Link: https://lore.kernel.org/r/20220412220033.1273607-2-swboyd@chromium.org
+Signed-off-by: Georgi Djakov <djakov@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/interconnect/qcom/sc7180.c |   21 ---------------------
+ 1 file changed, 21 deletions(-)
+
+--- a/drivers/interconnect/qcom/sc7180.c
++++ b/drivers/interconnect/qcom/sc7180.c
+@@ -47,7 +47,6 @@ DEFINE_QNODE(qnm_mnoc_sf, SC7180_MASTER_
+ DEFINE_QNODE(qnm_snoc_gc, SC7180_MASTER_SNOC_GC_MEM_NOC, 1, 8, SC7180_SLAVE_LLCC);
+ DEFINE_QNODE(qnm_snoc_sf, SC7180_MASTER_SNOC_SF_MEM_NOC, 1, 16, SC7180_SLAVE_LLCC);
+ DEFINE_QNODE(qxm_gpu, SC7180_MASTER_GFX3D, 2, 32, SC7180_SLAVE_GEM_NOC_SNOC, SC7180_SLAVE_LLCC);
+-DEFINE_QNODE(ipa_core_master, SC7180_MASTER_IPA_CORE, 1, 8, SC7180_SLAVE_IPA_CORE);
+ DEFINE_QNODE(llcc_mc, SC7180_MASTER_LLCC, 2, 4, SC7180_SLAVE_EBI1);
+ DEFINE_QNODE(qhm_mnoc_cfg, SC7180_MASTER_CNOC_MNOC_CFG, 1, 4, SC7180_SLAVE_SERVICE_MNOC);
+ DEFINE_QNODE(qxm_camnoc_hf0, SC7180_MASTER_CAMNOC_HF0, 2, 32, SC7180_SLAVE_MNOC_HF_MEM_NOC);
+@@ -129,7 +128,6 @@ DEFINE_QNODE(qhs_mdsp_ms_mpu_cfg, SC7180
+ DEFINE_QNODE(qns_gem_noc_snoc, SC7180_SLAVE_GEM_NOC_SNOC, 1, 8, SC7180_MASTER_GEM_NOC_SNOC);
+ DEFINE_QNODE(qns_llcc, SC7180_SLAVE_LLCC, 1, 16, SC7180_MASTER_LLCC);
+ DEFINE_QNODE(srvc_gemnoc, SC7180_SLAVE_SERVICE_GEM_NOC, 1, 4);
+-DEFINE_QNODE(ipa_core_slave, SC7180_SLAVE_IPA_CORE, 1, 8);
+ DEFINE_QNODE(ebi, SC7180_SLAVE_EBI1, 2, 4);
+ DEFINE_QNODE(qns_mem_noc_hf, SC7180_SLAVE_MNOC_HF_MEM_NOC, 1, 32, SC7180_MASTER_MNOC_HF_MEM_NOC);
+ DEFINE_QNODE(qns_mem_noc_sf, SC7180_SLAVE_MNOC_SF_MEM_NOC, 1, 32, SC7180_MASTER_MNOC_SF_MEM_NOC);
+@@ -160,7 +158,6 @@ DEFINE_QBCM(bcm_mc0, "MC0", true, &ebi);
+ DEFINE_QBCM(bcm_sh0, "SH0", true, &qns_llcc);
+ DEFINE_QBCM(bcm_mm0, "MM0", false, &qns_mem_noc_hf);
+ DEFINE_QBCM(bcm_ce0, "CE0", false, &qxm_crypto);
+-DEFINE_QBCM(bcm_ip0, "IP0", false, &ipa_core_slave);
+ DEFINE_QBCM(bcm_cn0, "CN0", true, &qnm_snoc, &xm_qdss_dap, &qhs_a1_noc_cfg, &qhs_a2_noc_cfg, &qhs_ahb2phy0, &qhs_aop, &qhs_aoss, &qhs_boot_rom, &qhs_camera_cfg, &qhs_camera_nrt_throttle_cfg, &qhs_camera_rt_throttle_cfg, &qhs_clk_ctl, &qhs_cpr_cx, &qhs_cpr_mx, &qhs_crypto0_cfg, &qhs_dcc_cfg, &qhs_ddrss_cfg, &qhs_display_cfg, &qhs_display_rt_throttle_cfg, &qhs_display_throttle_cfg, &qhs_glm, &qhs_gpuss_cfg, &qhs_imem_cfg, &qhs_ipa, &qhs_mnoc_cfg, &qhs_mss_cfg, &qhs_npu_cfg, &qhs_npu_dma_throttle_cfg, &qhs_npu_dsp_throttle_cfg, &qhs_pimem_cfg, &qhs_prng, &qhs_qdss_cfg, &qhs_qm_cfg, &qhs_qm_mpu_cfg, &qhs_qup0, &qhs_qup1, &qhs_security, &qhs_snoc_cfg, &qhs_tcsr, &qhs_tlmm_1, &qhs_tlmm_2, &qhs_tlmm_3, &qhs_ufs_mem_cfg, &qhs_usb3, &qhs_venus_cfg, &qhs_venus_throttle_cfg, &qhs_vsense_ctrl_cfg, &srvc_cnoc);
+ DEFINE_QBCM(bcm_mm1, "MM1", false, &qxm_camnoc_hf0_uncomp, &qxm_camnoc_hf1_uncomp, &qxm_camnoc_sf_uncomp, &qhm_mnoc_cfg, &qxm_mdp0, &qxm_rot, &qxm_venus0, &qxm_venus_arm9);
+ DEFINE_QBCM(bcm_sh2, "SH2", false, &acm_sys_tcu);
+@@ -372,22 +369,6 @@ static struct qcom_icc_desc sc7180_gem_n
+       .num_bcms = ARRAY_SIZE(gem_noc_bcms),
+ };
+-static struct qcom_icc_bcm *ipa_virt_bcms[] = {
+-      &bcm_ip0,
+-};
+-
+-static struct qcom_icc_node *ipa_virt_nodes[] = {
+-      [MASTER_IPA_CORE] = &ipa_core_master,
+-      [SLAVE_IPA_CORE] = &ipa_core_slave,
+-};
+-
+-static struct qcom_icc_desc sc7180_ipa_virt = {
+-      .nodes = ipa_virt_nodes,
+-      .num_nodes = ARRAY_SIZE(ipa_virt_nodes),
+-      .bcms = ipa_virt_bcms,
+-      .num_bcms = ARRAY_SIZE(ipa_virt_bcms),
+-};
+-
+ static struct qcom_icc_bcm *mc_virt_bcms[] = {
+       &bcm_acv,
+       &bcm_mc0,
+@@ -519,8 +500,6 @@ static const struct of_device_id qnoc_of
+         .data = &sc7180_dc_noc},
+       { .compatible = "qcom,sc7180-gem-noc",
+         .data = &sc7180_gem_noc},
+-      { .compatible = "qcom,sc7180-ipa-virt",
+-        .data = &sc7180_ipa_virt},
+       { .compatible = "qcom,sc7180-mc-virt",
+         .data = &sc7180_mc_virt},
+       { .compatible = "qcom,sc7180-mmss-noc",
diff --git a/queue-5.15/mips-ip27-remove-incorrect-cpu_has_fpu-override.patch b/queue-5.15/mips-ip27-remove-incorrect-cpu_has_fpu-override.patch
new file mode 100644 (file)
index 0000000..e3fedf6
--- /dev/null
@@ -0,0 +1,39 @@
+From 424c3781dd1cb401857585331eaaa425a13f2429 Mon Sep 17 00:00:00 2001
+From: "Maciej W. Rozycki" <macro@orcam.me.uk>
+Date: Sun, 1 May 2022 23:14:16 +0100
+Subject: MIPS: IP27: Remove incorrect `cpu_has_fpu' override
+
+From: Maciej W. Rozycki <macro@orcam.me.uk>
+
+commit 424c3781dd1cb401857585331eaaa425a13f2429 upstream.
+
+Remove unsupported forcing of `cpu_has_fpu' to 1, which makes the `nofpu'
+kernel parameter non-functional, and also causes a link error:
+
+ld: arch/mips/kernel/traps.o: in function `trap_init':
+./arch/mips/include/asm/msa.h:(.init.text+0x348): undefined reference to `handle_fpe'
+ld: ./arch/mips/include/asm/msa.h:(.init.text+0x354): undefined reference to `handle_fpe'
+ld: ./arch/mips/include/asm/msa.h:(.init.text+0x360): undefined reference to `handle_fpe'
+
+where the CONFIG_MIPS_FP_SUPPORT configuration option has been disabled.
+
+Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
+Reported-by: Stephen Zhang <starzhangzsd@gmail.com>
+Fixes: 0ebb2f4159af ("MIPS: IP27: Update/restructure CPU overrides")
+Cc: stable@vger.kernel.org # v4.2+
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h
++++ b/arch/mips/include/asm/mach-ip27/cpu-feature-overrides.h
+@@ -26,7 +26,6 @@
+ #define cpu_has_3k_cache              0
+ #define cpu_has_4k_cache              1
+ #define cpu_has_tx39_cache            0
+-#define cpu_has_fpu                   1
+ #define cpu_has_nofpuex                       0
+ #define cpu_has_32fpr                 1
+ #define cpu_has_counter                       1
diff --git a/queue-5.15/mips-ip30-remove-incorrect-cpu_has_fpu-override.patch b/queue-5.15/mips-ip30-remove-incorrect-cpu_has_fpu-override.patch
new file mode 100644 (file)
index 0000000..977cce1
--- /dev/null
@@ -0,0 +1,39 @@
+From f44b3e74c33fe04defeff24ebcae98c3bcc5b285 Mon Sep 17 00:00:00 2001
+From: "Maciej W. Rozycki" <macro@orcam.me.uk>
+Date: Sun, 1 May 2022 23:14:22 +0100
+Subject: MIPS: IP30: Remove incorrect `cpu_has_fpu' override
+
+From: Maciej W. Rozycki <macro@orcam.me.uk>
+
+commit f44b3e74c33fe04defeff24ebcae98c3bcc5b285 upstream.
+
+Remove unsupported forcing of `cpu_has_fpu' to 1, which makes the `nofpu'
+kernel parameter non-functional, and also causes a link error:
+
+ld: arch/mips/kernel/traps.o: in function `trap_init':
+./arch/mips/include/asm/msa.h:(.init.text+0x348): undefined reference to `handle_fpe'
+ld: ./arch/mips/include/asm/msa.h:(.init.text+0x354): undefined reference to `handle_fpe'
+ld: ./arch/mips/include/asm/msa.h:(.init.text+0x360): undefined reference to `handle_fpe'
+
+where the CONFIG_MIPS_FP_SUPPORT configuration option has been disabled.
+
+Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
+Reported-by: Stephen Zhang <starzhangzsd@gmail.com>
+Fixes: 7505576d1c1a ("MIPS: add support for SGI Octane (IP30)")
+Cc: stable@vger.kernel.org # v5.5+
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/mips/include/asm/mach-ip30/cpu-feature-overrides.h |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/arch/mips/include/asm/mach-ip30/cpu-feature-overrides.h
++++ b/arch/mips/include/asm/mach-ip30/cpu-feature-overrides.h
+@@ -29,7 +29,6 @@
+ #define cpu_has_3k_cache              0
+ #define cpu_has_4k_cache              1
+ #define cpu_has_tx39_cache            0
+-#define cpu_has_fpu                   1
+ #define cpu_has_nofpuex                       0
+ #define cpu_has_32fpr                 1
+ #define cpu_has_counter                       1
index ac505a9121ad0f8fd23935cc5e515e6e87560ac0..b188378129a5396c6c17793bbbb23dc40c86f569 100644 (file)
@@ -654,3 +654,8 @@ revert-random-use-static-branch-for-crng_ready.patch
 staging-r8188eu-delete-rtw_wx_read-write32.patch
 rdma-hns-remove-the-num_cqc_timer-variable.patch
 rdma-rxe-generate-a-completion-for-unsupported-invalid-opcode.patch
+mips-ip27-remove-incorrect-cpu_has_fpu-override.patch
+mips-ip30-remove-incorrect-cpu_has_fpu-override.patch
+ext4-only-allow-test_dummy_encryption-when-supported.patch
+interconnect-qcom-sc7180-drop-ip0-interconnects.patch
+interconnect-qcom-icc-rpmh-add-bcms-to-commit-list-in-pre_aggregate.patch