aboutsummaryrefslogtreecommitdiff
path: root/tools/power
AgeCommit message (Collapse)AuthorFilesLines
2023-02-21Merge tag 'platform-drivers-x86-v6.3-1' of ↵Gravatar Linus Torvalds 6-12/+115
git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Hans de Goede: - AMD PMC: Improvements to aid s2idle debugging - Dell WMI-DDV: hwmon support - INT3472 camera sensor power-management: Improve privacy LED support - Intel VSEC: Base TPMI (Topology Aware Register and PM Capsule Interface) support - Mellanox: SN5600 and Nvidia L1 switch support - Microsoft Surface Support: Various cleanups + code improvements - tools/intel-speed-select: Various improvements - Miscellaneous other cleanups / fixes * tag 'platform-drivers-x86-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (80 commits) platform/x86: nvidia-wmi-ec-backlight: Add force module parameter platform/x86/amd/pmf: Add depends on CONFIG_POWER_SUPPLY platform/x86: dell-ddv: Prefer asynchronous probing platform/x86: dell-ddv: Add hwmon support Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces platform: mellanox: mlx-platform: Move bus shift assignment out of the loop platform: mellanox: mlx-platform: Add mux selection register to regmap platform_data/mlxreg: Add field with mapped resource address platform/mellanox: mlxreg-hotplug: Allow more flexible hotplug events configuration platform: mellanox: Extend all systems with I2C notification callback platform: mellanox: Split logic in init and exit flow platform: mellanox: Split initialization procedure platform: mellanox: Introduce support of new Nvidia L1 switch platform: mellanox: Introduce support for next-generation 800GB/s switch platform: mellanox: Cosmetic changes - rename to more common name platform: mellanox: Change "reset_pwr_converter_fail" attribute platform: mellanox: Introduce support for rack manager switch MAINTAINERS: dell-wmi-sysman: drop Divya Bharathi x86/platform/uv: Make kobj_type structure constant platform/x86: think-lmi: Make kobj_type structure constant ...
2023-02-03tools/power/x86/intel-speed-select: v1.14 releaseGravatar Srinivas Pandruvada 1-1/+1
This release adds following change: - Minor fixes for coverity static analysis - Don't read cpufreq on offline CPUs - SST turbo-freq enable on auto mode when user disables SMT from kernel command line - Fix uncore frequency display - Set uncore frequency max/min limits on perf level change Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-02-03tools/power/x86/intel-speed-select: Adjust uncore max/min frequencyGravatar Srinivas Pandruvada 1-0/+36
When perf level is changed, uncore limits can change. Set the uncore limits via Linux uncore sysfs, when user changes perf level with -o option. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-02-03tools/power/x86/intel-speed-select: Add Emerald Rapid quirkGravatar Zhang Rui 1-1/+1
Need memory frequency quirk as Sapphire Rapids in Emerald Rapids. So add Emerald Rapids CPU model check in is_spr_platform(). Signed-off-by: Zhang Rui <rui.zhang@intel.com> [srinivas.pandruvada@linux.intel.com: Subject, changelog and code edits] Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-02-03tools/power/x86/intel-speed-select: Fix display of uncore min frequencyGravatar Srinivas Pandruvada 3-2/+36
Uncore P1 is not uncore minmum frequency. This is uncore base frequency. Correct display from uncore-frequency-min(MHz) to uncore-frequency-base(Mhz). To get uncore min frequency use mailbox command CONFIG_TDP_GET_RATIO_INFO. Use this mailbox to get uncore frequency limits when present. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-02-03tools/power/x86/intel-speed-select: turbo-freq auto mode with SMT offGravatar Srinivas Pandruvada 1-0/+3
When SMT is disabled from kernel command line, sibling CPUs still appears in the sysfs as offline CPUs. This is a problem when turbo-freq is enabled in auto mode. They are still assigned to CLOS value of 3 as they are still in the present CPU list. But they are not in the sibling list of a CPU. When the CPU is a high priority CPU, because of sibling it will be still set to CLOS to 3 as CLOS is assigned at core level not at CPU level. So, avoid setting CLOS 3 to offline CPU. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-02-03tools/power/x86/intel-speed-select: cpufreq reads on offline CPUsGravatar Srinivas Pandruvada 1-0/+33
Due to some recent kernel changes, reading cpufreq attributes like scaling_max_freq on offline CPUs returns error. So avoid reading cpufreq attributes on offline CPUs. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-02-03tools/power/x86/intel-speed-select: Use null-terminated stringGravatar Zhang Rui 1-0/+2
strlen() and strtok() takes null-termimated strings as input. Make sure these strings are null-terminated before using them. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-02-03tools/power/x86/intel-speed-select: Remove duplicate dup()Gravatar Zhang Rui 1-3/+0
Remove the duplicate dup() invocation. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-02-03tools/power/x86/intel-speed-select: Handle open() failure caseGravatar Zhang Rui 1-0/+2
Add handling for open() failure case to make sure a valid file descriptor is passed to dup(). Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-02-03tools/power/x86/intel-speed-select: Remove unused non_block flagGravatar Zhang Rui 1-4/+0
variable 'non_block' is always 0, thus remove the variable and the handling for "non_block != 0" case. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-02-03tools/power/x86/intel-speed-select: Remove wrong check in set_isst_id()Gravatar Zhang Rui 1-2/+2
struct isst_id *id is a pointer, comparing it with less than zero is wrong. The check is there to make sure the id->pkg and id->die is set to -1, when it is illegal or unavailable. Here comparing with MAX_PACKAGE_COUNT and MAX_DIE_PER_PACKAGE is sufficient. Hence remove the wrong check. Signed-off-by: Zhang Rui <rui.zhang@intel.com> [srinivas.pandruvada@linux.intel.com: Subject and changelog edits] Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-02-02PM: tools: use canonical ftrace pathGravatar Ross Zwisler 3-9/+9
The canonical location for the tracefs filesystem is at /sys/kernel/tracing. But, from Documentation/trace/ftrace.rst: Before 4.1, all ftrace tracing control files were within the debugfs file system, which is typically located at /sys/kernel/debug/tracing. For backward compatibility, when mounting the debugfs file system, the tracefs file system will be automatically mounted at: /sys/kernel/debug/tracing A few scripts in tools/power still refer to this older debugfs path, so let's update them to avoid confusion. Signed-off-by: Ross Zwisler <zwisler@google.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-12-12Merge tag 'acpi-6.2-rc1' of ↵Gravatar Linus Torvalds 2-1/+4
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI and PNP updates from Rafael Wysocki: "These include new code (for instance, support for the FFH address space type and support for new firmware data structures in ACPICA), some new quirks (mostly related to backlight handling and I2C enumeration), a number of fixes and a fair amount of cleanups all over. Specifics: - Update the ACPICA code in the kernel to the 20221020 upstream version and fix a couple of issues in it: - Make acpi_ex_load_op() match upstream implementation (Rafael Wysocki) - Add support for loong_arch-specific APICs in MADT (Huacai Chen) - Add support for fixed PCIe wake event (Huacai Chen) - Add EBDA pointer sanity checks (Vit Kabele) - Avoid accessing VGA memory when EBDA < 1KiB (Vit Kabele) - Add CCEL table support to both compiler/disassembler (Kuppuswamy Sathyanarayanan) - Add a couple of new UUIDs to the known UUID list (Bob Moore) - Add support for FFH Opregion special context data (Sudeep Holla) - Improve warning message for "invalid ACPI name" (Bob Moore) - Add support for CXL 3.0 structures (CXIMS & RDPAS) in the CEDT table (Alison Schofield) - Prepare IORT support for revision E.e (Robin Murphy) - Finish support for the CDAT table (Bob Moore) - Fix error code path in acpi_ds_call_control_method() (Rafael Wysocki) - Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage() (Li Zetao) - Update the version of the ACPICA code in the kernel (Bob Moore) - Use ZERO_PAGE(0) instead of empty_zero_page in the ACPI device enumeration code (Giulio Benetti) - Change the return type of the ACPI driver remove callback to void and update its users accordingly (Dawei Li) - Add general support for FFH address space type and implement the low- level part of it for ARM64 (Sudeep Holla) - Fix stale comments in the ACPI tables parsing code and make it print more messages related to MADT (Hanjun Guo, Huacai Chen) - Replace invocations of generic library functions with more kernel- specific counterparts in the ACPI sysfs interface (Christophe JAILLET, Xu Panda) - Print full name paths of ACPI power resource objects during enumeration (Kane Chen) - Eliminate a compiler warning regarding a missing function prototype in the ACPI power management code (Sudeep Holla) - Fix and clean up the ACPI processor driver (Rafael Wysocki, Li Zhong, Colin Ian King, Sudeep Holla) - Add quirk for the HP Pavilion Gaming 15-cx0041ur to the ACPI EC driver (Mia Kanashi) - Add some mew ACPI backlight handling quirks and update some existing ones (Hans de Goede) - Make the ACPI backlight driver prefer the native backlight control over vendor backlight control when possible (Hans de Goede) - Drop unsetting ACPI APEI driver data on remove (Uwe Kleine-König) - Use xchg_release() instead of cmpxchg() for updating new GHES cache slots (Ard Biesheuvel) - Clean up the ACPI APEI code (Sudeep Holla, Christophe JAILLET, Jay Lu) - Add new I2C device enumeration quirks for Medion Lifetab S10346 and Lenovo Yoga Tab 3 Pro (YT3-X90F) (Hans de Goede) - Make the ACPI battery driver notify user space about adding new battery hooks and removing the existing ones (Armin Wolf) - Modify the pfr_update and pfr_telemetry drivers to use ACPI_FREE() for freeing acpi_object structures to help diagnostics (Wang ShaoBo) - Make the ACPI fan driver use sysfs_emit_at() in its sysfs interface code (ye xingchen) - Fix the _FIF package extraction failure handling in the ACPI fan driver (Hanjun Guo) - Fix the PCC mailbox handling error code path (Huisong Li) - Avoid using PCC Opregions if there is no platform interrupt allocated for this purpose (Huisong Li) - Use sysfs_emit() instead of scnprintf() in the ACPI PAD driver and CPPC library (ye xingchen) - Fix some kernel-doc issues in the ACPI GSI processing code (Xiongfeng Wang) - Fix name memory leak in pnp_alloc_dev() (Yang Yingliang) - Do not disable PNP devices on suspend when they cannot be re-enabled on resume (Hans de Goede) - Clean up the ACPI thermal driver a bit (Rafael Wysocki)" * tag 'acpi-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (67 commits) ACPI: x86: Add skip i2c clients quirk for Medion Lifetab S10346 ACPI: APEI: EINJ: Refactor available_error_type_show() ACPI: APEI: EINJ: Fix formatting errors ACPI: processor: perflib: Adjust acpi_processor_notify_smm() return value ACPI: processor: perflib: Rearrange acpi_processor_notify_smm() ACPI: processor: perflib: Rearrange unregistration routine ACPI: processor: perflib: Drop redundant parentheses ACPI: processor: perflib: Adjust white space ACPI: processor: idle: Drop unnecessary statements and parens ACPI: thermal: Adjust critical.flags.valid check ACPI: fan: Convert to use sysfs_emit_at() API ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage() ACPI: battery: Call power_supply_changed() when adding hooks ACPI: use sysfs_emit() instead of scnprintf() ACPI: x86: Add skip i2c clients quirk for Lenovo Yoga Tab 3 Pro (YT3-X90F) ACPI: APEI: Remove a useless include PNP: Do not disable devices on suspend when they cannot be re-enabled on resume ACPI: processor: Silence missing prototype warnings ACPI: processor_idle: Silence missing prototype warnings ACPI: PM: Silence missing prototype warning ...
2022-12-12Merge branches 'pm-devfreq' and 'pm-tools'Gravatar Rafael J. Wysocki 14-13/+1642
Merge devfreq updates and cpupower utility updates for 6.2-rc1: - Add a private governor_data for devfreq governors (Kant Fan). - Reorganize devfreq code to use device_match_of_node() and devm_platform_get_and_ioremap_resource() instead of open coding them (ye xingchen, Minghao Chi). - Make cpupower choose base_cpu to display default cpupower details instead of picking CPU 0 (Saket Kumar Bhaskar). - Add Georgian translation to cpupower documentation (Zurab Kargareteli). - Introduce powercap intel-rapl library, powercap-info command, and RAPL monitor into cpupower (Thomas Renninger). * pm-devfreq: PM / devfreq: event: use devm_platform_get_and_ioremap_resource() PM / devfreq: event: Use device_match_of_node() PM / devfreq: Use device_match_of_node() PM/devfreq: governor: Add a private governor_data for governor * pm-tools: cpupower: rapl monitor - shows the used power consumption in uj for each rapl domain cpupower: Introduce powercap intel-rapl library and powercap-info command cpupower: Add Georgian translation tools/cpupower: Choose base_cpu to display default cpupower details
2022-12-12Merge branch 'acpica'Gravatar Rafael J. Wysocki 2-1/+4
Merge ACPICA changes, including bug fixes and cleanups as well as support for some recently defined data structures, for 6.2-rc1: - Make acpi_ex_load_op() match upstream implementation (Rafael Wysocki). - Add support for loong_arch-specific APICs in MADT (Huacai Chen). - Add support for fixed PCIe wake event (Huacai Chen). - Add EBDA pointer sanity checks (Vit Kabele). - Avoid accessing VGA memory when EBDA < 1KiB (Vit Kabele). - Add CCEL table support to both compiler/disassembler (Kuppuswamy Sathyanarayanan). - Add a couple of new UUIDs to the known UUID list (Bob Moore). - Add support for FFH Opregion special context data (Sudeep Holla). - Improve warning message for "invalid ACPI name" (Bob Moore). - Add support for CXL 3.0 structures (CXIMS & RDPAS) in the CEDT table (Alison Schofield). - Prepare IORT support for revision E.e (Robin Murphy). - Finish support for the CDAT table (Bob Moore). - Fix error code path in acpi_ds_call_control_method() (Rafael Wysocki). - Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage() (Li Zetao). - Update the version of the ACPICA code in the kernel (Bob Moore). * acpica: ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage() ACPICA: Fix error code path in acpi_ds_call_control_method() ACPICA: Update version to 20221020 ACPICA: Add utcksum.o to the acpidump Makefile Revert "LoongArch: Provisionally add ACPICA data structures" ACPICA: Finish support for the CDAT table ACPICA: IORT: Update for revision E.e ACPICA: Add CXL 3.0 structures (CXIMS & RDPAS) to the CEDT table ACPICA: Improve warning message for "invalid ACPI name" ACPICA: Add support for FFH Opregion special context data ACPICA: Add a couple of new UUIDs to the known UUID list ACPICA: iASL: Add CCEL table to both compiler/disassembler ACPICA: Do not touch VGA memory when EBDA < 1ki_b ACPICA: Check that EBDA pointer is in valid memory ACPICA: Events: Support fixed PCIe wake event ACPICA: MADT: Add loong_arch-specific APICs support ACPICA: Make acpi_ex_load_op() match upstream
2022-12-06PM: sleep: Refine error message in try_to_freeze_tasks()Gravatar Rafael J. Wysocki 1-1/+1
A previous change amended try_to_freeze_tasks() with the "what" variable pointing to a string describing the group of tasks subject to the freezing which may be used in the error message in there too, so make that happen. Accordingly, update sleepgraph.py to catch the modified error message as appropriate. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Petr Mladek <pmladek@suse.com>
2022-12-05Merge tag 'linux-cpupower-6.2-rc1' of ↵Gravatar Rafael J. Wysocki 14-13/+1642
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility updates for 6.2-rc1 from Shuah Khan: "This cpupower update for Linux 6.2-rc1 consists of: - enhancement to choose base_cpu to display default cpupower details instead of picking cpu 0 and failing show information when it is offline. This change ensure user will see power information on the cpu the tool runs on. - adds Georgian translation to cpupower documentation. - introduces powercap intel-rapl library, powercap-info command, and rapl monitor. This adds the ability to show the used power consumption in for each rapl domain" * tag 'linux-cpupower-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: rapl monitor - shows the used power consumption in uj for each rapl domain cpupower: Introduce powercap intel-rapl library and powercap-info command cpupower: Add Georgian translation tools/cpupower: Choose base_cpu to display default cpupower details
2022-11-30cpupower: rapl monitor - shows the used power consumption in uj for each ↵Gravatar Thomas Renninger 4-3/+154
rapl domain This CPU power monitor shows the power consumption as exposed by the powercap subsystem, cmp with: Documentation/power/powercap/powercap.rst cpupower monitor -m RAPL | RAPL CPU| pack | core | unco 0|6853926|967832|442381 8|6853926|967832|442381 1|6853926|967832|442381 9|6853926|967832|442381 Unfortunately RAPL domains cannot be directly mapped to the corresponding CPU socket/package, core it belongs to. Not sure this is possible at all with the current data exposed from the kernel. Still it can be worthful information for developers trying to optimize power consumption of workloads or their system in general. Signed-off-by: Thomas Renninger <trenn@suse.de> CC: Zhang Rui <rui.zhang@intel.com> CC: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-11-30cpupower: Introduce powercap intel-rapl library and powercap-info commandGravatar Thomas Renninger 7-4/+499
Read out powercap zone information via: cpupower powercap-info and show the zone hierarchy to the user: ./cpupower powercap-info Driver: intel-rapl Powercap domain hierarchy: Zone: package-0 (enabled) Power consumption can be monitored in micro Watts Zone: core (disabled) Power consumption can be monitored in micro Watts Zone: uncore (disabled) Power consumption can be monitored in micro Watts Zone: dram (disabled) Power consumption can be monitored in micro Watts There is a dummy -a option for powercap-info which can/should be used to show more detailed info later. Like that other args can be added easily later as well. A enable/disable option via powercap-set subcommand is also an enhancement for later. Also not all RAPL domains are shown. The func walking through RAPL subdomains is restricted and hardcoded to: "intel-rapl/intel-rapl:0" On my system above powercap domains map to: intel-rapl/intel-rapl:0 -> pack (age-0) intel-rapl/intel-rapl:0/intel-rapl:0:0 -> core intel-rapl/intel-rapl:0/intel-rapl:0:1 -> uncore Missing ones on my system are: intel-rapl-mmio/intel-rapl-mmio:0 -> pack (age-0) intel-rapl/intel-rapl:1 -> psys This could get enhanced in: struct powercap_zone *powercap_init_zones() and adopted to walk through all intel-rapl zones, but also to other powercap drivers like dtpm (Dynamic Thermal Power Management framework), cmp with: drivers/powercap/dtpm_* Signed-off-by: Thomas Renninger <trenn@suse.de> CC: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-11-30cpupower: Add Georgian translationGravatar Zurab Kargareteli 1-0/+983
Add Georgian language for cpupower Signed-off-by: Zurab Kargareteli <zuraxt@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-11-25tools/cpupower: Choose base_cpu to display default cpupower detailsGravatar Saket Kumar Bhaskar 3-6/+6
The default output of cpupower info utils shows unexpected output when CPU 0 is disabled. Considering a case where CPU 0 is disabled, output of cpupower idle-info: Before change: cpupower idle-info CPUidle driver: pseries_idle CPUidle governor: menu analyzing CPU 0: *is offline After change: ./cpupower idle-info CPUidle driver: pseries_idle CPUidle governor: menu analyzing CPU 50: Number of idle states: 2 Available idle states: snooze CEDE snooze: Flags/Description: snooze Latency: 0 Usage: 101748 Duration: 2724058 CEDE: Flags/Description: CEDE Latency: 12 Usage: 270004 Duration: 283019526849 If -c option is not passed, CPU 0 was chosen as the default chosen CPU to display details. However when CPU 0 is offline, it results in showing unexpected output. This commit chooses the base_cpu instead of CPU 0, hence keeping the output more relevant in all cases. The base_cpu is the number of CPU on which the calling thread is currently executing. Signed-off-by: Saket Kumar Bhaskar <skb99@linux.vnet.ibm.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-11-08ACPICA: Add utcksum.o to the acpidump MakefileGravatar Rafael J. Wysocki 1-0/+1
Commit 51aad1a6723b ("ACPICA: Finish support for the CDAT table") did not add utcksum.o to the acpidump Makefile by mistake. Do that now. Fixes: 51aad1a6723b ("ACPICA: Finish support for the CDAT table") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-10-28ACPICA: Finish support for the CDAT tableGravatar Bob Moore 1-1/+3
ACPICA commit 8ac4e5116f59d6f9ba2fbeb9ce22ab58237a278f Finish support for the CDAT table, in both the data table compiler and the disassembler. Link: https://github.com/acpica/acpica/commit/8ac4e511 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-10-25pm-graph v5.10Gravatar Todd Brandt 3-122/+118
sleepgraph: - add -wifitrace argument for tracing all the way to wifi reconnect - include more data in ftrace to mark the end of kernel resume - add async_synchronize_full to the list of funcs to chart - add thermal zone info to the log data - include a check for s0ix support (s2idle is the default mem_sleep) - if s2idle does not support s0ix, remove the SYS%LPI turbostat var - fix -dev crash when kprobe caller is just an address (not a symbol) - fix the cpuexec data in -proc to display in resume sleepgraph.8: - add -wifitrace documentation README: - change links from 01.org to developer.intel.com Signed-off-by: Todd Brandt <todd.e.brandt@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-10-10Merge tag 'pm-6.1-rc1-2' of ↵Gravatar Linus Torvalds 1-7/+15
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These update the turbostat utility, extend the macros used for defining device power management callbacks and add a diagnostic message to the generic power domains code. Specifics: - Add an error message to be printed when a power domain marked as "always on" is not actually on during initialization (Johan Hovold). - Extend macros used for defining power management callbacks to allow conditional exporting of noirq and late/early suspend/resume PM callbacks (Paul Cercueil). - Update the turbostat utility: - Add support for two new platforms (Zhang Rui). - Adjust energy unit for Sapphire Rapids (Zhang Rui). - Do not dump TRL if turbo is not supported (Artem Bityutskiy)" * tag 'pm-6.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: tools/power turbostat: version 2022.10.04 tools/power turbostat: Use standard Energy Unit for SPR Dram RAPL domain tools/power turbostat: Do not dump TRL if turbo is not supported tools/power turbostat: Add support for MeteorLake platforms tools/power turbostat: Add support for RPL-S PM: Improve EXPORT_*_DEV_PM_OPS macros PM: domains: log failures to register always-on domains
2022-10-05Merge tag 'platform-drivers-x86-v6.1-1' of ↵Gravatar Linus Torvalds 6-533/+496
git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Hans de Goede: - AMD Platform Management Framework (PMF) driver with AMT and QnQF support - AMD PMC: Improved logging for debugging s2idle issues - Big refactor of the ACPI/x86 backlight handling, ensuring that we only register 1 /sys/class/backlight device per LCD panel - Microsoft Surface: - Surface Laptop Go 2 support - Surface Pro 8 HID sensor support - Asus WMI: - Lots of cleanups - Support for TUF RGB keyboard backlight control - Add support for ROG X13 tablet mode - Siemens Simatic: IPC227G and IPC427G support - Toshiba ACPI laptop driver: Fan hwmon and battery ECO mode support - tools/power/x86/intel-speed-select: Various improvements - Various cleanups - Various small bugfixes * tag 'platform-drivers-x86-v6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (153 commits) platform/x86: use PLATFORM_DEVID_NONE instead of -1 platform/x86/amd: pmc: Dump idle mask during "check" stage instead platform/x86/intel/wmi: thunderbolt: Use dev_groups callback platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks platform/surface: Split memcpy() of struct ssam_event flexible array platform/x86: compal-laptop: Get rid of a few forward declarations platform/x86: intel-uncore-freq: Use sysfs_emit() to instead of scnprintf() platform/x86: dell-smbios-base: Use sysfs_emit() platform/x86/amd/pmf: Remove unused power_delta instances platform/x86/amd/pmf: install notify handler after acpi init Documentation/ABI/testing/sysfs-amd-pmf: Add ABI doc for AMD PMF platform/x86/amd/pmf: Add sysfs to toggle CnQF platform/x86/amd/pmf: Add support for CnQF platform/x86/amd: pmc: Fix build without debugfs platform/x86: hp-wmi: Support touchpad on/off platform/x86: int3472/discrete: Drop a forward declaration platform/x86: toshiba_acpi: change turn_on_panel_on_resume to static platform/x86: wmi: Drop forward declaration of static functions platform/x86: toshiba_acpi: Remove duplicate include platform/x86: msi-laptop: Change DMI match / alias strings to fix module autoloading ...
2022-10-05Merge branch 'turbostat' of ↵Gravatar Rafael J. Wysocki 1-7/+15
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull turbostat changes for 6.1-rc1 from Len Brown: "Add support for two new platforms, and two bug fixes on existing platforms." * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools/power turbostat: version 2022.10.04 tools/power turbostat: Use standard Energy Unit for SPR Dram RAPL domain tools/power turbostat: Do not dump TRL if turbo is not supported tools/power turbostat: Add support for MeteorLake platforms tools/power turbostat: Add support for RPL-S
2022-10-04tools/power turbostat: version 2022.10.04Gravatar Len Brown 1-1/+1
Signed-off-by: Len Brown <len.brown@intel.com>
2022-10-04tools/power turbostat: Use standard Energy Unit for SPR Dram RAPL domainGravatar Zhang Rui 1-1/+0
Intel Xeon servers used to use a fixed energy resolution (15.3uj) for Dram RAPL domain. But on SPR, Dram RAPL domain follows the standard energy resolution as described in MSR_RAPL_POWER_UNIT. Remove the SPR rapl_dram_energy_units quirk. Fixes: e7af1ed3fa47 ("tools/power turbostat: Support additional CPU model numbers") Signed-off-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Wang Wendy <wendy.wang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2022-10-04tools/power turbostat: Do not dump TRL if turbo is not supportedGravatar Artem Bityutskiy 1-5/+11
Do not dump turbo ratio limits if platform does not support turbo, because it is confusing and the TRL MSRs may even include misleading information. And they are not supposed to be relied on if turbo is not supported. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2022-10-04tools/power turbostat: Add support for MeteorLake platformsGravatar Zhang Rui 1-0/+2
Add turbostat support for MeteorLake platforms, which behave the same as RaptorLake platforms. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2022-10-04tools/power turbostat: Add support for RPL-SGravatar Zhang Rui 1-0/+1
Add turbostat support for RAPTORLAKE_S platform, which behaves the same as RAPTORLAKE and RAPTORLAKE_P platforms. RPL-S 601/801 have different CPU ID than the Hybrid ADL-S platforms. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2022-09-15tools/power/x86/intel-speed-select: Release v1.13Gravatar Srinivas Pandruvada 1-1/+1
Update version number. This version includes fixes for: - fix build failure when using gcc options -Wl,--as-needed - Fix warning for perf_cap.cpu may be uninitialized - Fix off by one check for MAX_DIE_PER_PACKAGE - Fix issue with use of get_physical_die_id instead of get_physical_die_id Optimizations: - Removed unused interfaces and functions - Better handle package, die, cpu combination by defining a struct and set at one place instead at each user level. New functional change: - Warn if turbo is disabled and SST turbo-freq feature is requested Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-15tools/power/x86/intel-speed-select: Optimize CPU initializationGravatar Zhang Rui 1-58/+38
Optimize CPU initialization. Do cpu related initialization in one function, including setting the cpu present_cpumask, target_cpumask, and cpu_map and core_count arrays. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-15tools/power/x86/intel-speed-select: Utilize cpu_map to get physical idGravatar Zhang Rui 1-11/+36
cpu_map already has the cpu package id, die id information. Thus there is no need to re-evaluating sysfs attributes or stored data file to get the package id and die id of a given CPU each time. In order to unitlize this, cpu_map needs to be created unconditionally. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-15tools/power/x86/intel-speed-select: Remove unused struct clos_config fieldsGravatar Zhang Rui 3-8/+0
pkg_id/die_id can be retrieved from struct isst_id, remove the redundant clos_config->pkg_id/die_id fields. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-15tools/power/x86/intel-speed-select: Enforce isst_id valueGravatar Zhang Rui 2-4/+10
Enforce the pkg/die value in struct isst_id are either -1 or a valid value. This helps avoid inconsistent or redundant checks. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-15tools/power/x86/intel-speed-select: Do not export get_physical_idGravatar Zhang Rui 2-5/+3
Now, all the get_physical_pkg/die/core_id() users are inside isst-config.c, so no need to export these APIs. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-15tools/power/x86/intel-speed-select: Introduce is_cpu_in_power_domain helperGravatar Zhang Rui 3-21/+25
struct isst_id contains cpu, package and die info, and it can represent a specific SST power domain. Introduce is_cpu_in_power_domain() helper to identify if a cpu is in a specified power_domain. And cleanup the code to use the new helper. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-15tools/power/x86/intel-speed-select: Cleanup get_physical_id usageGravatar Zhang Rui 4-68/+43
struct isst_id already contains package and die id information, thus there is no need to get the package and die id information, when struct isst_id is already available. Remove unneeded get_physical_package_id/get_physical_die_id usage. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-15tools/power/x86/intel-speed-select: Convert more function to use isst_idGravatar Zhang Rui 4-11/+10
With pkg and die info added into struct isst_id, more functions can be converted to use struct isst_id as parameter. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-15tools/power/x86/intel-speed-select: Add pkg and die in isst_idGravatar Zhang Rui 2-0/+4
Code uses pkg_id and die_id to refer to a specific power domain. The pkg/die information is already settled at start time. Adding package id and die id information into struct isst_id so that code does not need to retrieve them at runtime. More code cleanups can be done with the package/die info available. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-15tools/power/x86/intel-speed-select: Introduce struct isst_idGravatar Zhang Rui 6-368/+396
SST control is power-domain based rather than cpu based, on all the systems including Sapphire Rapids and ealier. SST core APIs uses cpu id as parameter, and use the underlying pkg_id and die_id information to find a power domain, this is not straight forward and introduces obscure logics in the code. Introduce struct isst_id to represent a SST Power Domain. All core APIs are converted to use struct isst_id as parameter instead of using cpu id. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-15tools/power/x86/intel-speed-select: Remove unused core_mask arrayGravatar Zhang Rui 1-6/+1
Remove unused core_mask array. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-15tools/power/x86/intel-speed-select: Remove dead codeGravatar Zhang Rui 3-43/+0
Remove dead code. Not functional change in this patch Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-15tools/power/x86/intel-speed-select: Fix cpu count for TDP level displayGravatar Zhang Rui 1-1/+1
In the function isst_ctdp_display_information(), call to the function get_cpu_count() is using get_physical_die_id() instead of get_physical_package_id(). This will result in wrong display of CPU count in that level. Signed-off-by: Zhang Rui <rui.zhang@intel.com> [ Srinivas Pandruvada: fixed subject and change log ] Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2022-09-03ACPI: tools: pfrut: Do not initialize ret in main()Gravatar Shi junming 1-1/+1
The initialization is unnecessary, because ret is always assigned a new value before reading it. Signed-off-by: Shi junming <junming@nfschina.com> [ rjw: Subject edits, new changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-08-04Merge tag 'platform-drivers-x86-v6.0-1' of ↵Gravatar Linus Torvalds 2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Hans de Goede: - Microsoft Surface: - SSAM hot unplug support - Surface Pro 8 keyboard cover support - Tablet mode switch support for Surface Pro 8 and Surface Laptop Studio - thinkpad_acpi: - AMD Automatice Mode Transitions (AMT) support - Mellanox: - Vulcan chassis COMe NVSwitch management support - XH3000 support - New generic/shared Intel P2SB (Primary to Sideband) support - Lots of small cleanups - Various small bugfixes - Various new hardware ids / quirks additions * tag 'platform-drivers-x86-v6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (105 commits) platform/x86/intel/vsec: Fix wrong type for local status variables platform/x86: p2sb: Move out of X86_PLATFORM_DEVICES dependency platform/x86: pmc_atom: Fix comment typo platform/surface: gpe: Add support for 13" Intel version of Surface Laptop 4 platform/olpc: Fix uninitialized data in debugfs write platform/mellanox: mlxreg-lc: Fix error flow and extend verbosity platform/x86: pmc_atom: Match all Lex BayTrail boards with critclk_systems DMI table platform/x86: sony-laptop: Remove useless comparisons in sony_pic_read_possible_resource() tools/power/x86/intel-speed-select: Remove unneeded semicolon tools/power/x86/intel-speed-select: Fix off by one check platform/surface: tabletsw: Fix __le32 integer access Documentation/ABI: Add new attributes for mlxreg-io sysfs interfaces Documentation/ABI: mlxreg-io: Fix contact info platform/mellanox: mlxreg-io: Add locking for io operations platform/x86: mlx-platform: Add COME board revision register platform/x86: mlx-platform: Add support for new system XH3000 platform/x86: mlx-platform: Introduce support for COMe NVSwitch management module for Vulcan chassis platform/x86: mlx-platform: Add support for systems equipped with two ASICs platform/x86: mlx-platform: Add cosmetic changes for alignment platform/x86: mlx-platform: Make activation of some drivers conditional ...
2022-08-04Merge tag 'spdx-6.0-rc1' of ↵Gravatar Linus Torvalds 1-4/+2
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx Pull SPDX updates from Greg KH: "Here is the set of SPDX comment updates for 6.0-rc1. Nothing huge here, just a number of updated SPDX license tags and cleanups based on the review of a number of common patterns in GPLv2 boilerplate text. Also included in here are a few other minor updates, two USB files, and one Documentation file update to get the SPDX lines correct. All of these have been in the linux-next tree for a very long time" * tag 'spdx-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: (28 commits) Documentation: samsung-s3c24xx: Add blank line after SPDX directive x86/crypto: Remove stray comment terminator treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_406.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_398.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_391.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_385.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_319.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_298.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_179.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2) treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 1) treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_160.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_152.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_149.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_147.RULE treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_133.RULE ...