From: Greg Kroah-Hartman Date: Thu, 27 Oct 2022 10:33:39 +0000 (+0200) Subject: 5.15-stable patches X-Git-Tag: v5.10.151~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce81382f88683d1f55a8a47bc006346e96ecec92;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: acpi-video-force-backlight-native-for-more-tongfang-devices.patch makefile.debug-re-enable-debug-info-for-.s-files.patch x86-kconfig-drop-check-for-mabi-ms-for-config_efi_stub.patch --- diff --git a/queue-5.15/acpi-video-force-backlight-native-for-more-tongfang-devices.patch b/queue-5.15/acpi-video-force-backlight-native-for-more-tongfang-devices.patch new file mode 100644 index 00000000000..73192f806aa --- /dev/null +++ b/queue-5.15/acpi-video-force-backlight-native-for-more-tongfang-devices.patch @@ -0,0 +1,118 @@ +From wse@tuxedocomputers.com Thu Oct 27 12:25:48 2022 +From: Werner Sembach +Date: Wed, 26 Oct 2022 17:22:46 +0200 +Subject: [PATCH v3] ACPI: video: Force backlight native for more TongFang devices +To: stable@vger.kernel.org +Cc: hdegoede@redhat.com, daniel@ffwll.ch, airlied@redhat.com, lenb@kernel.org, rafael.j.wysocki@intel.com +Message-ID: <20221026152246.24990-1-wse@tuxedocomputers.com> + +From: Werner Sembach + +commit 3dbc80a3e4c55c4a5b89ef207bed7b7de36157b4 upstream. + +This commit is very different from the upstream commit! It fixes the same +issue by adding more quirks, rather then the general fix from the 6.1 +kernel, because the general fix from the 6.1 kernel is part of a larger +refactoring of the backlight code which is not suitable for the stable +series. + +As described in "ACPI: video: Drop NL5x?U, PF4NU1F and PF5?U?? +acpi_backlight=native quirks" (10212754a0d2) the upstream commit "ACPI: +video: Make backlight class device registration a separate step (v2)" +(3dbc80a3e4c5) makes these quirks unnecessary. However as mentioned in this +bugtracker ticket https://bugzilla.kernel.org/show_bug.cgi?id=215683#c17 +the upstream fix is part of a larger patchset that is overall too complex +for stable. + +The TongFang GKxNRxx, GMxNGxx, GMxZGxx, and GMxRGxx / TUXEDO +Stellaris/Polaris Gen 1-4, have the same problem as the Clevo NL5xRU and +NL5xNU / TUXEDO Aura 15 Gen1 and Gen2: +They have a working native and video interface for screen backlight. +However the default detection mechanism first registers the video interface +before unregistering it again and switching to the native interface during +boot. This results in a dangling SBIOS request for backlight change for +some reason, causing the backlight to switch to ~2% once per boot on the +first power cord connect or disconnect event. Setting the native interface +explicitly circumvents this buggy behaviour by avoiding the unregistering +process. + +Reviewed-by: Hans de Goede +Signed-off-by: Werner Sembach +Signed-off-by: Greg Kroah-Hartman +--- + drivers/acpi/video_detect.c | 64 ++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 64 insertions(+) + +--- a/drivers/acpi/video_detect.c ++++ b/drivers/acpi/video_detect.c +@@ -501,6 +501,70 @@ static const struct dmi_system_id video_ + }, + }, + /* ++ * More Tongfang devices with the same issue as the Clevo NL5xRU and ++ * NL5xNU/TUXEDO Aura 15 Gen1 and Gen2. See the description above. ++ */ ++ { ++ .callback = video_detect_force_native, ++ .ident = "TongFang GKxNRxx", ++ .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "GKxNRxx"), ++ }, ++ }, ++ { ++ .callback = video_detect_force_native, ++ .ident = "TongFang GKxNRxx", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), ++ DMI_MATCH(DMI_BOARD_NAME, "POLARIS1501A1650TI"), ++ }, ++ }, ++ { ++ .callback = video_detect_force_native, ++ .ident = "TongFang GKxNRxx", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), ++ DMI_MATCH(DMI_BOARD_NAME, "POLARIS1501A2060"), ++ }, ++ }, ++ { ++ .callback = video_detect_force_native, ++ .ident = "TongFang GKxNRxx", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), ++ DMI_MATCH(DMI_BOARD_NAME, "POLARIS1701A1650TI"), ++ }, ++ }, ++ { ++ .callback = video_detect_force_native, ++ .ident = "TongFang GKxNRxx", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), ++ DMI_MATCH(DMI_BOARD_NAME, "POLARIS1701A2060"), ++ }, ++ }, ++ { ++ .callback = video_detect_force_native, ++ .ident = "TongFang GMxNGxx", ++ .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "GMxNGxx"), ++ }, ++ }, ++ { ++ .callback = video_detect_force_native, ++ .ident = "TongFang GMxZGxx", ++ .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "GMxZGxx"), ++ }, ++ }, ++ { ++ .callback = video_detect_force_native, ++ .ident = "TongFang GMxRGxx", ++ .matches = { ++ DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"), ++ }, ++ }, ++ /* + * Desktops which falsely report a backlight and which our heuristics + * for this do not catch. + */ diff --git a/queue-5.15/makefile.debug-re-enable-debug-info-for-.s-files.patch b/queue-5.15/makefile.debug-re-enable-debug-info-for-.s-files.patch new file mode 100644 index 00000000000..60fcad176f2 --- /dev/null +++ b/queue-5.15/makefile.debug-re-enable-debug-info-for-.s-files.patch @@ -0,0 +1,41 @@ +From foo@baz Thu Oct 27 12:31:19 PM CEST 2022 +From: Nick Desaulniers +Date: Mon, 24 Oct 2022 13:34:14 -0700 +Subject: Makefile.debug: re-enable debug info for .S files + +From: Nick Desaulniers + +This is _not_ an upstream commit and just for 5.15.y only. It is based +on commit 32ef9e5054ec0321b9336058c58ec749e9c6b0fe upstream. + +Alexey reported that the fraction of unknown filename instances in +kallsyms grew from ~0.3% to ~10% recently; Bill and Greg tracked it down +to assembler defined symbols, which regressed as a result of: + +commit b8a9092330da ("Kbuild: do not emit debug info for assembly with LLVM_IAS=1") + +In that commit, I allude to restoring debug info for assembler defined +symbols in a follow up patch, but it seems I forgot to do so in + +commit a66049e2cf0e ("Kbuild: make DWARF version a choice") + +Fixes: b8a9092330da ("Kbuild: do not emit debug info for assembly with LLVM_IAS=1") +Signed-off-by: Nick Desaulniers +Signed-off-by: Greg Kroah-Hartman +--- + Makefile | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/Makefile ++++ b/Makefile +@@ -870,7 +870,9 @@ else + DEBUG_CFLAGS += -g + endif + +-ifndef CONFIG_AS_IS_LLVM ++ifdef CONFIG_AS_IS_LLVM ++KBUILD_AFLAGS += -g ++else + KBUILD_AFLAGS += -Wa,-gdwarf-2 + endif + diff --git a/queue-5.15/series b/queue-5.15/series index df93a151379..85fb0cff8f4 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -73,3 +73,6 @@ tracing-simplify-conditional-compilation-code-in-tra.patch tracing-do-not-free-snapshot-if-tracer-is-on-cmdline.patch mmc-sdhci-tegra-use-actual-clock-rate-for-sw-tuning-.patch perf-skip-and-warn-on-unknown-format-confign-attrs.patch +acpi-video-force-backlight-native-for-more-tongfang-devices.patch +x86-kconfig-drop-check-for-mabi-ms-for-config_efi_stub.patch +makefile.debug-re-enable-debug-info-for-.s-files.patch diff --git a/queue-5.15/x86-kconfig-drop-check-for-mabi-ms-for-config_efi_stub.patch b/queue-5.15/x86-kconfig-drop-check-for-mabi-ms-for-config_efi_stub.patch new file mode 100644 index 00000000000..1857acbd442 --- /dev/null +++ b/queue-5.15/x86-kconfig-drop-check-for-mabi-ms-for-config_efi_stub.patch @@ -0,0 +1,55 @@ +From 33806e7cb8d50379f55c3e8f335e91e1b359dc7b Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Thu, 29 Sep 2022 08:20:10 -0700 +Subject: x86/Kconfig: Drop check for -mabi=ms for CONFIG_EFI_STUB + +From: Nathan Chancellor + +commit 33806e7cb8d50379f55c3e8f335e91e1b359dc7b upstream. + +A recent change in LLVM made CONFIG_EFI_STUB unselectable because it no +longer pretends to support -mabi=ms, breaking the dependency in +Kconfig. Lack of CONFIG_EFI_STUB can prevent kernels from booting via +EFI in certain circumstances. + +This check was added by + + 8f24f8c2fc82 ("efi/libstub: Annotate firmware routines as __efiapi") + +to ensure that __attribute__((ms_abi)) was available, as -mabi=ms is +not actually used in any cflags. + +According to the GCC documentation, this attribute has been supported +since GCC 4.4.7. The kernel currently requires GCC 5.1 so this check is +not necessary; even when that change landed in 5.6, the kernel required +GCC 4.9 so it was unnecessary then as well. + +Clang supports __attribute__((ms_abi)) for all versions that are +supported for building the kernel so no additional check is needed. +Remove the 'depends on' line altogether to allow CONFIG_EFI_STUB to be +selected when CONFIG_EFI is enabled, regardless of compiler. + +Fixes: 8f24f8c2fc82 ("efi/libstub: Annotate firmware routines as __efiapi") +Signed-off-by: Nathan Chancellor +Signed-off-by: Borislav Petkov +Reviewed-by: Nick Desaulniers +Acked-by: Ard Biesheuvel +Cc: stable@vger.kernel.org +Link: https://github.com/llvm/llvm-project/commit/d1ad006a8f64bdc17f618deffa9e7c91d82c444d +[nathan: Fix conflict due to lack of c6dbd3e5e69c in older trees] +Signed-off-by: Nathan Chancellor +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/Kconfig | 1 - + 1 file changed, 1 deletion(-) + +--- a/arch/x86/Kconfig ++++ b/arch/x86/Kconfig +@@ -1926,7 +1926,6 @@ config EFI + config EFI_STUB + bool "EFI stub support" + depends on EFI && !X86_USE_3DNOW +- depends on $(cc-option,-mabi=ms) || X86_32 + select RELOCATABLE + help + This kernel feature allows a bzImage to be loaded directly