From: Greg Kroah-Hartman Date: Tue, 1 Oct 2024 09:57:23 +0000 (+0200) Subject: 6.1-stable patches X-Git-Tag: v6.6.54~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9804e66cc5bc63ac3c54a6ff8d07f29d62d11e2a;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: asoc-rt5682-return-devm_of_clk_add_hw_provider-to-transfer-the-error.patch drm-amd-display-skip-recompute-dsc-params-if-no-stream-on-link.patch input-adp5588-keys-fix-check-on-return-code.patch input-i8042-add-another-board-name-for-tuxedo-stellaris-gen5-amd-line.patch input-i8042-add-tuxedo-stellaris-15-slim-gen6-amd-to-i8042-quirk-table.patch input-i8042-add-tuxedo-stellaris-16-gen5-amd-to-i8042-quirk-table.patch kvm-x86-enforce-x2apic-s-must-be-zero-reserved-icr-bits.patch kvm-x86-move-x2apic-icr-helper-above-kvm_apic_write_nodecode.patch pci-imx6-fix-missing-call-to-phy_power_off-in-error-handling.patch pci-xilinx-nwl-fix-off-by-one-in-intx-irq-handler.patch revert-f2fs-use-flush-command-instead-of-fua-for-zoned-device.patch revert-media-tuners-fix-error-return-code-of-hybrid_tuner_request_state.patch soc-versatile-integrator-fix-of-node-leak-in-probe-error-path.patch --- diff --git a/queue-6.1/asoc-rt5682-return-devm_of_clk_add_hw_provider-to-transfer-the-error.patch b/queue-6.1/asoc-rt5682-return-devm_of_clk_add_hw_provider-to-transfer-the-error.patch new file mode 100644 index 00000000000..c757479b30c --- /dev/null +++ b/queue-6.1/asoc-rt5682-return-devm_of_clk_add_hw_provider-to-transfer-the-error.patch @@ -0,0 +1,37 @@ +From fcca6d05ef49d5650514ea1dcfd12e4ae3ff2be6 Mon Sep 17 00:00:00 2001 +From: Ma Ke +Date: Fri, 30 Aug 2024 22:31:54 +0800 +Subject: ASoC: rt5682: Return devm_of_clk_add_hw_provider to transfer the error + +From: Ma Ke + +commit fcca6d05ef49d5650514ea1dcfd12e4ae3ff2be6 upstream. + +Return devm_of_clk_add_hw_provider() in order to transfer the error, if it +fails due to resource allocation failure or device tree clock provider +registration failure. + +Cc: stable@vger.kernel.org +Fixes: ebbfabc16d23 ("ASoC: rt5682: Add CCF usage for providing I2S clks") +Signed-off-by: Ma Ke +Link: https://patch.msgid.link/20240830143154.3448004-1-make24@iscas.ac.cn +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/codecs/rt5682.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/sound/soc/codecs/rt5682.c ++++ b/sound/soc/codecs/rt5682.c +@@ -2899,8 +2899,10 @@ int rt5682_register_dai_clks(struct rt56 + } + + if (dev->of_node) { +- devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, ++ ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, + dai_clk_hw); ++ if (ret) ++ return ret; + } else { + ret = devm_clk_hw_register_clkdev(dev, dai_clk_hw, + init.name, diff --git a/queue-6.1/drm-amd-display-skip-recompute-dsc-params-if-no-stream-on-link.patch b/queue-6.1/drm-amd-display-skip-recompute-dsc-params-if-no-stream-on-link.patch new file mode 100644 index 00000000000..2181ac1f423 --- /dev/null +++ b/queue-6.1/drm-amd-display-skip-recompute-dsc-params-if-no-stream-on-link.patch @@ -0,0 +1,74 @@ +From 8151a6c13111b465dbabe07c19f572f7cbd16fef Mon Sep 17 00:00:00 2001 +From: Fangzhi Zuo +Date: Fri, 12 Jul 2024 16:30:03 -0400 +Subject: drm/amd/display: Skip Recompute DSC Params if no Stream on Link + +From: Fangzhi Zuo + +commit 8151a6c13111b465dbabe07c19f572f7cbd16fef upstream. + +[why] +Encounter NULL pointer dereference uner mst + dsc setup. + +BUG: kernel NULL pointer dereference, address: 0000000000000008 + PGD 0 P4D 0 + Oops: 0000 [#1] PREEMPT SMP NOPTI + CPU: 4 PID: 917 Comm: sway Not tainted 6.3.9-arch1-1 #1 124dc55df4f5272ccb409f39ef4872fc2b3376a2 + Hardware name: LENOVO 20NKS01Y00/20NKS01Y00, BIOS R12ET61W(1.31 ) 07/28/2022 + RIP: 0010:drm_dp_atomic_find_time_slots+0x5e/0x260 [drm_display_helper] + Code: 01 00 00 48 8b 85 60 05 00 00 48 63 80 88 00 00 00 3b 43 28 0f 8d 2e 01 00 00 48 8b 53 30 48 8d 04 80 48 8d 04 c2 48 8b 40 18 <48> 8> + RSP: 0018:ffff960cc2df77d8 EFLAGS: 00010293 + RAX: 0000000000000000 RBX: ffff8afb87e81280 RCX: 0000000000000224 + RDX: ffff8afb9ee37c00 RSI: ffff8afb8da1a578 RDI: ffff8afb87e81280 + RBP: ffff8afb83d67000 R08: 0000000000000001 R09: ffff8afb9652f850 + R10: ffff960cc2df7908 R11: 0000000000000002 R12: 0000000000000000 + R13: ffff8afb8d7688a0 R14: ffff8afb8da1a578 R15: 0000000000000224 + FS: 00007f4dac35ce00(0000) GS:ffff8afe30b00000(0000) knlGS:0000000000000000 + CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 + CR2: 0000000000000008 CR3: 000000010ddc6000 CR4: 00000000003506e0 + Call Trace: + + ? __die+0x23/0x70 + ? page_fault_oops+0x171/0x4e0 + ? plist_add+0xbe/0x100 + ? exc_page_fault+0x7c/0x180 + ? asm_exc_page_fault+0x26/0x30 + ? drm_dp_atomic_find_time_slots+0x5e/0x260 [drm_display_helper 0e67723696438d8e02b741593dd50d80b44c2026] + ? drm_dp_atomic_find_time_slots+0x28/0x260 [drm_display_helper 0e67723696438d8e02b741593dd50d80b44c2026] + compute_mst_dsc_configs_for_link+0x2ff/0xa40 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054] + ? fill_plane_buffer_attributes+0x419/0x510 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054] + compute_mst_dsc_configs_for_state+0x1e1/0x250 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054] + amdgpu_dm_atomic_check+0xecd/0x1190 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054] + drm_atomic_check_only+0x5c5/0xa40 + drm_mode_atomic_ioctl+0x76e/0xbc0 + +[how] +dsc recompute should be skipped if no mode change detected on the new +request. If detected, keep checking whether the stream is already on +current state or not. + +Cc: Mario Limonciello +Cc: Alex Deucher +Cc: stable@vger.kernel.org +Reviewed-by: Rodrigo Siqueira +Signed-off-by: Fangzhi Zuo +Signed-off-by: Wayne Lin +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +@@ -1258,6 +1258,9 @@ static bool is_dsc_need_re_compute( + if (new_stream_on_link_num == 0) + return false; + ++ if (new_stream_on_link_num == 0) ++ return false; ++ + /* check current_state if there stream on link but it is not in + * new request state + */ diff --git a/queue-6.1/input-adp5588-keys-fix-check-on-return-code.patch b/queue-6.1/input-adp5588-keys-fix-check-on-return-code.patch new file mode 100644 index 00000000000..14e1dff8f9b --- /dev/null +++ b/queue-6.1/input-adp5588-keys-fix-check-on-return-code.patch @@ -0,0 +1,41 @@ +From eb017f4ea13b1a5ad7f4332279f2e4c67b44bdea Mon Sep 17 00:00:00 2001 +From: Nuno Sa +Date: Fri, 20 Sep 2024 09:22:52 +0200 +Subject: Input: adp5588-keys - fix check on return code + +From: Nuno Sa + +commit eb017f4ea13b1a5ad7f4332279f2e4c67b44bdea upstream. + +During adp5588_setup(), we read all the events to clear the event FIFO. +However, adp5588_read() just calls i2c_smbus_read_byte_data() which +returns the byte read in case everything goes well. Hence, we need to +explicitly check for a negative error code instead of checking for +something different than 0. + +Fixes: e960309ce318 ("Input: adp5588-keys - bail out on returned error") +Cc: stable@vger.kernel.org +Signed-off-by: Nuno Sa +Link: https://lore.kernel.org/r/20240920-fix-adp5588-err-check-v1-1-81f6e957ef24@analog.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/keyboard/adp5588-keys.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/input/keyboard/adp5588-keys.c b/drivers/input/keyboard/adp5588-keys.c +index 1b0279393df4..5acaffb7f6e1 100644 +--- a/drivers/input/keyboard/adp5588-keys.c ++++ b/drivers/input/keyboard/adp5588-keys.c +@@ -627,7 +627,7 @@ static int adp5588_setup(struct adp5588_kpad *kpad) + + for (i = 0; i < KEYP_MAX_EVENT; i++) { + ret = adp5588_read(client, KEY_EVENTA); +- if (ret) ++ if (ret < 0) + return ret; + } + +-- +2.46.2 + diff --git a/queue-6.1/input-i8042-add-another-board-name-for-tuxedo-stellaris-gen5-amd-line.patch b/queue-6.1/input-i8042-add-another-board-name-for-tuxedo-stellaris-gen5-amd-line.patch new file mode 100644 index 00000000000..a8766b05d0f --- /dev/null +++ b/queue-6.1/input-i8042-add-another-board-name-for-tuxedo-stellaris-gen5-amd-line.patch @@ -0,0 +1,39 @@ +From 01eed86d50af9fab27d876fd677b86259ebe9de3 Mon Sep 17 00:00:00 2001 +From: Werner Sembach +Date: Tue, 10 Sep 2024 11:40:07 +0200 +Subject: Input: i8042 - add another board name for TUXEDO Stellaris Gen5 AMD line + +From: Werner Sembach + +commit 01eed86d50af9fab27d876fd677b86259ebe9de3 upstream. + +There might be devices out in the wild where the board name is GMxXGxx +instead of GMxXGxX. + +Adding both to be on the safe side. + +Signed-off-by: Werner Sembach +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20240910094008.1601230-2-wse@tuxedocomputers.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/serio/i8042-acpipnpio.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/input/serio/i8042-acpipnpio.h ++++ b/drivers/input/serio/i8042-acpipnpio.h +@@ -1138,6 +1138,13 @@ static const struct dmi_system_id i8042_ + }, + { + .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "GMxXGxx"), ++ }, ++ .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | ++ SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ }, ++ { ++ .matches = { + DMI_MATCH(DMI_BOARD_NAME, "GMxXGxX"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | diff --git a/queue-6.1/input-i8042-add-tuxedo-stellaris-15-slim-gen6-amd-to-i8042-quirk-table.patch b/queue-6.1/input-i8042-add-tuxedo-stellaris-15-slim-gen6-amd-to-i8042-quirk-table.patch new file mode 100644 index 00000000000..850960b3877 --- /dev/null +++ b/queue-6.1/input-i8042-add-tuxedo-stellaris-15-slim-gen6-amd-to-i8042-quirk-table.patch @@ -0,0 +1,46 @@ +From 3870e2850b56306d1d1e435c5a1ccbccd7c59291 Mon Sep 17 00:00:00 2001 +From: Werner Sembach +Date: Tue, 10 Sep 2024 11:40:08 +0200 +Subject: Input: i8042 - add TUXEDO Stellaris 15 Slim Gen6 AMD to i8042 quirk table + +From: Werner Sembach + +commit 3870e2850b56306d1d1e435c5a1ccbccd7c59291 upstream. + +The Gen6 devices have the same problem and the same Solution as the Gen5 +ones. + +Some TongFang barebones have touchpad and/or keyboard issues after +suspend, fixable with nomux + reset + noloop + nopnp. Luckily, none of +them have an external PS/2 port so this can safely be set for all of +them. + +I'm not entirely sure if every device listed really needs all four quirks, +but after testing and production use, no negative effects could be +observed when setting all four. + +Signed-off-by: Werner Sembach +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20240910094008.1601230-3-wse@tuxedocomputers.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/serio/i8042-acpipnpio.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/input/serio/i8042-acpipnpio.h ++++ b/drivers/input/serio/i8042-acpipnpio.h +@@ -1143,6 +1143,13 @@ static const struct dmi_system_id i8042_ + .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | + SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) + }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "GMxHGxx"), ++ }, ++ .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | ++ SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ }, + /* + * A lot of modern Clevo barebones have touchpad and/or keyboard issues + * after suspend fixable with nomux + reset + noloop + nopnp. Luckily, diff --git a/queue-6.1/input-i8042-add-tuxedo-stellaris-16-gen5-amd-to-i8042-quirk-table.patch b/queue-6.1/input-i8042-add-tuxedo-stellaris-16-gen5-amd-to-i8042-quirk-table.patch new file mode 100644 index 00000000000..793f54a0bf6 --- /dev/null +++ b/queue-6.1/input-i8042-add-tuxedo-stellaris-16-gen5-amd-to-i8042-quirk-table.patch @@ -0,0 +1,59 @@ +From e06edf96dea065dd1d9df695bf8b92784992333e Mon Sep 17 00:00:00 2001 +From: Werner Sembach +Date: Thu, 5 Sep 2024 18:48:51 +0200 +Subject: Input: i8042 - add TUXEDO Stellaris 16 Gen5 AMD to i8042 quirk table + +From: Werner Sembach + +commit e06edf96dea065dd1d9df695bf8b92784992333e upstream. + +Some TongFang barebones have touchpad and/or keyboard issues after +suspend, fixable with nomux + reset + noloop + nopnp. Luckily, none of +them have an external PS/2 port so this can safely be set for all of +them. + +I'm not entirely sure if every device listed really needs all four quirks, +but after testing and production use, no negative effects could be +observed when setting all four. + +Signed-off-by: Werner Sembach +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20240905164851.771578-1-wse@tuxedocomputers.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/serio/i8042-acpipnpio.h | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +--- a/drivers/input/serio/i8042-acpipnpio.h ++++ b/drivers/input/serio/i8042-acpipnpio.h +@@ -1121,6 +1121,29 @@ static const struct dmi_system_id i8042_ + .driver_data = (void *)(SERIO_QUIRK_NOLOOP) + }, + /* ++ * Some TongFang barebones have touchpad and/or keyboard issues after ++ * suspend fixable with nomux + reset + noloop + nopnp. Luckily, none of ++ * them have an external PS/2 port so this can safely be set for all of ++ * them. ++ * TongFang barebones come with board_vendor and/or system_vendor set to ++ * a different value for each individual reseller. The only somewhat ++ * universal way to identify them is by board_name. ++ */ ++ { ++ .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "GM6XGxX"), ++ }, ++ .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | ++ SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "GMxXGxX"), ++ }, ++ .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | ++ SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) ++ }, ++ /* + * A lot of modern Clevo barebones have touchpad and/or keyboard issues + * after suspend fixable with nomux + reset + noloop + nopnp. Luckily, + * none of them have an external PS/2 port so this can safely be set for diff --git a/queue-6.1/kvm-x86-enforce-x2apic-s-must-be-zero-reserved-icr-bits.patch b/queue-6.1/kvm-x86-enforce-x2apic-s-must-be-zero-reserved-icr-bits.patch new file mode 100644 index 00000000000..6279e24c6ee --- /dev/null +++ b/queue-6.1/kvm-x86-enforce-x2apic-s-must-be-zero-reserved-icr-bits.patch @@ -0,0 +1,62 @@ +From 71bf395a276f0578d19e0ae137a7d1d816d08e0e Mon Sep 17 00:00:00 2001 +From: Sean Christopherson +Date: Fri, 19 Jul 2024 16:50:58 -0700 +Subject: KVM: x86: Enforce x2APIC's must-be-zero reserved ICR bits + +From: Sean Christopherson + +commit 71bf395a276f0578d19e0ae137a7d1d816d08e0e upstream. + +Inject a #GP on a WRMSR(ICR) that attempts to set any reserved bits that +are must-be-zero on both Intel and AMD, i.e. any reserved bits other than +the BUSY bit, which Intel ignores and basically says is undefined. + +KVM's xapic_state_test selftest has been fudging the bug since commit +4b88b1a518b3 ("KVM: selftests: Enhance handling WRMSR ICR register in +x2APIC mode"), which essentially removed the testcase instead of fixing +the bug. + +WARN if the nodecode path triggers a #GP, as the CPU is supposed to check +reserved bits for ICR when it's partially virtualized. + +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20240719235107.3023592-2-seanjc@google.com +Signed-off-by: Sean Christopherson +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/kvm/lapic.c | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +--- a/arch/x86/kvm/lapic.c ++++ b/arch/x86/kvm/lapic.c +@@ -2314,7 +2314,7 @@ void kvm_apic_write_nodecode(struct kvm_ + * maybe-unecessary write, and both are in the noise anyways. + */ + if (apic_x2apic_mode(apic) && offset == APIC_ICR) +- kvm_x2apic_icr_write(apic, kvm_lapic_get_reg64(apic, APIC_ICR)); ++ WARN_ON_ONCE(kvm_x2apic_icr_write(apic, kvm_lapic_get_reg64(apic, APIC_ICR))); + else + kvm_lapic_reg_write(apic, offset, kvm_lapic_get_reg(apic, offset)); + } +@@ -2936,8 +2936,21 @@ int kvm_lapic_set_vapic_addr(struct kvm_ + return 0; + } + ++#define X2APIC_ICR_RESERVED_BITS (GENMASK_ULL(31, 20) | GENMASK_ULL(17, 16) | BIT(13)) ++ + int kvm_x2apic_icr_write(struct kvm_lapic *apic, u64 data) + { ++ if (data & X2APIC_ICR_RESERVED_BITS) ++ return 1; ++ ++ /* ++ * The BUSY bit is reserved on both Intel and AMD in x2APIC mode, but ++ * only AMD requires it to be zero, Intel essentially just ignores the ++ * bit. And if IPI virtualization (Intel) or x2AVIC (AMD) is enabled, ++ * the CPU performs the reserved bits checks, i.e. the underlying CPU ++ * behavior will "win". Arbitrarily clear the BUSY bit, as there is no ++ * sane way to provide consistent behavior with respect to hardware. ++ */ + data &= ~APIC_ICR_BUSY; + + kvm_apic_send_ipi(apic, (u32)data, (u32)(data >> 32)); diff --git a/queue-6.1/kvm-x86-move-x2apic-icr-helper-above-kvm_apic_write_nodecode.patch b/queue-6.1/kvm-x86-move-x2apic-icr-helper-above-kvm_apic_write_nodecode.patch new file mode 100644 index 00000000000..31c9b42b234 --- /dev/null +++ b/queue-6.1/kvm-x86-move-x2apic-icr-helper-above-kvm_apic_write_nodecode.patch @@ -0,0 +1,85 @@ +From d33234342f8b468e719e05649fd26549fb37ef8a Mon Sep 17 00:00:00 2001 +From: Sean Christopherson +Date: Fri, 19 Jul 2024 16:50:59 -0700 +Subject: KVM: x86: Move x2APIC ICR helper above kvm_apic_write_nodecode() + +From: Sean Christopherson + +commit d33234342f8b468e719e05649fd26549fb37ef8a upstream. + +Hoist kvm_x2apic_icr_write() above kvm_apic_write_nodecode() so that a +local helper to _read_ the x2APIC ICR can be added and used in the +nodecode path without needing a forward declaration. + +No functional change intended. + +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20240719235107.3023592-3-seanjc@google.com +Signed-off-by: Sean Christopherson +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/kvm/lapic.c | 46 +++++++++++++++++++++++----------------------- + 1 file changed, 23 insertions(+), 23 deletions(-) + +--- a/arch/x86/kvm/lapic.c ++++ b/arch/x86/kvm/lapic.c +@@ -2297,6 +2297,29 @@ void kvm_lapic_set_eoi(struct kvm_vcpu * + } + EXPORT_SYMBOL_GPL(kvm_lapic_set_eoi); + ++#define X2APIC_ICR_RESERVED_BITS (GENMASK_ULL(31, 20) | GENMASK_ULL(17, 16) | BIT(13)) ++ ++int kvm_x2apic_icr_write(struct kvm_lapic *apic, u64 data) ++{ ++ if (data & X2APIC_ICR_RESERVED_BITS) ++ return 1; ++ ++ /* ++ * The BUSY bit is reserved on both Intel and AMD in x2APIC mode, but ++ * only AMD requires it to be zero, Intel essentially just ignores the ++ * bit. And if IPI virtualization (Intel) or x2AVIC (AMD) is enabled, ++ * the CPU performs the reserved bits checks, i.e. the underlying CPU ++ * behavior will "win". Arbitrarily clear the BUSY bit, as there is no ++ * sane way to provide consistent behavior with respect to hardware. ++ */ ++ data &= ~APIC_ICR_BUSY; ++ ++ kvm_apic_send_ipi(apic, (u32)data, (u32)(data >> 32)); ++ kvm_lapic_set_reg64(apic, APIC_ICR, data); ++ trace_kvm_apic_write(APIC_ICR, data); ++ return 0; ++} ++ + /* emulate APIC access in a trap manner */ + void kvm_apic_write_nodecode(struct kvm_vcpu *vcpu, u32 offset) + { +@@ -2936,29 +2959,6 @@ int kvm_lapic_set_vapic_addr(struct kvm_ + return 0; + } + +-#define X2APIC_ICR_RESERVED_BITS (GENMASK_ULL(31, 20) | GENMASK_ULL(17, 16) | BIT(13)) +- +-int kvm_x2apic_icr_write(struct kvm_lapic *apic, u64 data) +-{ +- if (data & X2APIC_ICR_RESERVED_BITS) +- return 1; +- +- /* +- * The BUSY bit is reserved on both Intel and AMD in x2APIC mode, but +- * only AMD requires it to be zero, Intel essentially just ignores the +- * bit. And if IPI virtualization (Intel) or x2AVIC (AMD) is enabled, +- * the CPU performs the reserved bits checks, i.e. the underlying CPU +- * behavior will "win". Arbitrarily clear the BUSY bit, as there is no +- * sane way to provide consistent behavior with respect to hardware. +- */ +- data &= ~APIC_ICR_BUSY; +- +- kvm_apic_send_ipi(apic, (u32)data, (u32)(data >> 32)); +- kvm_lapic_set_reg64(apic, APIC_ICR, data); +- trace_kvm_apic_write(APIC_ICR, data); +- return 0; +-} +- + static int kvm_lapic_msr_read(struct kvm_lapic *apic, u32 reg, u64 *data) + { + u32 low; diff --git a/queue-6.1/pci-imx6-fix-missing-call-to-phy_power_off-in-error-handling.patch b/queue-6.1/pci-imx6-fix-missing-call-to-phy_power_off-in-error-handling.patch new file mode 100644 index 00000000000..f46f2703af5 --- /dev/null +++ b/queue-6.1/pci-imx6-fix-missing-call-to-phy_power_off-in-error-handling.patch @@ -0,0 +1,51 @@ +From 5b04d44d5c74e4d8aab1678496b84700b4b343fe Mon Sep 17 00:00:00 2001 +From: Frank Li +Date: Mon, 29 Jul 2024 16:18:10 -0400 +Subject: PCI: imx6: Fix missing call to phy_power_off() in error handling +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Frank Li + +commit 5b04d44d5c74e4d8aab1678496b84700b4b343fe upstream. + +Fix missing call to phy_power_off() in the error path of +imx6_pcie_host_init(). Remove unnecessary check for imx6_pcie->phy +as the PHY API already handles NULL pointers. + +Fixes: cbcf8722b523 ("phy: freescale: imx8m-pcie: Fix the wrong order of phy_init() and phy_power_on()") +Link: https://lore.kernel.org/linux-pci/20240729-pci2_upstream-v8-3-b68ee5ef2b4d@nxp.com +Signed-off-by: Frank Li +[kwilczynski: commit log] +Signed-off-by: Krzysztof Wilczyński +Reviewed-by: Manivannan Sadhasivam +Cc: # 6.1+ +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pci/controller/dwc/pci-imx6.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/drivers/pci/controller/dwc/pci-imx6.c ++++ b/drivers/pci/controller/dwc/pci-imx6.c +@@ -956,7 +956,7 @@ static int imx6_pcie_host_init(struct dw + ret = phy_power_on(imx6_pcie->phy); + if (ret) { + dev_err(dev, "waiting for PHY ready timeout!\n"); +- goto err_phy_off; ++ goto err_phy_exit; + } + } + +@@ -971,8 +971,9 @@ static int imx6_pcie_host_init(struct dw + return 0; + + err_phy_off: +- if (imx6_pcie->phy) +- phy_exit(imx6_pcie->phy); ++ phy_power_off(imx6_pcie->phy); ++err_phy_exit: ++ phy_exit(imx6_pcie->phy); + err_clk_disable: + imx6_pcie_clk_disable(imx6_pcie); + err_reg_disable: diff --git a/queue-6.1/pci-xilinx-nwl-fix-off-by-one-in-intx-irq-handler.patch b/queue-6.1/pci-xilinx-nwl-fix-off-by-one-in-intx-irq-handler.patch new file mode 100644 index 00000000000..2a1597cbec4 --- /dev/null +++ b/queue-6.1/pci-xilinx-nwl-fix-off-by-one-in-intx-irq-handler.patch @@ -0,0 +1,68 @@ +From 0199d2f2bd8cd97b310f7ed82a067247d7456029 Mon Sep 17 00:00:00 2001 +From: Sean Anderson +Date: Fri, 31 May 2024 12:13:32 -0400 +Subject: PCI: xilinx-nwl: Fix off-by-one in INTx IRQ handler + +From: Sean Anderson + +commit 0199d2f2bd8cd97b310f7ed82a067247d7456029 upstream. + +MSGF_LEG_MASK is laid out with INTA in bit 0, INTB in bit 1, INTC in bit 2, +and INTD in bit 3. Hardware IRQ numbers start at 0, and we register +PCI_NUM_INTX IRQs. So to enable INTA (aka hwirq 0) we should set bit 0. +Remove the subtraction of one. + +This bug would cause INTx interrupts not to be delivered, as enabling INTB +would actually enable INTA, and enabling INTA wouldn't enable anything at +all. It is likely that this got overlooked for so long since most PCIe +hardware uses MSIs. This fixes the following UBSAN error: + + UBSAN: shift-out-of-bounds in ../drivers/pci/controller/pcie-xilinx-nwl.c:389:11 + shift exponent 18446744073709551615 is too large for 32-bit type 'int' + CPU: 1 PID: 61 Comm: kworker/u10:1 Not tainted 6.6.20+ #268 + Hardware name: xlnx,zynqmp (DT) + Workqueue: events_unbound deferred_probe_work_func + Call trace: + dump_backtrace (arch/arm64/kernel/stacktrace.c:235) + show_stack (arch/arm64/kernel/stacktrace.c:242) + dump_stack_lvl (lib/dump_stack.c:107) + dump_stack (lib/dump_stack.c:114) + __ubsan_handle_shift_out_of_bounds (lib/ubsan.c:218 lib/ubsan.c:387) + nwl_unmask_leg_irq (drivers/pci/controller/pcie-xilinx-nwl.c:389 (discriminator 1)) + irq_enable (kernel/irq/internals.h:234 kernel/irq/chip.c:170 kernel/irq/chip.c:439 kernel/irq/chip.c:432 kernel/irq/chip.c:345) + __irq_startup (kernel/irq/internals.h:239 kernel/irq/chip.c:180 kernel/irq/chip.c:250) + irq_startup (kernel/irq/chip.c:270) + __setup_irq (kernel/irq/manage.c:1800) + request_threaded_irq (kernel/irq/manage.c:2206) + pcie_pme_probe (include/linux/interrupt.h:168 drivers/pci/pcie/pme.c:348) + +Fixes: 9a181e1093af ("PCI: xilinx-nwl: Modify IRQ chip for legacy interrupts") +Link: https://lore.kernel.org/r/20240531161337.864994-3-sean.anderson@linux.dev +Signed-off-by: Sean Anderson +Signed-off-by: Bjorn Helgaas +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pci/controller/pcie-xilinx-nwl.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/pci/controller/pcie-xilinx-nwl.c ++++ b/drivers/pci/controller/pcie-xilinx-nwl.c +@@ -374,7 +374,7 @@ static void nwl_mask_leg_irq(struct irq_ + u32 mask; + u32 val; + +- mask = 1 << (data->hwirq - 1); ++ mask = 1 << data->hwirq; + raw_spin_lock_irqsave(&pcie->leg_mask_lock, flags); + val = nwl_bridge_readl(pcie, MSGF_LEG_MASK); + nwl_bridge_writel(pcie, (val & (~mask)), MSGF_LEG_MASK); +@@ -388,7 +388,7 @@ static void nwl_unmask_leg_irq(struct ir + u32 mask; + u32 val; + +- mask = 1 << (data->hwirq - 1); ++ mask = 1 << data->hwirq; + raw_spin_lock_irqsave(&pcie->leg_mask_lock, flags); + val = nwl_bridge_readl(pcie, MSGF_LEG_MASK); + nwl_bridge_writel(pcie, (val | mask), MSGF_LEG_MASK); diff --git a/queue-6.1/revert-f2fs-use-flush-command-instead-of-fua-for-zoned-device.patch b/queue-6.1/revert-f2fs-use-flush-command-instead-of-fua-for-zoned-device.patch new file mode 100644 index 00000000000..93528b1ba67 --- /dev/null +++ b/queue-6.1/revert-f2fs-use-flush-command-instead-of-fua-for-zoned-device.patch @@ -0,0 +1,51 @@ +From b722ff8ad66cf9beba971d9eb4bb7b5e6265ae5c Mon Sep 17 00:00:00 2001 +From: Wenjie Cheng +Date: Fri, 14 Jun 2024 00:48:41 +0000 +Subject: Revert "f2fs: use flush command instead of FUA for zoned device" + +From: Wenjie Cheng + +commit b722ff8ad66cf9beba971d9eb4bb7b5e6265ae5c upstream. + +This reverts commit c550e25bca660ed2554cbb48d32b82d0bb98e4b1. + +Commit c550e25bca660ed2554cbb48d32b82d0bb98e4b1 ("f2fs: use flush +command instead of FUA for zoned device") used additional flush +command to keep write order. + +Since Commit dd291d77cc90eb6a86e9860ba8e6e38eebd57d12 ("block: +Introduce zone write plugging") has enabled the block layer to +handle this order issue, there is no need to use flush command. + +Signed-off-by: Wenjie Cheng +Reviewed-by: Chao Yu +Signed-off-by: Jaegeuk Kim +Signed-off-by: Greg Kroah-Hartman +--- + fs/f2fs/file.c | 3 +-- + fs/f2fs/node.c | 2 +- + 2 files changed, 2 insertions(+), 3 deletions(-) + +--- a/fs/f2fs/file.c ++++ b/fs/f2fs/file.c +@@ -375,8 +375,7 @@ sync_nodes: + f2fs_remove_ino_entry(sbi, ino, APPEND_INO); + clear_inode_flag(inode, FI_APPEND_WRITE); + flush_out: +- if ((!atomic && F2FS_OPTION(sbi).fsync_mode != FSYNC_MODE_NOBARRIER) || +- (atomic && !test_opt(sbi, NOBARRIER) && f2fs_sb_has_blkzoned(sbi))) ++ if (!atomic && F2FS_OPTION(sbi).fsync_mode != FSYNC_MODE_NOBARRIER) + ret = f2fs_issue_flush(sbi, inode->i_ino); + if (!ret) { + f2fs_remove_ino_entry(sbi, ino, UPDATE_INO); +--- a/fs/f2fs/node.c ++++ b/fs/f2fs/node.c +@@ -1648,7 +1648,7 @@ static int __write_node_page(struct page + goto redirty_out; + } + +- if (atomic && !test_opt(sbi, NOBARRIER) && !f2fs_sb_has_blkzoned(sbi)) ++ if (atomic && !test_opt(sbi, NOBARRIER)) + fio.op_flags |= REQ_PREFLUSH | REQ_FUA; + + /* should add to global list before clearing PAGECACHE status */ diff --git a/queue-6.1/revert-media-tuners-fix-error-return-code-of-hybrid_tuner_request_state.patch b/queue-6.1/revert-media-tuners-fix-error-return-code-of-hybrid_tuner_request_state.patch new file mode 100644 index 00000000000..f1e4450d831 --- /dev/null +++ b/queue-6.1/revert-media-tuners-fix-error-return-code-of-hybrid_tuner_request_state.patch @@ -0,0 +1,39 @@ +From e25cc4be4616fcf5689622b3226d648aab253cdb Mon Sep 17 00:00:00 2001 +From: Roman Smirnov +Date: Tue, 16 Jul 2024 12:10:40 +0300 +Subject: Revert "media: tuners: fix error return code of hybrid_tuner_request_state()" + +From: Roman Smirnov + +commit e25cc4be4616fcf5689622b3226d648aab253cdb upstream. + +This reverts commit b9302fa7ed979e84b454e4ca92192cf485a4ed41. + +As Fedor Pchelkin pointed out, this commit violates the +convention of using the macro return value, which causes errors. +For example, in functions tda18271_attach(), xc5000_attach(), +simple_tuner_attach(). + +Link: https://lore.kernel.org/linux-media/20240424202031.syigrtrtipbq5f2l@fpc/ +Suggested-by: Fedor Pchelkin +Signed-off-by: Roman Smirnov +Signed-off-by: Hans Verkuil +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/tuners/tuner-i2c.h | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/drivers/media/tuners/tuner-i2c.h ++++ b/drivers/media/tuners/tuner-i2c.h +@@ -133,10 +133,8 @@ static inline int tuner_i2c_xfer_send_re + } \ + if (0 == __ret) { \ + state = kzalloc(sizeof(type), GFP_KERNEL); \ +- if (!state) { \ +- __ret = -ENOMEM; \ ++ if (NULL == state) \ + goto __fail; \ +- } \ + state->i2c_props.addr = i2caddr; \ + state->i2c_props.adap = i2cadap; \ + state->i2c_props.name = devname; \ diff --git a/queue-6.1/series b/queue-6.1/series index ebf82144ebd..f57faa96190 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -297,3 +297,16 @@ drm-vmwgfx-prevent-unmapping-active-read-buffers.patch io_uring-sqpoll-retain-test-for-whether-the-cpu-is-valid.patch io_uring-sqpoll-do-not-put-cpumask-on-stack.patch remove-.orig-pattern-from-.gitignore.patch +pci-imx6-fix-missing-call-to-phy_power_off-in-error-handling.patch +pci-xilinx-nwl-fix-off-by-one-in-intx-irq-handler.patch +asoc-rt5682-return-devm_of_clk_add_hw_provider-to-transfer-the-error.patch +soc-versatile-integrator-fix-of-node-leak-in-probe-error-path.patch +revert-f2fs-use-flush-command-instead-of-fua-for-zoned-device.patch +revert-media-tuners-fix-error-return-code-of-hybrid_tuner_request_state.patch +input-adp5588-keys-fix-check-on-return-code.patch +input-i8042-add-tuxedo-stellaris-16-gen5-amd-to-i8042-quirk-table.patch +input-i8042-add-tuxedo-stellaris-15-slim-gen6-amd-to-i8042-quirk-table.patch +input-i8042-add-another-board-name-for-tuxedo-stellaris-gen5-amd-line.patch +kvm-x86-enforce-x2apic-s-must-be-zero-reserved-icr-bits.patch +kvm-x86-move-x2apic-icr-helper-above-kvm_apic_write_nodecode.patch +drm-amd-display-skip-recompute-dsc-params-if-no-stream-on-link.patch diff --git a/queue-6.1/soc-versatile-integrator-fix-of-node-leak-in-probe-error-path.patch b/queue-6.1/soc-versatile-integrator-fix-of-node-leak-in-probe-error-path.patch new file mode 100644 index 00000000000..2264ebe4234 --- /dev/null +++ b/queue-6.1/soc-versatile-integrator-fix-of-node-leak-in-probe-error-path.patch @@ -0,0 +1,32 @@ +From 874c5b601856adbfda10846b9770a6c66c41e229 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Sun, 25 Aug 2024 20:05:22 +0200 +Subject: soc: versatile: integrator: fix OF node leak in probe() error path + +From: Krzysztof Kozlowski + +commit 874c5b601856adbfda10846b9770a6c66c41e229 upstream. + +Driver is leaking OF node reference obtained from +of_find_matching_node(). + +Fixes: f956a785a282 ("soc: move SoC driver for the ARM Integrator") +Cc: stable@vger.kernel.org +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/20240825-soc-dev-fixes-v1-1-ff4b35abed83@linaro.org +Signed-off-by: Linus Walleij +Signed-off-by: Greg Kroah-Hartman +--- + drivers/soc/versatile/soc-integrator.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/soc/versatile/soc-integrator.c ++++ b/drivers/soc/versatile/soc-integrator.c +@@ -113,6 +113,7 @@ static int __init integrator_soc_init(vo + return -ENODEV; + + syscon_regmap = syscon_node_to_regmap(np); ++ of_node_put(np); + if (IS_ERR(syscon_regmap)) + return PTR_ERR(syscon_regmap); +