1522 Commits

Author SHA1 Message Date
Linus Torvalds
10003ff8ce Merge tag 'turbostat-v2025.12.02' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull turbostat updates from Len Brown:

 - Add LLC statistics columns:
	LLCkRPS = Last Level Cache Thousands of References Per Second
	LLC%hit = Last Level Cache Hit %

 - Recognize Wildcat Lake and Nova Lake platforms

 - Add MSR check for Android

 - Add APERF check for VMWARE

 - Add RAPL check for AWS

 - Minor fixes to turbostat (and x86_energy_perf_policy)

* tag 'turbostat-v2025.12.02' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (21 commits)
  tools/power turbostat: version 2025.12.02
  tools/power turbostat: Print wide names only for RAW 64-bit columns
  tools/power turbostat: Print percentages in 8-columns
  tools/power turbostat: Print "nan" for out of range percentages
  tools/power turbostat: Validate APERF access for VMWARE
  tools/power turbostat: Enhance perf probe
  tools/power turbostat: Validate RAPL MSRs for AWS Nitro Hypervisor
  tools/power x86_energy_perf_policy: Fix potential NULL pointer dereference
  tools/power x86_energy_perf_policy: Fix format string in error message
  tools/power x86_energy_perf_policy: Simplify Android MSR probe
  tools/power x86_energy_perf_policy: Add Android MSR device support
  tools/power turbostat: Add run-time MSR driver probe
  tools/power turbostat: Set per_cpu_msr_sum to NULL after free
  tools/power turbostat: Add LLC stats
  tools/power turbostat: Remove dead code
  tools/power turbostat: Refactor floating point printout code
  tools/power turbostat.8: Update example
  tools/power turbostat: Refactor added-counter value printing code
  tools/power turbostat: Refactor added column header printing
  tools/power turbostat: Add Wildcat Lake and Nova Lake support
  ...
2025-12-06 09:35:00 -08:00
Linus Torvalds
d348c22394 Merge tag 'pm-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki:
 "There are quite a few interesting things here, including new hardware
  support, new features, some bug fixes and documentation updates. In
  addition, there are a usual bunch of minor fixes and cleanups all
  over.

  In the new hardware support category, there are intel_pstate and
  intel_rapl driver updates to support new processors, Panther Lake,
  Wildcat Lake, Noval Lake, and Diamond Rapids in the OOB mode, OPP and
  bandwidth allocation support in the tegra186 cpufreq driver, and
  JH7110S SOC support in dt-platdev cpufreq.

  The new features are the PM QoS CPU latency limit for suspend-to-idle,
  the netlink support for the energy model management, support for
  terminating system suspend via a wakeup event during the sync of file
  systems, configurable number of hibernation compression threads, the
  runtime PM auto-cleanup macros, and the "poweroff" PM event that is
  expected to be used during system shutdown.

  Bugs are mostly fixed in cpuidle governors, but there are also fixes
  elsewhere, like in the amd-pstate cpufreq driver.

  Documentation updates include, but are not limited to, a new doc on
  debugging shutdown hangs, cross-referencing fixes and cleanups in the
  intel_pstate documentation, and updates of comments in the core
  hibernation code.

  Specifics:

   - Introduce and document a QoS limit on CPU exit latency during
     wakeup from suspend-to-idle (Ulf Hansson)

   - Add support for building libcpupower statically (Zuo An)

   - Add support for sending netlink notifications to user space on
     energy model updates (Changwoo Mini, Peng Fan)

   - Minor improvements to the Rust OPP interface (Tamir Duberstein)

   - Fixes to scope-based pointers in the OPP library (Viresh Kumar)

   - Use residency threshold in polling state override decisions in the
     menu cpuidle governor (Aboorva Devarajan)

   - Add sanity check for exit latency and target residency in the
     cpufreq core (Rafael Wysocki)

   - Use this_cpu_ptr() where possible in the teo governor (Christian
     Loehle)

   - Rework the handling of tick wakeups in the teo cpuidle governor to
     increase the likelihood of stopping the scheduler tick in the cases
     when tick wakeups can be counted as non-timer ones (Rafael Wysocki)

   - Fix a reverse condition in the teo cpuidle governor and drop a
     misguided target residency check from it (Rafael Wysocki)

   - Clean up multiple minor defects in the teo cpuidle governor (Rafael
     Wysocki)

   - Update header inclusion to make it follow the Include What You Use
     principle (Andy Shevchenko)

   - Enable MSR-based RAPL PMU support in the intel_rapl power capping
     driver and arrange for using it on the Panther Lake and Wildcat
     Lake processors (Kuppuswamy Sathyanarayanan)

   - Add support for Nova Lake and Wildcat Lake processors to the
     intel_rapl power capping driver (Kaushlendra Kumar, Srinivas
     Pandruvada)

   - Add OPP and bandwidth support for Tegra186 (Aaron Kling)

   - Optimizations for parameter array handling in the amd-pstate
     cpufreq driver (Mario Limonciello)

   - Fix for mode changes with offline CPUs in the amd-pstate cpufreq
     driver (Gautham Shenoy)

   - Preserve freq_table_sorted across suspend/hibernate in the cpufreq
     core (Zihuan Zhang)

   - Adjust energy model rules for Intel hybrid platforms in the
     intel_pstate cpufreq driver and improve printing of debug messages
     in it (Rafael Wysocki)

   - Replace deprecated strcpy() in cpufreq_unregister_governor()
     (Thorsten Blum)

   - Fix duplicate hyperlink target errors in the intel_pstate cpufreq
     driver documentation and use :ref: directive for internal linking
     in it (Swaraj Gaikwad, Bagas Sanjaya)

   - Add Diamond Rapids OOB mode support to the intel_pstate cpufreq
     driver (Kuppuswamy Sathyanarayanan)

   - Use mutex guard for driver locking in the intel_pstate driver and
     eliminate some code duplication from it (Rafael Wysocki)

   - Replace udelay() with usleep_range() in ACPI cpufreq (Kaushlendra
     Kumar)

   - Minor improvements to various cpufreq drivers (Christian Marangi,
     Hal Feng, Jie Zhan, Marco Crivellari, Miaoqian Lin, and Shuhao Fu)

   - Replace snprintf() with scnprintf() in show_trace_dev_match()
     (Kaushlendra Kumar)

   - Fix memory allocation error handling in pm_vt_switch_required()
     (Malaya Kumar Rout)

   - Introduce CALL_PM_OP() macro and use it to simplify code in generic
     PM operations (Kaushlendra Kumar)

   - Add module param to backtrace all CPUs in the device power
     management watchdog (Sergey Senozhatsky)

   - Rework message printing in swsusp_save() (Rafael Wysocki)

   - Make it possible to change the number of hibernation compression
     threads (Xueqin Luo)

   - Clarify that only cgroup1 freezer uses PM freezer (Tejun Heo)

   - Add document on debugging shutdown hangs to PM documentation and
     correct a mistaken configuration option in it (Mario Limonciello)

   - Shut down wakeup source timer before removing the wakeup source
     from the list (Kaushlendra Kumar, Rafael Wysocki)

   - Introduce new PMSG_POWEROFF event for system shutdown handling with
     the help of PM device callbacks (Mario Limonciello)

   - Make pm_test delay interruptible by wakeup events (Riwen Lu)

   - Clean up kernel-doc comment style usage in the core hibernation
     code and remove unuseful comments from it (Sunday Adelodun, Rafael
     Wysocki)

   - Add support for handling wakeup events and aborting the suspend
     process while it is syncing file systems (Samuel Wu, Rafael
     Wysocki)

   - Add WQ_UNBOUND to pm_wq workqueue (Marco Crivellari)

   - Add runtime PM wrapper macros for ACQUIRE()/ACQUIRE_ERR() and use
     them in the PCI core and the ACPI TAD driver (Rafael Wysocki)

   - Improve runtime PM in the ACPI TAD driver (Rafael Wysocki)

   - Update pm_runtime_allow/forbid() documentation (Rafael Wysocki)

   - Fix typos in runtime.c comments (Malaya Kumar Rout)

   - Move governor.h from devfreq under include/linux/ and rename to
     devfreq-governor.h to allow devfreq governor definitions in out of
     drivers/devfreq/ (Dmitry Baryshkov)

   - Use min() to improve readability in tegra30-devfreq.c (Thorsten
     Blum)

   - Fix potential use-after-free issue of OPP handling in
     hisi_uncore_freq.c (Pengjie Zhang)

   - Fix typo in DFSO_DOWNDIFFERENTIAL macro name in
     governor_simpleondemand.c in devfreq (Riwen Lu)"

* tag 'pm-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (96 commits)
  PM / devfreq: Fix typo in DFSO_DOWNDIFFERENTIAL macro name
  cpuidle: Warn instead of bailing out if target residency check fails
  cpuidle: Update header inclusion
  Documentation: power/cpuidle: Document the CPU system wakeup latency QoS
  cpuidle: Respect the CPU system wakeup QoS limit for cpuidle
  sched: idle: Respect the CPU system wakeup QoS limit for s2idle
  pmdomain: Respect the CPU system wakeup QoS limit for cpuidle
  pmdomain: Respect the CPU system wakeup QoS limit for s2idle
  PM: QoS: Introduce a CPU system wakeup QoS limit
  cpuidle: governors: teo: Add missing space to the description
  PM: hibernate: Extra cleanup of comments in swap handling code
  PM / devfreq: tegra30: use min to simplify actmon_cpu_to_emc_rate
  PM / devfreq: hisi: Fix potential UAF in OPP handling
  PM / devfreq: Move governor.h to a public header location
  powercap: intel_rapl: Enable MSR-based RAPL PMU support
  powercap: intel_rapl: Prepare read_raw() interface for atomic-context callers
  cpufreq: qcom-nvmem: fix compilation warning for qcom_cpufreq_ipq806x_match_list
  PM: sleep: Call pm_sleep_fs_sync() instead of ksys_sync_helper()
  PM: sleep: Add support for wakeup during filesystem sync
  cpufreq: ACPI: Replace udelay() with usleep_range()
  ...
2025-12-02 17:31:22 -08:00
Len Brown
9c0bad7508 tools/power turbostat: version 2025.12.02
Since release 2025.09.09:

Add LLC statistics columns:
    LLCkRPS = Last Level Cache Thousands of References Per Second
    LLC%hit = Last Level Cache Hit %
Recognize Wildcat Lake and Nova Lake platforms
Add MSR check for Android
Add APERF check for VMWARE
Add RAPL check for AWS
minor fixes

This patch:

White-space only, resulting from running Lindent
on everything except the tab-justified data-tables,
and using -l150 instead of -l80 to allow long lines.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 16:11:14 -05:00
Len Brown
1a23ba6a1b tools/power turbostat: Print wide names only for RAW 64-bit columns
Print a wide column header only for the case of a 64-bit RAW counter.

It turns out that wide column headers otherwise are more harm than good.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 16:11:14 -05:00
Len Brown
2ba8b24e9d tools/power turbostat: Print percentages in 8-columns
Added counters that are FORMAT_PERCENT
do not need to be 64-bits -- 32 is plenty.
This allows the output code to fit them,
and their header, into 8-columns.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 16:11:14 -05:00
Len Brown
8808292799 tools/power turbostat: Print "nan" for out of range percentages
Sometimes counters return junk.
For the cases where values > 100% is invalid, print "nan".

Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 16:11:14 -05:00
Len Brown
951845d51d tools/power turbostat: Validate APERF access for VMWARE
VMWARE correctly enumerates lack of APERF and MPERF in CPUID,
but turbostat didn't consult that before attempting to access them.

Since VMWARE allows access, but always returns 0, turbostat
got confusd into an infinite reset loop.

Head this off by listening to CPUID.6.APERF_MPERF
(and rename the existing variable to make this more clear)

Reported-by: David Arcari <darcari@redhat.com>
Tested-by: David Arcari <darcari@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 16:11:14 -05:00
Len Brown
68769a0b5a tools/power turbostat: Enhance perf probe
check_perf_access() will now check both IPC and LLC perf counters
if they are enabled.  If any fail, it now disables perf
and all perf counters.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 16:11:14 -05:00
Len Brown
19476a592b tools/power turbostat: Validate RAPL MSRs for AWS Nitro Hypervisor
Even though the platform->plat_rapl_msrs enumeration may be accurate,
a VM, such as AWS Nitro Hypervisor, may deny access to the underlying MSRs.

Probe if PKG_ENERGY is readable and non-zero.
If no, ignore all RAPL MSRs.

Reported-by: Emily Ehlert <ehemily@amazon.de>
Tested-by: Emily Ehlert <ehemily@amazon.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 16:11:14 -05:00
Malaya Kumar Rout
51860d6330 tools/power x86_energy_perf_policy: Fix potential NULL pointer dereference
In err_on_hypervisor(), strstr() is called to search for "flags" in the
buffer, but the return value is not checked before being used in pointer
arithmetic (flags - buffer). If strstr() returns NULL because "flags" is
not found in /proc/cpuinfo, this will cause undefined behavior and likely
a crash.

Add a NULL check after the strstr() call and handle the error appropriately
by cleaning up resources and reporting a meaningful error message.

Signed-off-by: Malaya Kumar Rout <mrout@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 16:11:09 -05:00
Malaya Kumar Rout
7446bd6119 tools/power x86_energy_perf_policy: Fix format string in error message
The error message in validate_cpu_selected_set() uses an incomplete
format specifier "cpu%" instead of "cpu%d", resulting in the error
message printing "Requested cpu% is not present" rather than
showing the actual CPU number.

Fix the format string to properly display the CPU number.

Signed-off-by: Malaya Kumar Rout <mrout@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 15:58:30 -05:00
Len Brown
90a2fe2576 tools/power x86_energy_perf_policy: Simplify Android MSR probe
no functional change

Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 15:58:30 -05:00
Kaushlendra Kumar
2ff4b59f2e tools/power x86_energy_perf_policy: Add Android MSR device support
Add support for Android MSR device paths which use /dev/msrN format
instead of the standard Linux /dev/cpu/N/msr format. The tool now
probes both path formats at startup and uses the appropriate one.

This enables x86_energy_perf_policy to work on Android systems where
MSR devices follow a different naming convention while maintaining
full compatibility with standard Linux systems.

Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 15:58:30 -05:00
Len Brown
d71cb404f0 tools/power turbostat: Add run-time MSR driver probe
Rather than starting down the conditional-compile road...

Probe the location of the MSR files at run-time.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 15:58:30 -05:00
Emily Ehlert
2313b97bc0 tools/power turbostat: Set per_cpu_msr_sum to NULL after free
Set per_cpu_msr_sum to NULL after freeing it in the error path
of msr_sum_record() to prevent potential use-after-free issues.

Signed-off-by: Emily Ehlert <ehemily@amazon.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 15:58:30 -05:00
Len Brown
28a3ad1fd2 tools/power turbostat: Add LLC stats
LLCkRPS = Last Level Cache Thousands of References Per Second
LLC%hit = Last Level Cache Hit %

These columns are enabled by-default.
They can be controlled with the --show/--hide options
by individual column names above,
or together using the "llc" or "cache" groups.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-12-02 15:58:23 -05:00
Malaya Kumar Rout
8974573ba4 ACPI: tools: pfrut: fix memory leak and resource leak in pfrut.c
Static analysis found an issue in pfrut.c

cppcheck output before this patch:
tools/power/acpi/tools/pfrut/pfrut.c:225:3: error: Resource leak: fd_update [resourceLeak]
tools/power/acpi/tools/pfrut/pfrut.c:269:3: error: Resource leak: fd_update [resourceLeak]
tools/power/acpi/tools/pfrut/pfrut.c:269:3: error: Resource leak: fd_update_log [resourceLeak]
tools/power/acpi/tools/pfrut/pfrut.c:365:4: error: Memory leak: addr_map_capsule [memleak]
tools/power/acpi/tools/pfrut/pfrut.c:424:4: error: Memory leak: log_buf [memleak]

cppcheck output after this patch:
No resource leaks found

Fix by closing file descriptors and freeing allocated memory.

Signed-off-by: Malaya Kumar Rout <mrout@redhat.com>
Link: https://patch.msgid.link/20251120170001.251968-1-mrout@redhat.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-11-24 20:50:15 +01:00
Zuo An
059835bbfa tools/power/cpupower: Support building libcpupower statically
The cpupower Makefile built and installed libcpupower as a shared
library (libcpupower.so) without passing `STATIC=true`, but did not
build a static version of the library even with `STATIC=true`. (Only the
programs were static). Thus, out-of-tree programs using libcpupower
were unable to link statically against the library without having access
to intermediate object files produced during the build.

This fixes that situation by ensuring that libcpupower.a is built and
installed when `STATIC=true` is specified.

Link: https://lore.kernel.org/r/x7geegquiks3zndiavw2arihdc2rk7e2dx3lk7yxkewqii6zpg@tzjijqxyzwmu
Signed-off-by: Zuo An <zuoan.penguin@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2025-11-05 09:56:01 -07:00
Len Brown
6dfb04332f tools/power turbostat: Remove dead code
amperf_group_fd is never used.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-10-24 10:54:16 -03:00
Len Brown
696d15cbd8 tools/power turbostat: Refactor floating point printout code
Too many copies of (usually) the same printf code...

Also, unify code for added-counter FORMAT_AVERAGE,
which was correct where it was tested, but neglected elsewhere.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-10-24 10:54:09 -03:00
Len Brown
64f96057a6 tools/power turbostat.8: Update example
Update the added-counters example to print counters in decimal
rather than hex -- now that it is working...

Signed-off-by: Len Brown <len.brown@intel.com>
2025-10-24 10:50:32 -03:00
Len Brown
885e822764 tools/power turbostat: Refactor added-counter value printing code
We build up many copies of very similar code...

Signed-off-by: Len Brown <len.brown@intel.com>
2025-10-24 10:50:25 -03:00
Len Brown
56dbb87850 tools/power turbostat: Refactor added column header printing
Over time, we built up many copies of nearly identical code...

Signed-off-by: Len Brown <len.brown@intel.com>
2025-10-24 10:44:18 -03:00
Len Brown
4e35847d7b tools/power turbostat: Add Wildcat Lake and Nova Lake support
Treat Wildcat Lake and Nova Lake (and Panther Lake)
the same as Lunar Lake, for now.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-10-24 10:41:21 -03:00
Len Brown
92664f2e6a tools/power turbostat: Regression fix Uncore MHz printed in hex
A patch to allow specifying FORMAT_AVERAGE to added counters...
broke the internally added counter for Cluster Uncore MHz -- printing it in HEX.

Fixes: dcd1c379b0 ("tools/power turbostat: add format "average" for external attributes")
Reported-by: Andrej Tkalcec <andrej.tkalcec@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2025-10-24 10:41:17 -03:00
Linus Torvalds
7f70725741 Merge tag 'kbuild-6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux
Pull Kbuild updates from Nathan Chancellor:

 - Extend modules.builtin.modinfo to include module aliases from
   MODULE_DEVICE_TABLE for builtin modules so that userspace tools (such
   as kmod) can verify that a particular module alias will be handled by
   a builtin module

 - Bump the minimum version of LLVM for building the kernel to 15.0.0

 - Upgrade several userspace API checks in headers_check.pl to errors

 - Unify and consolidate CONFIG_WERROR / W=e handling

 - Turn assembler and linker warnings into errors with CONFIG_WERROR /
   W=e

 - Respect CONFIG_WERROR / W=e when building userspace programs
   (userprogs)

 - Enable -Werror unconditionally when building host programs
   (hostprogs)

 - Support copy_file_range() and data segment alignment in gen_init_cpio
   to improve performance on filesystems that support reflinks such as
   btrfs and XFS

 - Miscellaneous small changes to scripts and configuration files

* tag 'kbuild-6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux: (47 commits)
  modpost: Initialize builtin_modname to stop SIGSEGVs
  Documentation: kbuild: note CONFIG_DEBUG_EFI in reproducible builds
  kbuild: vmlinux.unstripped should always depend on .vmlinux.export.o
  modpost: Create modalias for builtin modules
  modpost: Add modname to mod_device_table alias
  scsi: Always define blogic_pci_tbl structure
  kbuild: extract modules.builtin.modinfo from vmlinux.unstripped
  kbuild: keep .modinfo section in vmlinux.unstripped
  kbuild: always create intermediate vmlinux.unstripped
  s390: vmlinux.lds.S: Reorder sections
  KMSAN: Remove tautological checks
  objtool: Drop noinstr hack for KCSAN_WEAK_MEMORY
  lib/Kconfig.debug: Drop CLANG_VERSION check from DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
  riscv: Remove ld.lld version checks from many TOOLCHAIN_HAS configs
  riscv: Unconditionally use linker relaxation
  riscv: Remove version check for LTO_CLANG selects
  powerpc: Drop unnecessary initializations in __copy_inst_from_kernel_nofault()
  mips: Unconditionally select ARCH_HAS_CURRENT_STACK_POINTER
  arm64: Remove tautological LLVM Kconfig conditions
  ARM: Clean up definition of ARM_HAS_GROUP_RELOCS
  ...
2025-10-01 20:58:51 -07:00
Linus Torvalds
679a16399a Merge tag 'acpi-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI updates from Rafael Wysocki:
 "These include an ACPICA update (upstream revision 20250807 with a few
  fixes on top), fixes and cleanups of the ACPI processor driver, fixes
  and cleanups of the ACPI properties management code, one more ACPI IRQ
  resource management quirk, one more ACPI backlight quirk, an ACPI
  device enumeration quirk related to _DEP, a power resource quirk
  related to WWAN modem for HP EliteBook 855 G7, ACPI SPCR table parser
  extensions, an ACPI APEI EINJ driver update allowing it to handle more
  address types, and several assorted cleanups of ACPI drivers and PNP
  code.

  Specifics:

   - Add SoundWire File Table (SWFT) signature to ACPICA (Maciej
     Strozek)

   - Rearrange local variable definition involving #ifdef in ACPICA to
     avoid using uninitialized variables (Zhe Qiao)

   - Allow ACPICA to skip Global Lock initialization (Huacai Chen)

   - Apply ACPI_NONSTRING in more places in ACPICA and fix two
     regressions related to incorrect ACPI_NONSTRING usage (Ahmed Salem)

   - Fix printing CDAT table header when dissasebling CDAT AML (Ahmed
     Salem)

   - Use acpi_ds_clear_operands() in acpi_ds_call_control_method() in
     ACPICA (Hans de Goede)

   - Update dsmethod.c in ACPICA to address unused variable warning
     (Saket Dumbre)

   - Print error messages in ACPICA for too few or too many control
     method arguments (Saket Dumbre)

   - Update ACPICA version to 20250807 (Saket Dumbre)

   - Fix largest possible resource descriptor index in ACPICA (Dmitry
     Antipov)

   - Add Back-Invalidate restriction to CXL Window for CEDT in ACPICA
     (Davidlohr Bueso)

   - Add the package type to acceptable Arg3 types for _DSM in ACPICA
     because ACPI_TYPE_ANY does not cover it (Saket Dumbre)

   - Fix return values in ap_is_valid_checksum() in the acpidump utility
     in ACPICA (Kaushlendra Kumar)

   - Add Intel CVS ACPI HIDs to acpi_ignore_dep_ids[] so it is not
     regarded as real dependency (Hans de Goede)

   - Use ACPI_FREE() for freeing an ACPI object in description_show() in
     the ACPI sysfs-related code (Kaushlendra Kumar)

   - Fix memory leak in the ACPI processor idle driver registration
     error code path and optimize ACPI idle driver registration (Huisong
     Li, Rafael Wysocki)

   - Add module import namespace to the ACPI processor idle driver
     (Rafael Wysocki)

   - Eliminate static variable flat_state_cnt from the ACPI processor
     idle driver (Rafael Wysocki)

   - Release cpufreq policy references using __free() in the ACPI
     processor thremal driver (Zihuan Zhang)

   - Remove unused empty stubs of some functions and rearrange function
     declarations in a header file in the ACPI processor driver (Huisong
     Li)

   - Redefine two functions as void in the ACPI processor driver (Rafael
     Wysocki)

   - Stop exposing global variable acpi_idle_driver in the ACPI
     processor driver (Huisong Li)

   - Fix ACPI buffer properties extraction for data-only subnodes
     represented as _DSD-equivalent packages (Rafael Wysocki)

   - Fix handling of ACPI data-only subnodes represented as
     _DSD-equivalent packages in the case when they are embedded in
     larger _DSD-equivalent packages and clean up
     acpi_nondev_subnode_extract() (Rafael Wysocki)

   - Skip ACPI IRQ override on ASUS Vivobook Pro N6506CU (Sam van
     Kampen)

   - Add power resource init function and use it for introducing an HP
     EliteBook 855 G7 WWAN modem power resource quirk (Maciej Szmigiero)

   - Add support for DBG2 RISC-V SBI port subtype and Precise Baud Rate
     field to the ACPI SPCR table parser (Chen Pei)

   - Eliminate a dummy local variable from the ACPI thermal driver
     (Rafael Wysocki)

   - Fold two simple functions into their only caller in the ACPI fan
     driver (Rafael Wysocki)

   - Force native backlight on Lenovo 82K8 in the ACPI backlight (video)
     driver (Mario Limonciello)

   - Add missing sysfs_remove_group() for ACPI_TAD_RT (Daniel Tang)

   - Skip PRM handlers with NULL handler_address or NULL VA in the ACPI
     PRM driver (Shang song)

   - Remove redundant assignments in erst_dbg_{ioctl|write}() in the
     ACPI APEI driver (Thorsten Blum)

   - Allow the ACPI APEI EINJ to handle more types of addresses than
     just MMIO (Jiaqi Yan)

   - Use str_low_high() helper in two places in the ACPI code (Chelsy
     Ratnawat)

   - Use str_plural() to simplify the PNP code (Xichao Zhao)

   - Fix signedness issues in read/write helpers in the ACPI AML
     debugger interface (Amir Mohammad)"

* tag 'acpi-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (50 commits)
  ACPI: debug: fix signedness issues in read/write helpers
  ACPI: processor: Do not expose global variable acpi_idle_driver
  ACPI: SPCR: Support Precise Baud Rate field
  ACPI: processor: idle: Redefine two functions as void
  ACPI: processor: Update cpuidle driver check in __acpi_processor_start()
  ACPI: processor: idle: Rearrange declarations in header file
  ACPI: processor: Remove unused empty stubs of some functions
  ACPI: property: Adjust failure handling in acpi_nondev_subnode_extract()
  ACPI: property: Do not pass NULL handles to acpi_attach_data()
  ACPI: property: Add code comments explaining what is going on
  ACPI: property: Disregard references in data-only subnode lists
  ACPI: property: Fix buffer properties extraction for subnodes
  ACPI: SPCR: Add support for DBG2 RISC-V SBI port subtype
  ACPI: APEI: EINJ: Allow more types of addresses except MMIO
  ACPI: APEI: Remove redundant assignments in erst_dbg_{ioctl|write}()
  ACPICA: acpidump: fix return values in ap_is_valid_checksum()
  ACPICA: ACPI_TYPE_ANY does not include the package type
  ACPICA: CEDT: Add Back-Invalidate restriction to CXL Window
  ACPICA: Fix largest possible resource descriptor index
  ACPICA: Update version to 20250807
  ...
2025-10-01 16:24:50 -07:00
Linus Torvalds
991053178e Merge tag 'pm-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management updates from Rafael Wysocki:
 "The majority of these are cpufreq changes, which has been a recurring
  pattern for a few recent cycles.

  Those changes include new hardware support (AN7583 SoC support in the
  airoha cpufreq driver, ipq5424 support in the qcom-nvmem cpufreq
  driver, MT8196 support in the mediatek cpufreq driver, AM62D2 support
  in the ti cpufreq driver), DT bindings and Rust code updates, cleanups
  of the core and governors, and multiple driver fixes and cleanups.

  Beyond that, there are hibernation fixes (some remaining 6.16 cycle
  fallout and an issue related to hybrid suspend in the amdgpu driver),
  cleanups of the PM core code, runtime PM documentation update, cpuidle
  and power capping cleanups, and tooling updates.

  Specifics:

   - Rearrange variable declarations involving __free() in the cpufreq
     core and intel_pstate driver to follow common coding style (Rafael
     Wysocki)

   - Fix object lifecycle issue in update_qos_request(), rearrange freq
     QoS updates using __free(), and adjust frequency percentage
     computations in the intel_pstate driver (Rafael Wysocki)

   - Update intel_pstate to allow it to enable HWP without EPP if the
     new DEC (Dynamic Efficiency Control) HW feature is enabled (Rafael
     Wysocki)

   - Use on_each_cpu_mask() in drv_write() in the ACPI cpufreq driver to
     simplify the code (Rafael Wysocki)

   - Use likely() optimization in intel_pstate_sample() (Yaxiong Tian)

   - Remove dead EPB-related code from intel_pstate (Srinivas
     Pandruvada)

   - Use scope-based cleanup for cpufreq policy references in multiple
     cpufreq drivers (Zihuan Zhang)

   - Avoid calling get_governor() for the first policy in the cpufreq
     core to simplify the initial policy path (Zihuan Zhang)

   - Clean up the cpufreq core in multiple places (Zihuan Zhang)

   - Use int type to store negative error codes in the cpufreq core and
     update the speedstep-lib to use int for error codes (Qianfeng Rong)

   - Update the efficient idle check for Intel extended Families in the
     ondemand cpufreq governor (Sohil Mehta)

   - Replace sscanf() with kstrtouint() in the conservative cpufreq
     governor (Kaushlendra Kumar)

   - Rename CpumaskVar::as[_mut]_ref to from_raw[_mut] in the cpumask
     Rust code and mark CpumaskVar as transparent (Alice Ryhl, Baptiste
     Lepers)

   - Update ARef and AlwaysRefCounted imports from sync::aref in the OPP
     Rust code (Shankari Anand)

   - Add support for AN7583 SoC to the airoha cpufreq driver (Christian
     Marangi)

   - Enable cpufreq for ipq5424 in the qcom-nvmem cpufreq driver (Md
     Sadre Alam)

   - Add support for MT8196 to the mediatek-hw cpufreq driver, refactor
     that driver and add mediatek,mt8196-cpufreq-hw DT binding (Nicolas
     Frattaroli)

   - Avoid redundant conditions in the mediatek cpufreq driver (Liao
     Yuanhong)

   - Add support for AM62D2 to the ti cpufreq driver and blocklist
     ti,am62d2 SoC in dt-platdev (Paresh Bhagat)

   - Support more speed grades on AM62Px SoC in the ti cpufreq driver,
     allow all silicon revisions to support OPPs in it, and fix
     supported hardware for 1GHz OPP (Judith Mendez)

   - Add QCS615 compatible to DT bindings for cpufreq-qcom-hw (Taniya
     Das)

   - Minor assorted updates of the scmi, longhaul, CPPC, and armada-37xx
     cpufreq drivers (Akhilesh Patil, BowenYu, Dennis Beier, and Florian
     Fainelli)

   - Remove outdated cpufreq-dt.txt (Frank Li)

   - Fix python gnuplot package names in the amd_pstate_tracer utility
     (Kuan-Wei Chiu)

   - Saravana Kannan will maintain the virtual-cpufreq driver (Saravana
     Kannan)

   - Prevent CPU capacity updates after registering a perf domain from
     failing on a first CPU that is not present (Christian Loehle)

   - Add support for the cases in which frequency alone is not
     sufficient to uniquely identify an OPP (Krishna Chaitanya Chundru)

   - Use to_result() for OPP error handling in Rust (Onur Özkan)

   - Add support for LPDDR5 on Rockhip RK3588 SoC to rockchip-dfi
     devfreq driver (Nicolas Frattaroli)

   - Fix an issue where DDR cycle counts on RK3588/RK3528 with LPDDR4(X)
     are reported as half by adding a cycle multiplier to the DFI driver
     in rockchip-dfi devfreq-event driver (Nicolas Frattaroli)

   - Fix missing error pointer dereference check of regulator instance
     in the mtk-cci devfreq driver probe and remove a redundant
     condition from an if () statement in that driver (Dan Carpenter,
     Liao Yuanhong)

   - Fail cpuidle device registration if there is one already to avoid
     sysfs-related issues (Rafael Wysocki)

   - Use sysfs_emit()/sysfs_emit_at() instead of sprintf()/scnprintf()
     in cpuidle (Vivek Yadav)

   - Fix device and OF node leaks at probe in the qcom-spm cpuidle
     driver and drop unnecessary initialisations from it (Johan Hovold)

   - Remove unnecessary address-of operators from the intel_idle cpuidle
     driver (Kaushlendra Kumar)

   - Rearrange main loop in menu_select() to make the code in that
     funtion easier to follow (Rafael Wysocki)

   - Convert values in microseconds to ktime using us_to_ktime() where
     applicable in the intel_idle power capping driver (Xichao Zhao)

   - Annotate loops walking device links in the power management core
     code as _srcu and add macros for walking device links to reduce the
     likelihood of coding mistakes related to them (Rafael Wysocki)

   - Document time units for *_time functions in the runtime PM API
     (Brian Norris)

   - Clear power.must_resume in noirq suspend error path to avoid
     resuming a dependant device under a suspended parent or supplier
     (Rafael Wysocki)

   - Fix GFP mask handling during hybrid suspend and make the amdgpu
     driver handle hybrid suspend correctly (Mario Limonciello, Rafael
     Wysocki)

   - Fix GFP mask handling after aborted hibernation in platform mode
     and combine exit paths in power_down() to avoid code duplication
     (Rafael Wysocki)

   - Use vmalloc_array() and vcalloc() in the hibernation core to avoid
     open-coded size computations (Qianfeng Rong)

   - Fix typo in hibernation core code comment (Li Jun)

   - Call pm_wakeup_clear() in the same place where other functions that
     do bookkeeping prior to suspend_prepare() are called (Samuel Wu)

   - Fix and clean up the x86_energy_perf_policy utility and update its
     documentation (Len Brown, Kaushlendra Kumar)

   - Fix incorrect sorting of PMT telemetry in turbostat (Kaushlendra
     Kumar)

   - Fix incorrect size in cpuidle_state_disable() and the error return
     value of cpupower_write_sysfs() in cpupower (Kaushlendra Kumar)"

* tag 'pm-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (86 commits)
  PM: hibernate: Combine return paths in power_down()
  PM: hibernate: Restrict GFP mask in power_down()
  PM: hibernate: Fix pm_hibernation_mode_is_suspend() build breakage
  PM: runtime: Documentation: ABI: Document time units for *_time
  tools/power x86_energy_perf_policy.8: Emphasize preference for SW interfaces
  tools/power x86_energy_perf_policy: Add make snapshot target
  tools/power x86_energy_perf_policy: Prefer driver HWP limits
  tools/power x86_energy_perf_policy: EPB access is only via sysfs
  tools/power x86_energy_perf_policy: Prepare for MSR/sysfs refactoring
  tools/power x86_energy_perf_policy: Enhance HWP enable
  tools/power x86_energy_perf_policy: Enhance HWP enabled check
  tools/power x86_energy_perf_policy: Fix incorrect fopen mode usage
  tools/power turbostat: Fix incorrect sorting of PMT telemetry
  drm/amd: Fix hybrid sleep
  PM: hibernate: Add pm_hibernation_mode_is_suspend()
  PM: hibernate: Fix hybrid-sleep
  tools/cpupower: Fix incorrect size in cpuidle_state_disable()
  tools/power/x86/amd_pstate_tracer: Fix python gnuplot package names
  cpufreq: Replace pointer subtraction with iteration macro
  cpuidle: Fail cpuidle device registration if there is one already
  ...
2025-10-01 16:08:37 -07:00
Rafael J. Wysocki
40d2cf9c3c Merge branch 'pm-tools'
Merge power management utilities updates for 6.18-rc1:

 - Fix and clean up the x86_energy_perf_policy utility and update its
   documentation (Len Brown, Kaushlendra Kumar)

 - Fix incorrect sorting of PMT telemetry in turbostat (Kaushlendra
   Kumar)

 - Fix incorrect size in cpuidle_state_disable() and the error return
   value of cpupower_write_sysfs() in cpupower (Kaushlendra Kumar)

* pm-tools:
  tools/power x86_energy_perf_policy.8: Emphasize preference for SW interfaces
  tools/power x86_energy_perf_policy: Add make snapshot target
  tools/power x86_energy_perf_policy: Prefer driver HWP limits
  tools/power x86_energy_perf_policy: EPB access is only via sysfs
  tools/power x86_energy_perf_policy: Prepare for MSR/sysfs refactoring
  tools/power x86_energy_perf_policy: Enhance HWP enable
  tools/power x86_energy_perf_policy: Enhance HWP enabled check
  tools/power x86_energy_perf_policy: Fix incorrect fopen mode usage
  tools/power turbostat: Fix incorrect sorting of PMT telemetry
  tools/cpupower: Fix incorrect size in cpuidle_state_disable()
  tools/cpupower: fix error return value in cpupower_write_sysfs()
2025-09-29 13:10:10 +02:00
Rafael J. Wysocki
17eb881291 Merge tag 'linux-cpupower-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux
Merge cpupower utility updates for 6.18-rc1 from Shuah Khan:

"Fixes incorrect return vale in cpupower_write_sysfs() error path
 and passing incorrect size to cpuidle_state_write_file() while
 writing status to disable file in cpuidle_state_disable()."

* tag 'linux-cpupower-6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: (1125 commits)
  tools/cpupower: Fix incorrect size in cpuidle_state_disable()
  tools/cpupower: fix error return value in cpupower_write_sysfs()
  Linux 6.17-rc6
  MAINTAINERS: Input: Drop melfas-mip4 section
  USB: core: remove the move buf action
  MAINTAINERS: Update the DMA Rust entry
  erofs: fix long xattr name prefix placement
  Revert "net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups"
  hsr: hold rcu and dev lock for hsr_get_port_ndev
  hsr: use hsr_for_each_port_rtnl in hsr_port_get_hsr
  hsr: use rtnl lock when iterating over ports
  wifi: nl80211: completely disable per-link stats for now
  net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups
  net: ethtool: fix wrong type used in struct kernel_ethtool_ts_info
  selftests/bpf: Skip timer cases when bpf_timer is not supported
  bpf: Reject bpf_timer for PREEMPT_RT
  libceph: fix invalid accesses to ceph_connection_v1_info
  PM: hibernate: Restrict GFP mask in hibernation_snapshot()
  MAINTAINERS: add Phil as netfilter reviewer
  netfilter: nf_tables: restart set lookup on base_seq change
  ...
2025-09-29 10:10:05 +02:00
Rafael J. Wysocki
57610d69f9 Merge tag 'power-utilities-for-v6.18-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Merge turbostat and x86_energy_perf_policy bug fixes for v6.18 merge
window from Len Brown.

* tag 'power-utilities-for-v6.18-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  tools/power x86_energy_perf_policy.8: Emphasize preference for SW interfaces
  tools/power x86_energy_perf_policy: Add make snapshot target
  tools/power x86_energy_perf_policy: Prefer driver HWP limits
  tools/power x86_energy_perf_policy: EPB access is only via sysfs
  tools/power x86_energy_perf_policy: Prepare for MSR/sysfs refactoring
  tools/power x86_energy_perf_policy: Enhance HWP enable
  tools/power x86_energy_perf_policy: Enhance HWP enabled check
  tools/power x86_energy_perf_policy: Fix incorrect fopen mode usage
  tools/power turbostat: Fix incorrect sorting of PMT telemetry
2025-09-26 15:02:37 +02:00
Len Brown
66f4305224 tools/power x86_energy_perf_policy.8: Emphasize preference for SW interfaces
This tool was originally written when Linux had no standard
interface for EPB, or HWP support.

Retain the capability to manage a system w/o any kernel PM support,
but prefer the standard kernel interfaces, when avaialble.

(not doing so led to a confusing conflict between a p-state limit
 request made via cpufreq and modified by the intel-pstate driver,
 versus the raw MSR write made by this utility)

Signed-off-by: Len Brown <len.brown@intel.com>
2025-09-25 23:12:01 -04:00
Len Brown
a648e0892c tools/power x86_energy_perf_policy: Add make snapshot target
$ make snapshot
creates x86_energy_perf_policy-$(DATE).tar.gz

Which can be transported to a target machine
without needing a kernel tree to build on the target.

Useful for creating debug versions.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-09-25 23:12:01 -04:00
Len Brown
2734fdbc9b tools/power x86_energy_perf_policy: Prefer driver HWP limits
When we are successful in using cpufreq min/max limits,
skip setting the raw MSR limits entirely.

This is necessary to avoid undoing any modification that
the cpufreq driver makes to our sysfs request.

eg. intel_pstate may take our request for a limit
that is valid according to HWP.CAP.MIN/MAX and clip
it to be within the range available in PLATFORM_INFO.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-09-25 23:12:01 -04:00
Len Brown
f8241f5426 tools/power x86_energy_perf_policy: EPB access is only via sysfs
Comprehend that EPB writes are now only via sysfs
by moving it out of the _msr specific path.

No functional change.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-09-25 23:12:01 -04:00
Len Brown
8ef8fa829f tools/power x86_energy_perf_policy: Prepare for MSR/sysfs refactoring
Rename routines to make "_msr" and "_sysfs" access  methods clear

No functional change

Signed-off-by: Len Brown <len.brown@intel.com>
2025-09-25 23:12:01 -04:00
Len Brown
c97c057d35 tools/power x86_energy_perf_policy: Enhance HWP enable
On enabling HWP, preserve the reserved bits in MSR_PM_ENABLE.

Also, skip writing the MSR_PM_ENABLE if HWP is already enabled.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-09-25 23:12:01 -04:00
Len Brown
b6b42a6051 tools/power x86_energy_perf_policy: Enhance HWP enabled check
Verify that all CPUs have HWP enabled, not just cpu0.

Signed-off-by: Len Brown <len.brown@intel.com>
2025-09-25 23:12:01 -04:00
Kaushlendra Kumar
62127655b7 tools/power x86_energy_perf_policy: Fix incorrect fopen mode usage
The fopen_or_die() function was previously hardcoded
to open files in read-only mode ("r"), ignoring the
mode parameter passed to it. This patch corrects
fopen_or_die() to use the provided mode argument,
allowing for flexible file access as intended.

Additionally, the call to fopen_or_die() in
err_on_hypervisor() incorrectly used the mode
"ro", which is not a valid fopen mode. This is
fixed to use the correct "r" mode.

Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2025-09-25 23:12:00 -04:00
Kaushlendra Kumar
cafb47be3f tools/power turbostat: Fix incorrect sorting of PMT telemetry
The pmt_telemdir_sort() comparison function was returning a boolean
value (0 or 1) instead of the required negative, zero, or positive
value for proper sorting. This caused unpredictable and incorrect
ordering of telemetry directories named telem0, telem1, ..., telemN.
Update the comparison logic to return -1, 0, or 1 based on the
numerical value extracted from the directory name, ensuring correct
numerical ordering when using scandir.

This change improves stability and correctness when iterating PMT
telemetry directories.

Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2025-09-25 23:12:00 -04:00
Kaushlendra Kumar
23199d2aa6 tools/cpupower: Fix incorrect size in cpuidle_state_disable()
Fix incorrect size parameter passed to cpuidle_state_write_file() in
cpuidle_state_disable().

The function was incorrectly using sizeof(disable) which returns the
size of the unsigned int variable (4 bytes) instead of the actual
length of the string stored in the 'value' buffer.

Since 'value' is populated with snprintf() to contain the string
representation of the disable value, we should use the length
returned by snprintf() to get the correct string length for
writing to the sysfs file.

This ensures the correct number of bytes is written to the cpuidle
state disable file in sysfs.

Link: https://lore.kernel.org/r/20250917050820.1785377-1-kaushlendra.kumar@intel.com
Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2025-09-24 17:15:35 -06:00
Kuan-Wei Chiu
e3f761be5a tools/power/x86/amd_pstate_tracer: Fix python gnuplot package names
The prerequisites section listed non-existent packages
"phython-gnuplot" and "phython3-gnuplot", which may mislead users and
cause installation failures.

Update the names to the correct distribution package names
"python-gnuplot" and "python3-gnuplot", helping users avoid confusion
and saving time for those following the instructions.

Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
2025-09-23 13:42:20 -05:00
Nathan Chancellor
95ee3364b2 Merge 6.17-rc6 into kbuild-next
Commit bd7c231212 ("pinctrl: meson: Fix typo in device table macro")
is needed in kbuild-next to avoid a build error with a future change.

While at it, address the conflict between commit 41f9049cff ("riscv:
Only allow LTO with CMODEL_MEDANY") and commit 6578a1ff6a ("riscv:
Remove version check for LTO_CLANG selects"), as reported by Stephen
Rothwell [1].

Link: https://lore.kernel.org/20250908134913.68778b7b@canb.auug.org.au/ [1]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
2025-09-19 13:43:11 -07:00
Tony Luck
70d1d98934 x86/cpu: Rename and move CPU model entry for Diamond Rapids
This model was added as INTEL_PANTHERCOVE_X (based on the name of the
core) with a comment that the platform name is Diamond Rapids. It was
also placed at the end of the file in a new section for family 19
processors.

This is different from previous naming as Andrew Cooper noted.
PeterZ agreed and posted a patch[1] to fix the name and move it in
sequence with other Xeon servers. But without a commit description or
sign-off the patch wasn't ever applied.

Patch updated to cover one additional use of the #define by turbostat
and to change the "Family 6" comment to also list 18 and 19 since new
models in these families are mixed in with family 6.

Originally-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
Link: https://lore.kernel.org/all/20250214130205.GK14028@noisy.programming.kicks-ass.net/ # [1]
2025-09-17 11:22:11 +02:00
Kaushlendra Kumar
57b100d4cf tools/cpupower: fix error return value in cpupower_write_sysfs()
The cpupower_write_sysfs() function currently returns -1 on
write failure, but the function signature indicates it should
return an unsigned int. Returning -1 from an unsigned function
results in a large positive value rather than indicating
an error condition.

Fix this by returning 0 on failure, which is more appropriate
for an unsigned return type and maintains consistency with typical
success/failure semantics where 0 indicates failure and non-zero
indicates success (bytes written).

Link: https://lore.kernel.org/r/20250828063000.803229-1-kaushlendra.kumar@intel.com
Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2025-09-16 16:21:50 -06:00
Kaushlendra Kumar
54ba9071a0 ACPICA: acpidump: fix return values in ap_is_valid_checksum()
The function ap_is_valid_checksum() has a boolean name suggesting it
should return TRUE/FALSE, but incorrectly returns AE_OK on success and
has no explicit return on failure, leading to undefined behavior.

Fix by returning proper values:
 - FALSE when checksum validation fails
 - TRUE when checksum validation succeeds

Link: https://github.com/acpica/acpica/commit/479ba862
Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 12:20:13 +02:00
Ahmed Salem
16ae95800b ACPICA: acpidump: drop ACPI_NONSTRING attribute from file_name
Partially revert commit 70662db73d ("ACPICA: Apply ACPI_NONSTRING in
more places") as I've yet again incorrectly applied the ACPI_NONSTRING
attribute where it is not needed.

A warning was initially reported by Collin Funk [1], and further review
by Jiri Slaby [2] highlighted another issue related to the same commit.

Drop the ACPI_NONSTRING attribute to fix the issue.

Fixes: 70662db73d ("ACPICA: Apply ACPI_NONSTRING in more places")
Link: https://lore.kernel.org/all/87ecvpcypw.fsf@gmail.com [1]
Link: https://lore.kernel.org/all/5c210121-c9b8-4458-b1ad-0da24732ac72@kernel.org [2]
Link: https://github.com/acpica/acpica/commit/a6ee09ca
Reported-by: Collin Funk <collin.funk1@gmail.com>
Signed-off-by: Ahmed Salem <x0rw3ll@gmail.com>
Cc: 6.16+ <stable@vger.kernel.org> # 6.16+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 12:20:12 +02:00
Ahmed Salem
12fd607554 ACPICA: Apply ACPI_NONSTRING
Add ACPI_NONSTRING for destination char arrays without a terminating NUL
character.

This is a follow-up to commit 2b82118845 ("ACPICA: Apply ACPI_NONSTRING")
where a few more destination arrays were missed.

Link: https://github.com/acpica/acpica/commit/f359e5ed
Fixes: 2b82118845 ("ACPICA: Apply ACPI_NONSTRING")
Signed-off-by: Ahmed Salem <x0rw3ll@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2025-09-15 12:20:12 +02:00
Shinji Nomoto
357d1fc38a cpupower: Allow control of boost feature on non-x86 based systems with boost support.
The cpufreq subsystem has a generic sysfs interface for controlling boost
(/sys/devices/system/cpu/cpufreq/boost).
The sysfs interface can be used to enable boost control from the cpupower
command on non-x86 platforms as well. So, allow boost controlling
on non-x86 system if boost sysfs file exists.

The set subcommand enables/disables the boost feature using the following
syntax:
    cpupower set --boost 1
    cpupower set --boost 0

The --boost option is an alias for --turbo-boost. We provided the neutral
option name because the name "turbo boost" is specific to Intel technology.

The frequency-info subcommand displays the enabled/disabled state of
the boost feature as follows:
    boost state support:
        Active: yes (or no)

Link: https://lore.kernel.org/r/20250522061122.2149188-3-fj5851bi@fujitsu.com
Signed-off-by: Shinji Nomoto <fj5851bi@fujitsu.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2025-08-15 10:49:14 -06:00
Shinji Nomoto
b3eaf14f4c cpupower: Fix a bug where the -t option of the set subcommand was not working.
The set subcommand's -t option is documented as being available for boost
configuration, but it was not actually functioning due to a bug
in the option handling.

Link: https://lore.kernel.org/r/20250522061122.2149188-2-fj5851bi@fujitsu.com
Signed-off-by: Shinji Nomoto <fj5851bi@fujitsu.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2025-08-15 10:49:13 -06:00