From: Sasha Levin Date: Wed, 16 Nov 2022 12:53:28 +0000 (-0500) Subject: Fixes for 4.19 X-Git-Tag: v4.19.266~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3ced9375c1fcb91300375ffb141bc140d60beb0e;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.19 Signed-off-by: Sasha Levin --- diff --git a/queue-4.19/asoc-wm5102-revert-asoc-wm5102-fix-pm-disable-depth-.patch b/queue-4.19/asoc-wm5102-revert-asoc-wm5102-fix-pm-disable-depth-.patch new file mode 100644 index 00000000000..48fbb1ac58c --- /dev/null +++ b/queue-4.19/asoc-wm5102-revert-asoc-wm5102-fix-pm-disable-depth-.patch @@ -0,0 +1,51 @@ +From 05274fc67f96a2b2d46d900a2209b0741368735e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 10 Oct 2022 19:48:50 +0800 +Subject: ASoC: wm5102: Revert "ASoC: wm5102: Fix PM disable depth imbalance in + wm5102_probe" + +From: Zhang Qilong + +[ Upstream commit de71d7567e358effd06dfc3e2a154b25f1331c10 ] + +This reverts commit fcbb60820cd3008bb44334a0395e5e57ccb77329. + +The pm_runtime_disable is redundant when error returns in +wm5102_probe, we just revert the old patch to fix it. + +Signed-off-by: Zhang Qilong +Acked-by: Charles Keepax +Link: https://lore.kernel.org/r/20221010114852.88127-2-zhangqilong3@huawei.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/codecs/wm5102.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c +index 9b33c87c2fe4..7e817e1877c2 100644 +--- a/sound/soc/codecs/wm5102.c ++++ b/sound/soc/codecs/wm5102.c +@@ -2085,6 +2085,9 @@ static int wm5102_probe(struct platform_device *pdev) + regmap_update_bits(arizona->regmap, wm5102_digital_vu[i], + WM5102_DIG_VU, WM5102_DIG_VU); + ++ pm_runtime_enable(&pdev->dev); ++ pm_runtime_idle(&pdev->dev); ++ + ret = arizona_request_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, + "ADSP2 Compressed IRQ", wm5102_adsp2_irq, + wm5102); +@@ -2117,9 +2120,6 @@ static int wm5102_probe(struct platform_device *pdev) + goto err_spk_irqs; + } + +- pm_runtime_enable(&pdev->dev); +- pm_runtime_idle(&pdev->dev); +- + return ret; + + err_spk_irqs: +-- +2.35.1 + diff --git a/queue-4.19/asoc-wm5110-revert-asoc-wm5110-fix-pm-disable-depth-.patch b/queue-4.19/asoc-wm5110-revert-asoc-wm5110-fix-pm-disable-depth-.patch new file mode 100644 index 00000000000..4602aef7a8a --- /dev/null +++ b/queue-4.19/asoc-wm5110-revert-asoc-wm5110-fix-pm-disable-depth-.patch @@ -0,0 +1,51 @@ +From 173df8c6a7ef06a96901222f0d37af2b8d1a43fb Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 10 Oct 2022 19:48:51 +0800 +Subject: ASoC: wm5110: Revert "ASoC: wm5110: Fix PM disable depth imbalance in + wm5110_probe" + +From: Zhang Qilong + +[ Upstream commit 7d4e966f4cd73ff69bf06934e8e14a33fb7ef447 ] + +This reverts commit 86b46bf1feb83898d89a2b4a8d08d21e9ea277a7. + +The pm_runtime_disable is redundant when error returns in +wm5110_probe, we just revert the old patch to fix it. + +Signed-off-by: Zhang Qilong +Acked-by: Charles Keepax +Link: https://lore.kernel.org/r/20221010114852.88127-3-zhangqilong3@huawei.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/codecs/wm5110.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c +index 43a47312d71b..e510aca55163 100644 +--- a/sound/soc/codecs/wm5110.c ++++ b/sound/soc/codecs/wm5110.c +@@ -2453,6 +2453,9 @@ static int wm5110_probe(struct platform_device *pdev) + regmap_update_bits(arizona->regmap, wm5110_digital_vu[i], + WM5110_DIG_VU, WM5110_DIG_VU); + ++ pm_runtime_enable(&pdev->dev); ++ pm_runtime_idle(&pdev->dev); ++ + ret = arizona_request_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, + "ADSP2 Compressed IRQ", wm5110_adsp2_irq, + wm5110); +@@ -2485,9 +2488,6 @@ static int wm5110_probe(struct platform_device *pdev) + goto err_spk_irqs; + } + +- pm_runtime_enable(&pdev->dev); +- pm_runtime_idle(&pdev->dev); +- + return ret; + + err_spk_irqs: +-- +2.35.1 + diff --git a/queue-4.19/asoc-wm8997-revert-asoc-wm8997-fix-pm-disable-depth-.patch b/queue-4.19/asoc-wm8997-revert-asoc-wm8997-fix-pm-disable-depth-.patch new file mode 100644 index 00000000000..fce1ad147de --- /dev/null +++ b/queue-4.19/asoc-wm8997-revert-asoc-wm8997-fix-pm-disable-depth-.patch @@ -0,0 +1,51 @@ +From b86c71aade692f710627d98a608752ff770adee9 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 10 Oct 2022 19:48:52 +0800 +Subject: ASoC: wm8997: Revert "ASoC: wm8997: Fix PM disable depth imbalance in + wm8997_probe" + +From: Zhang Qilong + +[ Upstream commit 68ce83e3bb26feba0fcdd59667fde942b3a600a1 ] + +This reverts commit 41a736ac20602f64773e80f0f5b32cde1830a44a. + +The pm_runtime_disable is redundant when error returns in +wm8997_probe, we just revert the old patch to fix it. + +Signed-off-by: Zhang Qilong +Acked-by: Charles Keepax +Link: https://lore.kernel.org/r/20221010114852.88127-4-zhangqilong3@huawei.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/codecs/wm8997.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c +index 9f819113af1e..bb6a95be8726 100644 +--- a/sound/soc/codecs/wm8997.c ++++ b/sound/soc/codecs/wm8997.c +@@ -1159,6 +1159,9 @@ static int wm8997_probe(struct platform_device *pdev) + regmap_update_bits(arizona->regmap, wm8997_digital_vu[i], + WM8997_DIG_VU, WM8997_DIG_VU); + ++ pm_runtime_enable(&pdev->dev); ++ pm_runtime_idle(&pdev->dev); ++ + arizona_init_common(arizona); + + ret = arizona_init_vol_limit(arizona); +@@ -1177,9 +1180,6 @@ static int wm8997_probe(struct platform_device *pdev) + goto err_spk_irqs; + } + +- pm_runtime_enable(&pdev->dev); +- pm_runtime_idle(&pdev->dev); +- + return ret; + + err_spk_irqs: +-- +2.35.1 + diff --git a/queue-4.19/bluetooth-l2cap-fix-l2cap_global_chan_by_psm.patch b/queue-4.19/bluetooth-l2cap-fix-l2cap_global_chan_by_psm.patch new file mode 100644 index 00000000000..1b7450fd93d --- /dev/null +++ b/queue-4.19/bluetooth-l2cap-fix-l2cap_global_chan_by_psm.patch @@ -0,0 +1,35 @@ +From fd1f18c147ac54cc13c7f80b1e776cff3e170ecd Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 31 Oct 2022 16:10:33 -0700 +Subject: Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm + +From: Luiz Augusto von Dentz + +[ Upstream commit f937b758a188d6fd328a81367087eddbb2fce50f ] + +l2cap_global_chan_by_psm shall not return fixed channels as they are not +meant to be connected by (S)PSM. + +Signed-off-by: Luiz Augusto von Dentz +Reviewed-by: Tedd Ho-Jeong An +Signed-off-by: Sasha Levin +--- + net/bluetooth/l2cap_core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c +index 251da90642cd..82e3629617c8 100644 +--- a/net/bluetooth/l2cap_core.c ++++ b/net/bluetooth/l2cap_core.c +@@ -1824,7 +1824,7 @@ static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm, + if (link_type == LE_LINK && c->src_type == BDADDR_BREDR) + continue; + +- if (c->psm == psm) { ++ if (c->chan_type != L2CAP_CHAN_FIXED && c->psm == psm) { + int src_match, dst_match; + int src_any, dst_any; + +-- +2.35.1 + diff --git a/queue-4.19/btrfs-remove-pointless-and-double-ulist-frees-in-err.patch b/queue-4.19/btrfs-remove-pointless-and-double-ulist-frees-in-err.patch new file mode 100644 index 00000000000..60acb422ff0 --- /dev/null +++ b/queue-4.19/btrfs-remove-pointless-and-double-ulist-frees-in-err.patch @@ -0,0 +1,134 @@ +From f06619e2296b9a4df29651c884359145d2a4916c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 1 Nov 2022 16:15:40 +0000 +Subject: btrfs: remove pointless and double ulist frees in error paths of + qgroup tests + +From: Filipe Manana + +[ Upstream commit d0ea17aec12ea0f7b9d2ed727d8ef8169d1e7699 ] + +Several places in the qgroup self tests follow the pattern of freeing the +ulist pointer they passed to btrfs_find_all_roots() if the call to that +function returned an error. That is pointless because that function always +frees the ulist in case it returns an error. + +Also In some places like at test_multiple_refs(), after a call to +btrfs_qgroup_account_extent() we also leave "old_roots" and "new_roots" +pointing to ulists that were freed, because btrfs_qgroup_account_extent() +has freed those ulists, and if after that the next call to +btrfs_find_all_roots() fails, we call ulist_free() on the "old_roots" +ulist again, resulting in a double free. + +So remove those calls to reduce the code size and avoid double ulist +free in case of an error. + +Signed-off-by: Filipe Manana +Signed-off-by: David Sterba +Signed-off-by: Sasha Levin +--- + fs/btrfs/tests/qgroup-tests.c | 16 ++++------------ + 1 file changed, 4 insertions(+), 12 deletions(-) + +diff --git a/fs/btrfs/tests/qgroup-tests.c b/fs/btrfs/tests/qgroup-tests.c +index 24a61e524861..9b43907324a3 100644 +--- a/fs/btrfs/tests/qgroup-tests.c ++++ b/fs/btrfs/tests/qgroup-tests.c +@@ -230,7 +230,6 @@ static int test_no_shared_qgroup(struct btrfs_root *root, + ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, + false); + if (ret) { +- ulist_free(old_roots); + test_err("couldn't find old roots: %d", ret); + return ret; + } +@@ -246,7 +245,6 @@ static int test_no_shared_qgroup(struct btrfs_root *root, + false); + if (ret) { + ulist_free(old_roots); +- ulist_free(new_roots); + test_err("couldn't find old roots: %d", ret); + return ret; + } +@@ -258,18 +256,19 @@ static int test_no_shared_qgroup(struct btrfs_root *root, + return ret; + } + ++ /* btrfs_qgroup_account_extent() always frees the ulists passed to it. */ ++ old_roots = NULL; ++ new_roots = NULL; ++ + if (btrfs_verify_qgroup_counts(fs_info, BTRFS_FS_TREE_OBJECTID, + nodesize, nodesize)) { + test_err("qgroup counts didn't match expected values"); + return -EINVAL; + } +- old_roots = NULL; +- new_roots = NULL; + + ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, + false); + if (ret) { +- ulist_free(old_roots); + test_err("couldn't find old roots: %d", ret); + return ret; + } +@@ -284,7 +283,6 @@ static int test_no_shared_qgroup(struct btrfs_root *root, + false); + if (ret) { + ulist_free(old_roots); +- ulist_free(new_roots); + test_err("couldn't find old roots: %d", ret); + return ret; + } +@@ -335,7 +333,6 @@ static int test_multiple_refs(struct btrfs_root *root, + ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, + false); + if (ret) { +- ulist_free(old_roots); + test_err("couldn't find old roots: %d", ret); + return ret; + } +@@ -351,7 +348,6 @@ static int test_multiple_refs(struct btrfs_root *root, + false); + if (ret) { + ulist_free(old_roots); +- ulist_free(new_roots); + test_err("couldn't find old roots: %d", ret); + return ret; + } +@@ -372,7 +368,6 @@ static int test_multiple_refs(struct btrfs_root *root, + ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, + false); + if (ret) { +- ulist_free(old_roots); + test_err("couldn't find old roots: %d", ret); + return ret; + } +@@ -388,7 +383,6 @@ static int test_multiple_refs(struct btrfs_root *root, + false); + if (ret) { + ulist_free(old_roots); +- ulist_free(new_roots); + test_err("couldn't find old roots: %d", ret); + return ret; + } +@@ -415,7 +409,6 @@ static int test_multiple_refs(struct btrfs_root *root, + ret = btrfs_find_all_roots(&trans, fs_info, nodesize, 0, &old_roots, + false); + if (ret) { +- ulist_free(old_roots); + test_err("couldn't find old roots: %d", ret); + return ret; + } +@@ -431,7 +424,6 @@ static int test_multiple_refs(struct btrfs_root *root, + false); + if (ret) { + ulist_free(old_roots); +- ulist_free(new_roots); + test_err("couldn't find old roots: %d", ret); + return ret; + } +-- +2.35.1 + diff --git a/queue-4.19/drm-imx-imx-tve-fix-return-type-of-imx_tve_connector.patch b/queue-4.19/drm-imx-imx-tve-fix-return-type-of-imx_tve_connector.patch new file mode 100644 index 00000000000..98fdc068539 --- /dev/null +++ b/queue-4.19/drm-imx-imx-tve-fix-return-type-of-imx_tve_connector.patch @@ -0,0 +1,53 @@ +From 866c1cbafac6075f00092fa4bd4a8e6674195e90 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 13 Sep 2022 13:55:44 -0700 +Subject: drm/imx: imx-tve: Fix return type of imx_tve_connector_mode_valid + +From: Nathan Huckleberry + +[ Upstream commit fc007fb815ab5395c3962c09b79a1630b0fbed9c ] + +The mode_valid field in drm_connector_helper_funcs is expected to be of +type: +enum drm_mode_status (* mode_valid) (struct drm_connector *connector, + struct drm_display_mode *mode); + +The mismatched return type breaks forward edge kCFI since the underlying +function definition does not match the function hook definition. + +The return type of imx_tve_connector_mode_valid should be changed from +int to enum drm_mode_status. + +Reported-by: Dan Carpenter +Link: https://github.com/ClangBuiltLinux/linux/issues/1703 +Cc: llvm@lists.linux.dev +Signed-off-by: Nathan Huckleberry +Reviewed-by: Nathan Chancellor +Reviewed-by: Fabio Estevam +Reviewed-by: Philipp Zabel +Signed-off-by: Philipp Zabel +Link: https://patchwork.freedesktop.org/patch/msgid/20220913205544.155106-1-nhuck@google.com +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/imx/imx-tve.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c +index c19c1dfbfcdc..de3996fe90be 100644 +--- a/drivers/gpu/drm/imx/imx-tve.c ++++ b/drivers/gpu/drm/imx/imx-tve.c +@@ -243,8 +243,9 @@ static int imx_tve_connector_get_modes(struct drm_connector *connector) + return ret; + } + +-static int imx_tve_connector_mode_valid(struct drm_connector *connector, +- struct drm_display_mode *mode) ++static enum drm_mode_status ++imx_tve_connector_mode_valid(struct drm_connector *connector, ++ struct drm_display_mode *mode) + { + struct imx_tve *tve = con_to_tve(connector); + unsigned long rate; +-- +2.35.1 + diff --git a/queue-4.19/nfsv4-retry-lock-on-old_stateid-during-delegation-re.patch b/queue-4.19/nfsv4-retry-lock-on-old_stateid-during-delegation-re.patch new file mode 100644 index 00000000000..aad3034d0f8 --- /dev/null +++ b/queue-4.19/nfsv4-retry-lock-on-old_stateid-during-delegation-re.patch @@ -0,0 +1,62 @@ +From ceeb803fa1ea1c6fbc4c3d9fa707b819310b5e8f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 19 Oct 2022 12:09:18 -0400 +Subject: NFSv4: Retry LOCK on OLD_STATEID during delegation return + +From: Benjamin Coddington + +[ Upstream commit f5ea16137a3fa2858620dc9084466491c128535f ] + +There's a small window where a LOCK sent during a delegation return can +race with another OPEN on client, but the open stateid has not yet been +updated. In this case, the client doesn't handle the OLD_STATEID error +from the server and will lose this lock, emitting: +"NFS: nfs4_handle_delegation_recall_error: unhandled error -10024". + +Fix this by sending the task through the nfs4 error handling in +nfs4_lock_done() when we may have to reconcile our stateid with what the +server believes it to be. For this case, the result is a retry of the +LOCK operation with the updated stateid. + +Reported-by: Gonzalo Siero Humet +Signed-off-by: Benjamin Coddington +Signed-off-by: Anna Schumaker +Signed-off-by: Sasha Levin +--- + fs/nfs/nfs4proc.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c +index f9f76594b866..9a0f48f7f2b8 100644 +--- a/fs/nfs/nfs4proc.c ++++ b/fs/nfs/nfs4proc.c +@@ -6613,6 +6613,7 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata) + { + struct nfs4_lockdata *data = calldata; + struct nfs4_lock_state *lsp = data->lsp; ++ struct nfs_server *server = NFS_SERVER(d_inode(data->ctx->dentry)); + + dprintk("%s: begin!\n", __func__); + +@@ -6622,8 +6623,7 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata) + data->rpc_status = task->tk_status; + switch (task->tk_status) { + case 0: +- renew_lease(NFS_SERVER(d_inode(data->ctx->dentry)), +- data->timestamp); ++ renew_lease(server, data->timestamp); + if (data->arg.new_lock && !data->cancelled) { + data->fl.fl_flags &= ~(FL_SLEEP | FL_ACCESS); + if (locks_lock_inode_wait(lsp->ls_state->inode, &data->fl) < 0) +@@ -6644,6 +6644,8 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata) + if (!nfs4_stateid_match(&data->arg.open_stateid, + &lsp->ls_state->open_stateid)) + goto out_restart; ++ else if (nfs4_async_handle_error(task, server, lsp->ls_state, NULL) == -EAGAIN) ++ goto out_restart; + } else if (!nfs4_stateid_match(&data->arg.lock_stateid, + &lsp->ls_stateid)) + goto out_restart; +-- +2.35.1 + diff --git a/queue-4.19/rtc-cmos-fix-build-on-non-acpi-platforms.patch b/queue-4.19/rtc-cmos-fix-build-on-non-acpi-platforms.patch new file mode 100644 index 00000000000..21844686073 --- /dev/null +++ b/queue-4.19/rtc-cmos-fix-build-on-non-acpi-platforms.patch @@ -0,0 +1,37 @@ +From 77860c96093ddc7e271e4e6111a17c6886549adf Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 18 Oct 2022 22:35:11 +0200 +Subject: rtc: cmos: fix build on non-ACPI platforms + +From: Alexandre Belloni + +[ Upstream commit db4e955ae333567dea02822624106c0b96a2f84f ] + +Now that rtc_wake_setup is called outside of cmos_wake_setup, it also need +to be defined on non-ACPI platforms. + +Reported-by: kernel test robot +Link: https://lore.kernel.org/r/20221018203512.2532407-1-alexandre.belloni@bootlin.com +Signed-off-by: Alexandre Belloni +Signed-off-by: Sasha Levin +--- + drivers/rtc/rtc-cmos.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c +index 8545f0da57fe..c6147d8b622f 100644 +--- a/drivers/rtc/rtc-cmos.c ++++ b/drivers/rtc/rtc-cmos.c +@@ -1294,6 +1294,9 @@ static void cmos_check_acpi_rtc_status(struct device *dev, + { + } + ++static void rtc_wake_setup(struct device *dev) ++{ ++} + #endif + + #ifdef CONFIG_PNP +-- +2.35.1 + diff --git a/queue-4.19/selftests-futex-fix-build-for-clang.patch b/queue-4.19/selftests-futex-fix-build-for-clang.patch new file mode 100644 index 00000000000..bd4454f3f58 --- /dev/null +++ b/queue-4.19/selftests-futex-fix-build-for-clang.patch @@ -0,0 +1,54 @@ +From 7239346c583b88c0f3b818ab93a8f170dcc47d1f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 10 Oct 2022 08:37:02 +0200 +Subject: selftests/futex: fix build for clang +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Ricardo Cañuelo + +[ Upstream commit 03cab65a07e083b6c1010fbc8f9b817e9aca75d9 ] + +Don't use the test-specific header files as source files to force a +target dependency, as clang will complain if more than one source file +is used for a compile command with a single '-o' flag. + +Use the proper Makefile variables instead as defined in +tools/testing/selftests/lib.mk. + +Signed-off-by: Ricardo Cañuelo +Reviewed-by: André Almeida +Signed-off-by: Shuah Khan +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/futex/functional/Makefile | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile +index 30996306cabc..479531f5865d 100644 +--- a/tools/testing/selftests/futex/functional/Makefile ++++ b/tools/testing/selftests/futex/functional/Makefile +@@ -3,11 +3,11 @@ INCLUDES := -I../include -I../../ + CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) + LDFLAGS := $(LDFLAGS) -pthread -lrt + +-HEADERS := \ ++LOCAL_HDRS := \ + ../include/futextest.h \ + ../include/atomic.h \ + ../include/logging.h +-TEST_GEN_FILES := \ ++TEST_GEN_PROGS := \ + futex_wait_timeout \ + futex_wait_wouldblock \ + futex_requeue_pi \ +@@ -21,5 +21,3 @@ TEST_PROGS := run.sh + top_srcdir = ../../../../.. + KSFT_KHDR_INSTALL := 1 + include ../../lib.mk +- +-$(TEST_GEN_FILES): $(HEADERS) +-- +2.35.1 + diff --git a/queue-4.19/selftests-intel_pstate-fix-build-for-arch-x86_64.patch b/queue-4.19/selftests-intel_pstate-fix-build-for-arch-x86_64.patch new file mode 100644 index 00000000000..214e678014c --- /dev/null +++ b/queue-4.19/selftests-intel_pstate-fix-build-for-arch-x86_64.patch @@ -0,0 +1,43 @@ +From f524ea0db8fcb1c73c209ea491671751f8d2be7a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 10 Oct 2022 08:38:11 +0200 +Subject: selftests/intel_pstate: fix build for ARCH=x86_64 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Ricardo Cañuelo + +[ Upstream commit beb7d862ed4ac6aa14625418970f22a7d55b8615 ] + +Handle the scenario where the build is launched with the ARCH envvar +defined as x86_64. + +Signed-off-by: Ricardo Cañuelo +Signed-off-by: Shuah Khan +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/intel_pstate/Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tools/testing/selftests/intel_pstate/Makefile b/tools/testing/selftests/intel_pstate/Makefile +index 7340fd6a9a9f..9fc1a40b0127 100644 +--- a/tools/testing/selftests/intel_pstate/Makefile ++++ b/tools/testing/selftests/intel_pstate/Makefile +@@ -2,10 +2,10 @@ + CFLAGS := $(CFLAGS) -Wall -D_GNU_SOURCE + LDLIBS := $(LDLIBS) -lm + +-uname_M := $(shell uname -m 2>/dev/null || echo not) +-ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) ++ARCH ?= $(shell uname -m 2>/dev/null || echo not) ++ARCH_PROCESSED := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/) + +-ifeq (x86,$(ARCH)) ++ifeq (x86,$(ARCH_PROCESSED)) + TEST_GEN_FILES := msr aperf + endif + +-- +2.35.1 + diff --git a/queue-4.19/series b/queue-4.19/series index ae785d76f4e..33faf23e70b 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -40,3 +40,14 @@ dmaengine-at_hdmac-fix-impossible-condition.patch dmaengine-at_hdmac-check-return-code-of-dma_async_device_register.patch net-tun-call-napi_schedule_prep-to-ensure-we-own-a-napi.patch x86-cpu-restore-amd-s-de_cfg-msr-after-resume.patch +asoc-wm5102-revert-asoc-wm5102-fix-pm-disable-depth-.patch +asoc-wm5110-revert-asoc-wm5110-fix-pm-disable-depth-.patch +asoc-wm8997-revert-asoc-wm8997-fix-pm-disable-depth-.patch +spi-intel-fix-the-offset-to-get-the-64k-erase-opcode.patch +selftests-futex-fix-build-for-clang.patch +selftests-intel_pstate-fix-build-for-arch-x86_64.patch +rtc-cmos-fix-build-on-non-acpi-platforms.patch +nfsv4-retry-lock-on-old_stateid-during-delegation-re.patch +drm-imx-imx-tve-fix-return-type-of-imx_tve_connector.patch +btrfs-remove-pointless-and-double-ulist-frees-in-err.patch +bluetooth-l2cap-fix-l2cap_global_chan_by_psm.patch diff --git a/queue-4.19/spi-intel-fix-the-offset-to-get-the-64k-erase-opcode.patch b/queue-4.19/spi-intel-fix-the-offset-to-get-the-64k-erase-opcode.patch new file mode 100644 index 00000000000..2815ffa0e0a --- /dev/null +++ b/queue-4.19/spi-intel-fix-the-offset-to-get-the-64k-erase-opcode.patch @@ -0,0 +1,38 @@ +From 083b39d813440a22dbcdd37c840e25e4aca1d6e4 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 12 Oct 2022 12:21:35 -0300 +Subject: spi: intel: Fix the offset to get the 64K erase opcode + +From: Mauro Lima + +[ Upstream commit 6a43cd02ddbc597dc9a1f82c1e433f871a2f6f06 ] + +According to documentation, the 64K erase opcode is located in VSCC +range [16:23] instead of [8:15]. +Use the proper value to shift the mask over the correct range. + +Signed-off-by: Mauro Lima +Reviewed-by: Mika Westerberg +Link: https://lore.kernel.org/r/20221012152135.28353-1-mauro.lima@eclypsium.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + drivers/mtd/spi-nor/intel-spi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/mtd/spi-nor/intel-spi.c b/drivers/mtd/spi-nor/intel-spi.c +index d60cbf23d9aa..642a6f9071f2 100644 +--- a/drivers/mtd/spi-nor/intel-spi.c ++++ b/drivers/mtd/spi-nor/intel-spi.c +@@ -116,7 +116,7 @@ + #define ERASE_OPCODE_SHIFT 8 + #define ERASE_OPCODE_MASK (0xff << ERASE_OPCODE_SHIFT) + #define ERASE_64K_OPCODE_SHIFT 16 +-#define ERASE_64K_OPCODE_MASK (0xff << ERASE_OPCODE_SHIFT) ++#define ERASE_64K_OPCODE_MASK (0xff << ERASE_64K_OPCODE_SHIFT) + + #define INTEL_SPI_TIMEOUT 5000 /* ms */ + #define INTEL_SPI_FIFO_SZ 64 +-- +2.35.1 +