The sleepgraph tool currently fails:
File "/usr/bin/sleepgraph", line 4155
or re.match('psci: CPU(?P<cpu>[0-9]*) killed.*', msg)):
^
SyntaxError: unmatched ')'
Fixes: 34ea427e01 ("PM: tools: sleepgraph: Recognize "CPU killed" messages")
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-----BEGIN PGP SIGNATURE-----
iQJIBAABCgAyFiEE67dNfPFP+XUaA73mB9BFOha3NhcFAmVO9MoUHGxlbi5icm93
bkBpbnRlbC5jb20ACgkQB9BFOha3NhcJqhAAryDKEnmhbz0Xu746fL6cuTqrsJXr
7QyswqsJnzqWHWvFsxzBXvXe9iCH73dlfT2TGtPbKuevskvJVAhNGrULIX+k9ddP
rVRgKvCyJuajMzTbKEjJDUm1a142WFSUNPBxvH6LSdmqmMhPt76cK19Z38kIreMt
CM+c0NJwzEGED7SvsCR4SV2dSzrbru40ni6knsYjbaaeUr5pRE3W4qxbSwVdKBW4
lnnmU6R0xZkZ0IYA90xiXso4YZ81dBY4vV4pUpVewqgT1uQOLA4pfabIW8fYDPnW
gkUtAVFWaky2L7zwvLsMkg5f3gkTKUCCKkDEbBuWj84YwqAOHC2pV23aJ2iBkP2C
SyBnHiI9u0oYg+uDtM8SPxoTDiDhSNUq/mfVa/VZwwItSb1IOiTlhCrRzU4z4+IO
R/+eyJYsK//EiIs9EjVANafzGbnvrBvfZAkXVrHExfSyiN/6wDrpo2E4lFeELxwW
CUf4X1dtv/RdFFjju5cu/Q/DntENqxife9QHRTsn1lJsPZ+Pp/D9qZ4shA+o1P6a
bnXDph4DjCC7i2QYo55NcO6LbfpVJ03IPg3CZjScaW1PCN4ELkE9AJju7HkHEZCB
icOvpKF4vOjeGJRQI0BDXr1w0re1ZSg2ylDCappq0ud/zSOkYIK6q1V2Uh4CWGv+
XX43X38SiMdyfuc=
=J72l
-----END PGP SIGNATURE-----
Merge tag 'turbostat-2023.11.07' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull turbostat updates from Len Brown:
- Turbostat features are now table-driven (Rui Zhang)
- Add support for some new platforms (Sumeet Pawnikar, Rui Zhang)
- Gracefully run in configs when CPUs are limited (Rui Zhang, Srinivas
Pandruvada)
- misc minor fixes
[ This came in during the merge window, but sorting out the signed tag
took a while, so thus the late merge - Linus ]
* tag 'turbostat-2023.11.07' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (86 commits)
tools/power turbostat: version 2023.11.07
tools/power/turbostat: bugfix "--show IPC"
tools/power/turbostat: Add initial support for LunarLake
tools/power/turbostat: Add initial support for ArrowLake
tools/power/turbostat: Add initial support for GrandRidge
tools/power/turbostat: Add initial support for SierraForest
tools/power/turbostat: Add initial support for GraniteRapids
tools/power/turbostat: Add MSR_CORE_C1_RES support for spr_features
tools/power/turbostat: Move process to root cgroup
tools/power/turbostat: Handle cgroup v2 cpu limitation
tools/power/turbostat: Abstrct function for parsing cpu string
tools/power/turbostat: Handle offlined CPUs in cpu_subset
tools/power/turbostat: Obey allowed CPUs for system summary
tools/power/turbostat: Obey allowed CPUs for primary thread/core detection
tools/power/turbostat: Abstract several functions
tools/power/turbostat: Obey allowed CPUs during startup
tools/power/turbostat: Obey allowed CPUs when accessing CPU counters
tools/power/turbostat: Introduce cpu_allowed_set
tools/power/turbostat: Remove PC7/PC9 support on ADL/RPL
tools/power/turbostat: Enable MSR_CORE_C1_RES on recent Intel client platforms
...
Turbostat features are now table-driven (Rui Zhang)
Add support for some new platforms (Sumeet Pawnikar, Rui Zhang)
Gracefully run in configs when CPUs are limited (Rui Zhang, Srinivas Pandruvada)
misc minor fixes.
Signed-off-by: Len Brown <len.brown@intel.com>
turbostat --show IPC
displays "inf" for the IPC column
turbostat was missing the explicit dependency of IPC on APERF,
and thus neglected to collect APERF when only IPC was requested.
typcial use:
turbostat --quiet --show CPU,IPC
Signed-off-by: Len Brown <len.brown@intel.com>
Merge cpupower utility update for 6.7-rc1:
- Fix a reference to a removed document in the cpupower utility
documentation (Vegard Nossum).
* pm-tools:
cpupower: fix reference to nonexistent document
This cpupower update for Linux 6.7-rc1 consists of a single fix to
documentation to fix reference to a removed document.
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEPZKym/RZuOCGeA/kCwJExA0NQxwFAmVBZZcACgkQCwJExA0N
QxxB9w/+KfLlAOCThW9LZauqVsVJHzzMuDi6ctuvnUsy39Xf/VH22SzakhYoujfT
vuQ43cLqIT/p9HkjbQnC0uJTx3nIIs/qWRWyklMn9ETAp+TP14ewTFRYAiPL/XRh
GylTbCzh2QmU0oiR81Cq4bMRGkzywGHKi7g+E5LQ7ACz1McreWHIXonPokLEGO7n
61Z1M9Q43333IZSAE+erop5CVJTOsFTf3Ox2RLroNg9MNFX1OiUuBrpSsG2O44BX
59A0vQxIRuDqDgBDZapb0lpjj/E4pdyuKbBSZVDDKXbe9vWdhomibwMISiM9vjNm
z8zy2lUA+qUE2UDSZFVFVDKk8hPwgSvcZfKhFUuuc3K+vXixNfxhFg7TVdH5RwkV
pNgcXMuQjqPXz4k59MWS0E68aWPsvfsA3Xt/GD3yr4aSDskrzIiyc6F0u67mW1qG
T1sQdzg2AHKXb7g774T2OW6ugeoEZ5LftDDZxTZx0+UIGk7JysXb9ksNJTqItnCI
j4MSOK25EbHR/pk0cJAlCfn6kGYYOMzuTiOf+xEz4FvYHeduEAvUbT5irBMGkETI
W4hwsv/fUPOhVMc4uYEZCIf6vcdLPDs9REvB55VGQm4O3CNM+ETBeRwnDHD8QaWg
qPM8+vnrUjiE33YVPF0F/QhkJxSo+SZP79igwzpBva5ttkUuOpg=
=p8rZ
-----END PGP SIGNATURE-----
Merge tag 'linux-cpupower-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux
Merge cpupower utility update for 6.7-rc1 from Shuah Khan:
"This cpupower update for Linux 6.7-rc1 consists of a single fix to
documentation to fix reference to a removed document."
* tag 'linux-cpupower-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux:
cpupower: fix reference to nonexistent document
This kselftest update for Linux 6.7-rc1 consists of:
-- kbuild kselftest-merge target fixes
-- fixes to several tests
-- resctrl test fixes and enhancements
-- ksft_perror() helper and reporting improvements
-- printf attribute to kselftest prints to improve reporting
-- documentation and clang build warning fixes
Bulk of the patches are for resctrl fixes and enhancements.
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEPZKym/RZuOCGeA/kCwJExA0NQxwFAmVCoHMACgkQCwJExA0N
QxwzrA//ehiiLdV2lyghzPpDTVY8jKlB1xIpg3s0r0M3m/j6nAdnOgOe2gkapT7T
gFGL0r7xL9crqFdymwDANLSvNWOeghqB1oIok9Ruw5Rl3FcLnkh920bE6tPsddJg
9+/KqtZvL0Sr43l9OSgX2Uzqyw60wRQwpO0431hmgnKjblk8Rh4GZ7fUCLLNf4Ia
yOq1s2/cdmEwRc96lDaBWZaOTusejwh/xy8tgAjozHipLsmsexbyyHVWJWkVhMOD
ZklCtrq4lckRz+Vky6akvjoL6Mjl//7pg323e2fUcDCQxQvqwnCo2VqqyOVBnN2A
6XHQ6yXwh0xzCKRFgAiFhWlsKOz3wEIDrdp4dmhDkg4lw4gGJcwNke1UyX5zXYKM
1a6R1vbQS9qQOsWf34AYKZBHruFNtUt0FJYgI43SuH+fGc0D5cU91Rz+s9QIPCwj
8tcr5RWin8BOziDz05lxSKWRHD+3oc5qmsmGYBJhilwtvY2wNbRZNDZjiO28kiIy
3kUWXeCtHmZE1KHK1H5v6bMC8SqUU7ukvV5WebqGpxzJ2eFPbeXcek9/AWSWOFni
7thUg6MG3e4c/zRk8JYbmqXS/GeTkdmc3+VMXApLhTB8uSOWsnVMfJS9Zc2A1tGg
n6NRBJFQO8t9Wm1l9XvlnC9HA/8lO/3uih+SzKn/u8KvoN96HPM=
=JZb+
-----END PGP SIGNATURE-----
Merge tag 'linux_kselftest-next-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kselftest updates from Shuah Khan:
- kbuild kselftest-merge target fixes
- fixes to several tests
- resctrl test fixes and enhancements
- ksft_perror() helper and reporting improvements
- printf attribute to kselftest prints to improve reporting
- documentation and clang build warning fixes
The bulk of the patches are for resctrl fixes and enhancements.
* tag 'linux_kselftest-next-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (51 commits)
selftests/resctrl: Fix MBM test failure when MBA unavailable
selftests/clone3: Report descriptive test names
selftests:modify the incorrect print format
selftests/efivarfs: create-read: fix a resource leak
selftests/ftrace: Add riscv support for kprobe arg tests
selftests/ftrace: add loongarch support for kprobe args char tests
selftests/amd-pstate: Added option to provide perf binary path
selftests/amd-pstate: Fix broken paths to run workloads in amd-pstate-ut
selftests/resctrl: Move run_benchmark() to a more fitting file
selftests/resctrl: Fix schemata write error check
selftests/resctrl: Reduce failures due to outliers in MBA/MBM tests
selftests/resctrl: Fix feature checks
selftests/resctrl: Refactor feature check to use resource and feature name
selftests/resctrl: Move _GNU_SOURCE define into Makefile
selftests/resctrl: Remove duplicate feature check from CMT test
selftests/resctrl: Extend signal handler coverage to unmount on receiving signal
selftests/resctrl: Fix uninitialized .sa_flags
selftests/resctrl: Cleanup benchmark argument parsing
selftests/resctrl: Remove ben_count variable
selftests/resctrl: Make benchmark command const and build it with pointers
...
Highlights:
- asus-wmi: Support for screenpad and solve brightness key
press duplication
- int3472: Eliminate the last use of deprecated GPIO functions
- mlxbf-pmc: New HW support
- msi-ec: Support new EC configurations
- thinkpad_acpi: Support reading aux MAC address during passthrough
- wmi: Fixes & improvements
- x86-android-tablets: Detection fix and avoid use of GPIO private APIs
- Debug & metrics interface improvements
- Miscellaneous cleanups / fixes / improvements
The following is an automated shortlog grouped by driver:
acer-wmi:
- Remove void function return
amd/hsmp:
- add support for metrics tbl
- create plat specific struct
- Fix iomem handling
- improve the error log
amd/pmc:
- Add dump_custom_stb module parameter
- Add PMFW command id to support S2D force flush
- Handle overflow cases where the num_samples range is higher
- Use flex array when calling amd_pmc_stb_debugfs_open_v2()
asus-wireless:
- Replace open coded acpi_match_acpi_device()
asus-wmi:
- add support for ASUS screenpad
- Do not report brightness up/down keys when also reported by acpi_video
gpiolib: acpi:
- Add a ignore interrupt quirk for Peaq C1010
- Check if a GPIO is listed in ignore_interrupt earlier
hp-bioscfg:
- Annotate struct bios_args with __counted_by
inspur-platform-profile:
- Add platform profile support
int3472:
- Add new skl_int3472_fill_gpiod_lookup() helper
- Add new skl_int3472_gpiod_get_from_temp_lookup() helper
- Stop using gpiod_toggle_active_low()
- Switch to devm_get_gpiod()
intel: bytcrc_pwrsrc:
- Convert to platform remove callback returning void
intel/ifs:
- Add new CPU support
- Add new error code
- ARRAY BIST for Sierra Forest
- Gen2 scan image loading
- Gen2 Scan test support
- Metadata validation for start_chunk
- Refactor image loading code
- Store IFS generation number
- Validate image size
intel_speed_select_if:
- Remove hardcoded map size
- Use devm_ioremap_resource
intel/tpmi:
- Add debugfs support for read/write blocked
- Add defines to get version information
intel-uncore-freq:
- Ignore minor version change
ISST:
- Allow level 0 to be not present
- Ignore minor version change
- Use fuse enabled mask instead of allowed levels
mellanox:
- Fix misspelling error in routine name
- Rename some init()/exit() functions for consistent naming
mlxbf-bootctl:
- Convert to platform remove callback returning void
mlxbf-pmc:
- Add support for BlueField-3
mlxbf-tmfifo:
- Convert to platform remove callback returning void
mlx-Convert to platform remove callback returning void:
- mlx-Convert to platform remove callback returning void
mlxreg-hotplug:
- Convert to platform remove callback returning void
mlxreg-io:
- Convert to platform remove callback returning void
mlxreg-lc:
- Convert to platform remove callback returning void
msi-ec:
- Add more EC configs
- rename fn_super_swap
nvsw-sn2201:
- Convert to platform remove callback returning void
sel3350-Convert to platform remove callback returning void:
- sel3350-Convert to platform remove callback returning void
siemens: simatic-ipc-batt-apollolake:
- Convert to platform remove callback returning void
siemens: simatic-ipc-batt:
- Convert to platform remove callback returning void
siemens: simatic-ipc-batt-elkhartlake:
- Convert to platform remove callback returning void
siemens: simatic-ipc-batt-f7188x:
- Convert to platform remove callback returning void
siemens: simatic-ipc-batt:
- Simplify simatic_ipc_batt_remove()
surface: acpi-notify:
- Convert to platform remove callback returning void
surface: aggregator:
- Annotate struct ssam_event with __counted_by
surface: aggregator-cdev:
- Convert to platform remove callback returning void
surface: aggregator-registry:
- Convert to platform remove callback returning void
surface: dtx:
- Convert to platform remove callback returning void
surface: gpe:
- Convert to platform remove callback returning void
surface: hotplug:
- Convert to platform remove callback returning void
surface: surface3-wmi:
- Convert to platform remove callback returning void
think-lmi:
- Add bulk save feature
- Replace kstrdup() + strreplace() with kstrdup_and_replace()
- Use strreplace() to replace a character by nul
thinkpad_acpi:
- Add battery quirk for Thinkpad X120e
- replace deprecated strncpy with memcpy
- sysfs interface to auxmac
tools/power/x86/intel-speed-select:
- Display error for core-power support
- Increase max CPUs in one request
- No TRL for non compute domains
- Sanitize integer arguments
- turbo-mode enable disable swapped
- Update help for TRL
- Use cgroup isolate for CPU 0
- v1.18 release
wmi:
- Decouple probe deferring from wmi_block_list
- Decouple WMI device removal from wmi_block_list
- Fix opening of char device
- Fix probe failure when failing to register WMI devices
- Fix refcounting of WMI devices in legacy functions
x86-android-tablets:
- Add a comment about x86_android_tablet_get_gpiod()
- Create a platform_device from module_init()
- Drop "linux,power-supply-name" from lenovo_yt3_bq25892_0_props[]
- Fix Lenovo Yoga Tablet 2 830F/L vs 1050F/L detection
- Remove invalid_aei_gpiochip from Peaq C1010
- Remove invalid_aei_gpiochip support
- Stop using gpiolib private APIs
- Use platform-device as gpio-keys parent
xo15-ebook:
- Replace open coded acpi_match_acpi_device()
Merges:
- Merge branch 'pdx86/platform-drivers-x86-int3472' into review-ilpo
- Merge branch 'pdx86/platform-drivers-x86-mellanox-init' into review-ilpo
- Merge remote-tracking branch 'intel-speed-select/intel-sst' into review-ilpo
- Merge remote-tracking branch 'pdx86/platform-drivers-x86-android-tablets' into review-hans
-----BEGIN PGP SIGNATURE-----
iHUEABYIAB0WIQSCSUwRdwTNL2MhaBlZrE9hU+XOMQUCZT+lBwAKCRBZrE9hU+XO
Mck0AQCFU7dYLCF4d1CXtHf1eZhSXLpYdhcO+C08JGGoM+MqSgD+Jyb9KJHk4pxE
FvKG51I9neyAne9lvNrLodHRzxCYgAo=
=duM8
-----END PGP SIGNATURE-----
Merge tag 'platform-drivers-x86-v6.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver updates from Ilpo Järvinen:
- asus-wmi: Support for screenpad and solve brightness key press
duplication
- int3472: Eliminate the last use of deprecated GPIO functions
- mlxbf-pmc: New HW support
- msi-ec: Support new EC configurations
- thinkpad_acpi: Support reading aux MAC address during passthrough
- wmi: Fixes & improvements
- x86-android-tablets: Detection fix and avoid use of GPIO private APIs
- Debug & metrics interface improvements
- Miscellaneous cleanups / fixes / improvements
* tag 'platform-drivers-x86-v6.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (80 commits)
platform/x86: inspur-platform-profile: Add platform profile support
platform/x86: thinkpad_acpi: Add battery quirk for Thinkpad X120e
platform/x86: wmi: Decouple WMI device removal from wmi_block_list
platform/x86: wmi: Fix opening of char device
platform/x86: wmi: Fix probe failure when failing to register WMI devices
platform/x86: wmi: Fix refcounting of WMI devices in legacy functions
platform/x86: wmi: Decouple probe deferring from wmi_block_list
platform/x86/amd/hsmp: Fix iomem handling
platform/x86: asus-wmi: Do not report brightness up/down keys when also reported by acpi_video
platform/x86: thinkpad_acpi: replace deprecated strncpy with memcpy
tools/power/x86/intel-speed-select: v1.18 release
tools/power/x86/intel-speed-select: Use cgroup isolate for CPU 0
tools/power/x86/intel-speed-select: Increase max CPUs in one request
tools/power/x86/intel-speed-select: Display error for core-power support
tools/power/x86/intel-speed-select: No TRL for non compute domains
tools/power/x86/intel-speed-select: turbo-mode enable disable swapped
tools/power/x86/intel-speed-select: Update help for TRL
tools/power/x86/intel-speed-select: Sanitize integer arguments
platform/x86: acer-wmi: Remove void function return
platform/x86/amd/pmc: Add dump_custom_stb module parameter
...
This file was renamed from .txt to .rst and left a dangling reference.
Fix it.
Fixes: 151f4e2bdc ("docs: power: convert docs to ReST and rename to *.rst")
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Add initial support for GrandRidge.
It shares the same features as SierraForest, except that it does not
support PC2/PC6.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Add initial support for SierraForest.
It shares the same features with SapphireRapids, except that it has
MSR_MODULE_C6_RES_MS support.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Add MSR_CORE_C1_RES support for spr_features because both Sapphirerapids
and Emeraldrapids support this MSR.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
When available CPUs are reduced via cgroup cpuset controller, turbostat
will exit with errors (For example):
get_counters: Could not migrate to CPU 0
turbostat: re-initialized with num_cpus 20
get_counters: Could not migrate to CPU 0
turbostat: re-initialized with num_cpus 20
Move the turbostat to root cgroup, which has every CPU.
Writing the value 0 to a cgroup.procs file causes the writing
process to be moved to the corresponding cgroup.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tested-by: Zhang Rui <rui.zhang@intel.com>
CPUs can be isolated via cgroup settings and turbostat should avoid
migrating to these CPUs, just like it does for the '-c' cpus.
Introduce cpu_effective_set to save the cgroup cpu limitation info from
/sys/fs/cgroup/cpuset.cpus.effective. And use cpu_allowed_set as the
intersection of cpu_present_set, cpu_effective_set and cpu_subset.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Abstract parse_cpu_str() which can update any specified cpu_set by a
given cpu string. This can be used to handle further CPU limitations
from other sources like cgroup.
The cpu string parsing code is also enhanced to handle the strings that
have an extra '\n' before string terminator.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
It is possible that the cpu_subset contains offlined CPUs.
If this happens during start, exit immediately because this is likely an
operator error that is best fixed by re-invoking.
If this happens at runtime, give a warning only because turbostat should
do its best effort to continue running.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
System summary should summarize the information for allowed CPUs instead
of all the present CPUs.
Introduce topology information for allowed CPUs, and use them to
get system summary.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Thread_id doesn't tell if a CPU is allowed or not.
Detect allowed CPUs only and use the first detected thread/core as the
primary thread/core of a core/package.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
When detecting the primary thread/core in a core/package, current code
doesn't handle the allowed CPUs.
Abstract several functions for further fix of this issue.
No functional change.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Set turbostat CPU affinity to make sure turbostat is running on one of
the allowed CPUs.
Set base_cpu to the first allowed CPU so that some platform information
is dumped using one of the allowed CPUs.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
for_all_cpus/for_all_cpus_2 are used for accessing the per CPU counters,
and they should follow the cpu_allowed_set instead of cpu_present_set.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Turbostat supports "-c" parameter which limits output to system summary
plus the specified cpu-set. But some code still uses cpu_present_set to
read and dump the counters.
Introduce cpu_allowed_set for code that should obey the specified cpu-set.
No functional change.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
This version addresses issues with:
- When CPU 0 hotplug is not possible, try cgroup v2 isolation
without any user input
- Fix turbo mode enable/disable swapped
- Sanitize command line integer and hex arguments
- Add more error messages
- Increase CPU count in one request
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
From kernel version 6.5, CPU 0 hotplug capability is deprecated.
If some SST profile doesn't have CPU 0, then it is no longer possible to
offline CPU 0. This means that user space threads will still run on
CPU 0.
To workaround this issue, use cgroup v2 isolation feature. Whenever there
/sys/devices/system/cpu/cpu0/online file is absent or open fails, isolate
CPU 0 via CPU cgroup v2 isolation. Also add a command line option to
force even if the /sys/devices/system/cpu/cpu0/online is present.
The previous commit "01bcb56f059e ("tools/power/x86/intel-speed-select:
Prevent CPU 0 offline") was just warning about this issue based on the
kernel version 6.5 and above. With this new approach, instead of warning
take action to mitigate the issue.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
With the increase in the CPU count, this count needs to be updated.
Increase max CPU count to 512.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
When core-power is getting enabled, if the feaure is not supported,
display error.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
The command for turbo-mode enable and disable is swapped. Fix that.
Previously turbo-mode enable was actually disabling and disable was
enabling.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
TRL (turbo ratio limit) argument is passed in hex string. Clarify that
in the help.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
If the command takes some integer arguments, make sure the command
contains only digits. Same for Hex arguments. Otherwise return error.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
In selftests/amd-pstate, tbench and gitsource microbenchmarks are
used to compare the performance with different governors. In current
implementation the relative path to run `amd_pstate_tracer.py` is broken.
Fix this by using absolute paths.
Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Compared with other platforms that share cnl_features, ADL/RPL don't
have PC7/PC9.
Clone a new platform feature set from cnl_features for ADL/RPL, with
PC7/PC9 removed.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
All recent Intel client platforms have MSR_CORE_C1_RES. Enable the
support on these platforms, including CNL/ICL/LKF/RKL/TGL/ADL/RPL/MTL.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Feature probe has nothing to do with CPUID, thus it should not be in
process_cpuids().
Introduce probe_pm_features() and move all feature probing functions
into it.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Relocate more feature probing code outside of process_cpuids() into the
corresponding probing functions.
This improves the readability of code and the turbostat output.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Reorder some functions to solve code depdency introduced by next patch.
No functional change.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Introduce probe_thermal(), and move all thermal probing related code
into it.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Introduce probe_lpi(), and move all lpi probing related code into it.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Introduce probe_graphics(), and move all graphics probing related code
into it.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Rename rapl_probe() to probe_rapl() to be consistent with other probing
function names.
Probe rapl after probing uncore frequency.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Rename intel_uncore_frequency_probe() to probe_intel_uncore_frequency()
to be consistent with other probing function names.
Probe uncore frequency right after probing cstates.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Introduce probe_pstates() and move all pstate probing related code into
it.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Move all cstate probing related code into probe_cstates().
Note that dump_platform_info() actually dumps both MSR_PLATFORM_INFO and
MSR_IA32_POWER_CTL. MSR_PLATFORM_INFO is for pstate and
MSR_IA32_POWER_CTL is for cstate. So split dump_platform_info() and dump
MSR_IA32_POWER_CTL in probe_cstates().
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
AMD/Hygon platforms that don't have RAPL use 'amd_features' to describe
the platform features. Unknown Intel platforms use 'default_features' to
describe the platform features.
As none of the platform feature is set for 'amd_features' or
'default_features', there is no need to maintain both of them.
Remove 'amd_features' structure and improve the logic in
probe_platform_features().
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Now CPU model checks have been cleaned up, no code depends on the
duplicated CPU model value.
Delete intel_model_duplicates().
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Abstract cstate prewake bit support.
Delete is_icx()/is_spr() CPU model checks.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Abstract aperf/mperf multiplier support.
Delete is_knl() CPU model check.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>