From d01b4c54a1273c4ccaa7be0275f45e1daa754263 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 8 Apr 2025 11:20:30 +0200 Subject: [PATCH] 6.12-stable patches added patches: acpi-nfit-fix-narrowing-conversion-in-acpi_nfit_ctl.patch acpi-resource-skip-irq-override-on-asus-vivobook-14-x1404vap.patch arm-9444-1-add-keep-keyword-to-arm_vectors.patch media-omap3isp-handle-arm-dma_iommu_mapping.patch wifi-mt76-mt7925-remove-unused-acpi-function-for-clc.patch x86-kconfig-add-cmpxchg8b-support-back-to-geode-cpus.patch x86-mm-fix-flush_tlb_range-when-used-for-zapping-normal-pmds.patch x86-tsc-always-save-restore-tsc-sched_clock-on-suspend-resume.patch --- ...arrowing-conversion-in-acpi_nfit_ctl.patch | 50 +++++++++++++ ...verride-on-asus-vivobook-14-x1404vap.patch | 57 +++++++++++++++ ...44-1-add-keep-keyword-to-arm_vectors.patch | 48 ++++++++++++ ...map3isp-handle-arm-dma_iommu_mapping.patch | 41 +++++++++++ queue-6.12/series | 8 ++ ...-remove-unused-acpi-function-for-clc.patch | 33 +++++++++ ...cmpxchg8b-support-back-to-geode-cpus.patch | 34 +++++++++ ...ge-when-used-for-zapping-normal-pmds.patch | 55 ++++++++++++++ ...re-tsc-sched_clock-on-suspend-resume.patch | 73 +++++++++++++++++++ 9 files changed, 399 insertions(+) create mode 100644 queue-6.12/acpi-nfit-fix-narrowing-conversion-in-acpi_nfit_ctl.patch create mode 100644 queue-6.12/acpi-resource-skip-irq-override-on-asus-vivobook-14-x1404vap.patch create mode 100644 queue-6.12/arm-9444-1-add-keep-keyword-to-arm_vectors.patch create mode 100644 queue-6.12/media-omap3isp-handle-arm-dma_iommu_mapping.patch create mode 100644 queue-6.12/wifi-mt76-mt7925-remove-unused-acpi-function-for-clc.patch create mode 100644 queue-6.12/x86-kconfig-add-cmpxchg8b-support-back-to-geode-cpus.patch create mode 100644 queue-6.12/x86-mm-fix-flush_tlb_range-when-used-for-zapping-normal-pmds.patch create mode 100644 queue-6.12/x86-tsc-always-save-restore-tsc-sched_clock-on-suspend-resume.patch diff --git a/queue-6.12/acpi-nfit-fix-narrowing-conversion-in-acpi_nfit_ctl.patch b/queue-6.12/acpi-nfit-fix-narrowing-conversion-in-acpi_nfit_ctl.patch new file mode 100644 index 0000000000..e701855b48 --- /dev/null +++ b/queue-6.12/acpi-nfit-fix-narrowing-conversion-in-acpi_nfit_ctl.patch @@ -0,0 +1,50 @@ +From 2ff0e408db36c21ed3fa5e3c1e0e687c82cf132f Mon Sep 17 00:00:00 2001 +From: Murad Masimov +Date: Thu, 23 Jan 2025 19:39:45 +0300 +Subject: acpi: nfit: fix narrowing conversion in acpi_nfit_ctl + +From: Murad Masimov + +commit 2ff0e408db36c21ed3fa5e3c1e0e687c82cf132f upstream. + +Syzkaller has reported a warning in to_nfit_bus_uuid(): "only secondary +bus families can be translated". This warning is emited if the argument +is equal to NVDIMM_BUS_FAMILY_NFIT == 0. Function acpi_nfit_ctl() first +verifies that a user-provided value call_pkg->nd_family of type u64 is +not equal to 0. Then the value is converted to int, and only after that +is compared to NVDIMM_BUS_FAMILY_MAX. This can lead to passing an invalid +argument to acpi_nfit_ctl(), if call_pkg->nd_family is non-zero, while +the lower 32 bits are zero. + +Furthermore, it is best to return EINVAL immediately upon seeing the +invalid user input. The WARNING is insufficient to prevent further +undefined behavior based on other invalid user input. + +All checks of the input value should be applied to the original variable +call_pkg->nd_family. + +[iweiny: update commit message] + +Fixes: 6450ddbd5d8e ("ACPI: NFIT: Define runtime firmware activation commands") +Cc: stable@vger.kernel.org +Reported-by: syzbot+c80d8dc0d9fa81a3cd8c@syzkaller.appspotmail.com +Closes: https://syzkaller.appspot.com/bug?extid=c80d8dc0d9fa81a3cd8c +Signed-off-by: Murad Masimov +Link: https://patch.msgid.link/20250123163945.251-1-m.masimov@mt-integration.ru +Signed-off-by: Ira Weiny +Signed-off-by: Greg Kroah-Hartman +--- + drivers/acpi/nfit/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/acpi/nfit/core.c ++++ b/drivers/acpi/nfit/core.c +@@ -485,7 +485,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_desc + cmd_mask = nd_desc->cmd_mask; + if (cmd == ND_CMD_CALL && call_pkg->nd_family) { + family = call_pkg->nd_family; +- if (family > NVDIMM_BUS_FAMILY_MAX || ++ if (call_pkg->nd_family > NVDIMM_BUS_FAMILY_MAX || + !test_bit(family, &nd_desc->bus_family_mask)) + return -EINVAL; + family = array_index_nospec(family, diff --git a/queue-6.12/acpi-resource-skip-irq-override-on-asus-vivobook-14-x1404vap.patch b/queue-6.12/acpi-resource-skip-irq-override-on-asus-vivobook-14-x1404vap.patch new file mode 100644 index 0000000000..c1dbdc76bb --- /dev/null +++ b/queue-6.12/acpi-resource-skip-irq-override-on-asus-vivobook-14-x1404vap.patch @@ -0,0 +1,57 @@ +From 2da31ea2a085cd189857f2db0f7b78d0162db87a Mon Sep 17 00:00:00 2001 +From: Paul Menzel +Date: Tue, 18 Mar 2025 17:09:02 +0100 +Subject: ACPI: resource: Skip IRQ override on ASUS Vivobook 14 X1404VAP +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Paul Menzel + +commit 2da31ea2a085cd189857f2db0f7b78d0162db87a upstream. + +Like the ASUS Vivobook X1504VAP and Vivobook X1704VAP, the ASUS Vivobook 14 +X1404VAP has its keyboard IRQ (1) described as ActiveLow in the DSDT, which +the kernel overrides to EdgeHigh breaking the keyboard. + + $ sudo dmidecode + […] + System Information + Manufacturer: ASUSTeK COMPUTER INC. + Product Name: ASUS Vivobook 14 X1404VAP_X1404VA + […] + $ grep -A 30 PS2K dsdt.dsl | grep IRQ -A 1 + IRQ (Level, ActiveLow, Exclusive, ) + {1} + +Add the X1404VAP to the irq1_level_low_skip_override[] quirk table to fix +this. + +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219224 +Cc: All applicable +Signed-off-by: Paul Menzel +Reviewed-by: Hans de Goede +Tested-by: Anton Shyndin +Link: https://patch.msgid.link/20250318160903.77107-1-pmenzel@molgen.mpg.de +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman +--- + drivers/acpi/resource.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/acpi/resource.c ++++ b/drivers/acpi/resource.c +@@ -441,6 +441,13 @@ static const struct dmi_system_id irq1_l + }, + }, + { ++ /* Asus Vivobook X1404VAP */ ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), ++ DMI_MATCH(DMI_BOARD_NAME, "X1404VAP"), ++ }, ++ }, ++ { + /* Asus Vivobook X1504VAP */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), diff --git a/queue-6.12/arm-9444-1-add-keep-keyword-to-arm_vectors.patch b/queue-6.12/arm-9444-1-add-keep-keyword-to-arm_vectors.patch new file mode 100644 index 0000000000..c085b79fe0 --- /dev/null +++ b/queue-6.12/arm-9444-1-add-keep-keyword-to-arm_vectors.patch @@ -0,0 +1,48 @@ +From c3d944a367c0d9e4e125c7006e52f352e75776dc Mon Sep 17 00:00:00 2001 +From: Christian Eggers +Date: Thu, 20 Mar 2025 22:33:51 +0100 +Subject: ARM: 9444/1: add KEEP() keyword to ARM_VECTORS + +From: Christian Eggers + +commit c3d944a367c0d9e4e125c7006e52f352e75776dc upstream. + +Without this, the vectors are removed if LD_DEAD_CODE_DATA_ELIMINATION +is enabled. At startup, the CPU (silently) hangs in the undefined +instruction exception as soon as the first timer interrupt arrives. + +On my setup, the system also boots fine without the 2nd and 3rd KEEP() +statements, so I cannot tell whether these are actually required. + +[nathan: Use OVERLAY_KEEP() to avoid breaking old ld.lld versions] + +Cc: stable@vger.kernel.org +Fixes: ed0f94102251 ("ARM: 9404/1: arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION") +Signed-off-by: Christian Eggers +Reviewed-by: Linus Walleij +Signed-off-by: Nathan Chancellor +Signed-off-by: Russell King (Oracle) +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/include/asm/vmlinux.lds.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/arm/include/asm/vmlinux.lds.h ++++ b/arch/arm/include/asm/vmlinux.lds.h +@@ -125,13 +125,13 @@ + __vectors_lma = .; \ + OVERLAY 0xffff0000 : NOCROSSREFS AT(__vectors_lma) { \ + .vectors { \ +- *(.vectors) \ ++ OVERLAY_KEEP(*(.vectors)) \ + } \ + .vectors.bhb.loop8 { \ +- *(.vectors.bhb.loop8) \ ++ OVERLAY_KEEP(*(.vectors.bhb.loop8)) \ + } \ + .vectors.bhb.bpiall { \ +- *(.vectors.bhb.bpiall) \ ++ OVERLAY_KEEP(*(.vectors.bhb.bpiall)) \ + } \ + } \ + ARM_LMA(__vectors, .vectors); \ diff --git a/queue-6.12/media-omap3isp-handle-arm-dma_iommu_mapping.patch b/queue-6.12/media-omap3isp-handle-arm-dma_iommu_mapping.patch new file mode 100644 index 0000000000..70dc477a1a --- /dev/null +++ b/queue-6.12/media-omap3isp-handle-arm-dma_iommu_mapping.patch @@ -0,0 +1,41 @@ +From 6bc076eec6f85f778f33a8242b438e1bd9fcdd59 Mon Sep 17 00:00:00 2001 +From: Robin Murphy +Date: Mon, 28 Oct 2024 17:58:36 +0000 +Subject: media: omap3isp: Handle ARM dma_iommu_mapping + +From: Robin Murphy + +commit 6bc076eec6f85f778f33a8242b438e1bd9fcdd59 upstream. + +It's no longer practical for the OMAP IOMMU driver to trick +arm_setup_iommu_dma_ops() into ignoring its presence, so let's use the +same tactic as other IOMMU API users on 32-bit ARM and explicitly kick +the arch code's dma_iommu_mapping out of the way to avoid problems. + +Fixes: 4720287c7bf7 ("iommu: Remove struct iommu_ops *iommu from arch_setup_dma_ops()") +Cc: stable@vger.kernel.org +Signed-off-by: Robin Murphy +Tested-by: Sicelo A. Mhlongo +Signed-off-by: Sakari Ailus +Signed-off-by: Hans Verkuil +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/platform/ti/omap3isp/isp.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/media/platform/ti/omap3isp/isp.c ++++ b/drivers/media/platform/ti/omap3isp/isp.c +@@ -1961,6 +1961,13 @@ static int isp_attach_iommu(struct isp_d + struct dma_iommu_mapping *mapping; + int ret; + ++ /* We always want to replace any default mapping from the arch code */ ++ mapping = to_dma_iommu_mapping(isp->dev); ++ if (mapping) { ++ arm_iommu_detach_device(isp->dev); ++ arm_iommu_release_mapping(mapping); ++ } ++ + /* + * Create the ARM mapping, used by the ARM DMA mapping core to allocate + * VAs. This will allocate a corresponding IOMMU domain. diff --git a/queue-6.12/series b/queue-6.12/series index 335d5a77bd..9fcc4ac97f 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -378,3 +378,11 @@ perf-x86-intel-apply-static-call-for-drain_pebs.patch perf-x86-intel-avoid-disable-pmu-if-cpuc-enabled-in-sample-read.patch uprobes-x86-harden-uretprobe-syscall-trampoline-check.patch idpf-don-t-hard-code-napi_struct-size.patch +x86-kconfig-add-cmpxchg8b-support-back-to-geode-cpus.patch +x86-tsc-always-save-restore-tsc-sched_clock-on-suspend-resume.patch +x86-mm-fix-flush_tlb_range-when-used-for-zapping-normal-pmds.patch +wifi-mt76-mt7925-remove-unused-acpi-function-for-clc.patch +acpi-nfit-fix-narrowing-conversion-in-acpi_nfit_ctl.patch +acpi-resource-skip-irq-override-on-asus-vivobook-14-x1404vap.patch +arm-9444-1-add-keep-keyword-to-arm_vectors.patch +media-omap3isp-handle-arm-dma_iommu_mapping.patch diff --git a/queue-6.12/wifi-mt76-mt7925-remove-unused-acpi-function-for-clc.patch b/queue-6.12/wifi-mt76-mt7925-remove-unused-acpi-function-for-clc.patch new file mode 100644 index 0000000000..283b6e81c8 --- /dev/null +++ b/queue-6.12/wifi-mt76-mt7925-remove-unused-acpi-function-for-clc.patch @@ -0,0 +1,33 @@ +From b4ea6fdfc08375aae59c7e7059653b9877171fe4 Mon Sep 17 00:00:00 2001 +From: Ming Yen Hsieh +Date: Tue, 4 Mar 2025 19:36:47 +0800 +Subject: wifi: mt76: mt7925: remove unused acpi function for clc + +From: Ming Yen Hsieh + +commit b4ea6fdfc08375aae59c7e7059653b9877171fe4 upstream. + +The code for handling ACPI configuration in CLC was copied from the mt7921 +driver but is not utilized in the mt7925 implementation. So removes the +unused functionality to clean up the codebase. + +Cc: stable@vger.kernel.org +Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") +Signed-off-by: Ming Yen Hsieh +Link: https://patch.msgid.link/20250304113649.867387-4-mingyen.hsieh@mediatek.com +Signed-off-by: Felix Fietkau +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c ++++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +@@ -3117,7 +3117,6 @@ __mt7925_mcu_set_clc(struct mt792x_dev * + + .idx = idx, + .env = env_cap, +- .acpi_conf = mt792x_acpi_get_flags(&dev->phy), + }; + int ret, valid_cnt = 0; + u8 i, *pos; diff --git a/queue-6.12/x86-kconfig-add-cmpxchg8b-support-back-to-geode-cpus.patch b/queue-6.12/x86-kconfig-add-cmpxchg8b-support-back-to-geode-cpus.patch new file mode 100644 index 0000000000..23122710c6 --- /dev/null +++ b/queue-6.12/x86-kconfig-add-cmpxchg8b-support-back-to-geode-cpus.patch @@ -0,0 +1,34 @@ +From 6ac43f2be982ea54b75206dccd33f4cf81bfdc39 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Wed, 26 Feb 2025 22:37:05 +0100 +Subject: x86/Kconfig: Add cmpxchg8b support back to Geode CPUs + +From: Arnd Bergmann + +commit 6ac43f2be982ea54b75206dccd33f4cf81bfdc39 upstream. + +An older cleanup of mine inadvertently removed geode-gx1 and geode-lx +from the list of CPUs that are known to support a working cmpxchg8b. + +Fixes: 88a2b4edda3d ("x86/Kconfig: Rework CONFIG_X86_PAE dependency") +Signed-off-by: Arnd Bergmann +Signed-off-by: Ingo Molnar +Cc: Linus Torvalds +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20250226213714.4040853-2-arnd@kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/Kconfig.cpu | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/Kconfig.cpu ++++ b/arch/x86/Kconfig.cpu +@@ -368,7 +368,7 @@ config X86_HAVE_PAE + + config X86_CMPXCHG64 + def_bool y +- depends on X86_HAVE_PAE || M586TSC || M586MMX || MK6 || MK7 ++ depends on X86_HAVE_PAE || M586TSC || M586MMX || MK6 || MK7 || MGEODEGX1 || MGEODE_LX + + # this should be set for all -march=.. options where the compiler + # generates cmov. diff --git a/queue-6.12/x86-mm-fix-flush_tlb_range-when-used-for-zapping-normal-pmds.patch b/queue-6.12/x86-mm-fix-flush_tlb_range-when-used-for-zapping-normal-pmds.patch new file mode 100644 index 0000000000..743b1b3be6 --- /dev/null +++ b/queue-6.12/x86-mm-fix-flush_tlb_range-when-used-for-zapping-normal-pmds.patch @@ -0,0 +1,55 @@ +From 3ef938c3503563bfc2ac15083557f880d29c2e64 Mon Sep 17 00:00:00 2001 +From: Jann Horn +Date: Fri, 3 Jan 2025 19:39:38 +0100 +Subject: x86/mm: Fix flush_tlb_range() when used for zapping normal PMDs + +From: Jann Horn + +commit 3ef938c3503563bfc2ac15083557f880d29c2e64 upstream. + +On the following path, flush_tlb_range() can be used for zapping normal +PMD entries (PMD entries that point to page tables) together with the PTE +entries in the pointed-to page table: + + collapse_pte_mapped_thp + pmdp_collapse_flush + flush_tlb_range + +The arm64 version of flush_tlb_range() has a comment describing that it can +be used for page table removal, and does not use any last-level +invalidation optimizations. Fix the X86 version by making it behave the +same way. + +Currently, X86 only uses this information for the following two purposes, +which I think means the issue doesn't have much impact: + + - In native_flush_tlb_multi() for checking if lazy TLB CPUs need to be + IPI'd to avoid issues with speculative page table walks. + - In Hyper-V TLB paravirtualization, again for lazy TLB stuff. + +The patch "x86/mm: only invalidate final translations with INVLPGB" which +is currently under review (see +) +would probably be making the impact of this a lot worse. + +Fixes: 016c4d92cd16 ("x86/mm/tlb: Add freed_tables argument to flush_tlb_mm_range") +Signed-off-by: Jann Horn +Signed-off-by: Peter Zijlstra (Intel) +Cc: stable@vger.kernel.org +Link: https://lkml.kernel.org/r/20250103-x86-collapse-flush-fix-v1-1-3c521856cfa6@google.com +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/include/asm/tlbflush.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/include/asm/tlbflush.h ++++ b/arch/x86/include/asm/tlbflush.h +@@ -242,7 +242,7 @@ void flush_tlb_multi(const struct cpumas + flush_tlb_mm_range((vma)->vm_mm, start, end, \ + ((vma)->vm_flags & VM_HUGETLB) \ + ? huge_page_shift(hstate_vma(vma)) \ +- : PAGE_SHIFT, false) ++ : PAGE_SHIFT, true) + + extern void flush_tlb_all(void); + extern void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start, diff --git a/queue-6.12/x86-tsc-always-save-restore-tsc-sched_clock-on-suspend-resume.patch b/queue-6.12/x86-tsc-always-save-restore-tsc-sched_clock-on-suspend-resume.patch new file mode 100644 index 0000000000..fad64b3295 --- /dev/null +++ b/queue-6.12/x86-tsc-always-save-restore-tsc-sched_clock-on-suspend-resume.patch @@ -0,0 +1,73 @@ +From d90c9de9de2f1712df56de6e4f7d6982d358cabe Mon Sep 17 00:00:00 2001 +From: "Guilherme G. Piccoli" +Date: Sat, 15 Feb 2025 17:58:16 -0300 +Subject: x86/tsc: Always save/restore TSC sched_clock() on suspend/resume + +From: Guilherme G. Piccoli + +commit d90c9de9de2f1712df56de6e4f7d6982d358cabe upstream. + +TSC could be reset in deep ACPI sleep states, even with invariant TSC. + +That's the reason we have sched_clock() save/restore functions, to deal +with this situation. But what happens is that such functions are guarded +with a check for the stability of sched_clock - if not considered stable, +the save/restore routines aren't executed. + +On top of that, we have a clear comment in native_sched_clock() saying +that *even* with TSC unstable, we continue using TSC for sched_clock due +to its speed. + +In other words, if we have a situation of TSC getting detected as unstable, +it marks the sched_clock as unstable as well, so subsequent S3 sleep cycles +could bring bogus sched_clock values due to the lack of the save/restore +mechanism, causing warnings like this: + + [22.954918] ------------[ cut here ]------------ + [22.954923] Delta way too big! 18446743750843854390 ts=18446744072977390405 before=322133536015 after=322133536015 write stamp=18446744072977390405 + [22.954923] If you just came from a suspend/resume, + [22.954923] please switch to the trace global clock: + [22.954923] echo global > /sys/kernel/tracing/trace_clock + [22.954923] or add trace_clock=global to the kernel command line + [22.954937] WARNING: CPU: 2 PID: 5728 at kernel/trace/ring_buffer.c:2890 rb_add_timestamp+0x193/0x1c0 + +Notice that the above was reproduced even with "trace_clock=global". + +The fix for that is to _always_ save/restore the sched_clock on suspend +cycle _if TSC is used_ as sched_clock - only if we fallback to jiffies +the sched_clock_stable() check becomes relevant to save/restore the +sched_clock. + +Debugged-by: Thadeu Lima de Souza Cascardo +Signed-off-by: Guilherme G. Piccoli +Signed-off-by: Ingo Molnar +Cc: stable@vger.kernel.org +Cc: Thomas Gleixner +Cc: Peter Zijlstra +Cc: Linus Torvalds +Link: https://lore.kernel.org/r/20250215210314.351480-1-gpiccoli@igalia.com +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/kernel/tsc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/x86/kernel/tsc.c ++++ b/arch/x86/kernel/tsc.c +@@ -956,7 +956,7 @@ static unsigned long long cyc2ns_suspend + + void tsc_save_sched_clock_state(void) + { +- if (!sched_clock_stable()) ++ if (!static_branch_likely(&__use_tsc) && !sched_clock_stable()) + return; + + cyc2ns_suspend = sched_clock(); +@@ -976,7 +976,7 @@ void tsc_restore_sched_clock_state(void) + unsigned long flags; + int cpu; + +- if (!sched_clock_stable()) ++ if (!static_branch_likely(&__use_tsc) && !sched_clock_stable()) + return; + + local_irq_save(flags); -- 2.47.3