linux-stable/drivers/cpufreq
Dhananjay Ugwekar e4731baaf2 cpufreq: amd-pstate: Fix the inconsistency in max frequency units
The nominal frequency in cpudata is maintained in MHz whereas all other
frequencies are in KHz. This means we have to convert nominal frequency
value to KHz before we do any interaction with other frequency values.

In amd_pstate_set_boost(), this conversion from MHz to KHz is missed,
fix that.

Tested on a AMD Zen4 EPYC server

Before:
$ cat /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq | uniq
2151
$ cat /sys/devices/system/cpu/cpufreq/policy*/cpuinfo_min_freq | uniq
400000
$ cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq | uniq
2151
409422

After:
$ cat /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq | uniq
2151000
$ cat /sys/devices/system/cpu/cpufreq/policy*/cpuinfo_min_freq | uniq
400000
$ cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq | uniq
2151000
1799527

Fixes: ec437d71db ("cpufreq: amd-pstate: Introduce a new AMD P-State driver to support future processors")
Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
Acked-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Tested-by: Peter Jung <ptr1337@cachyos.org>
Cc: 5.17+ <stable@vger.kernel.org> # 5.17+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-05-28 22:03:11 +02:00
..
acpi-cpufreq.c cpufreq: acpi: Convert to platform remove callback returning void 2023-07-20 16:02:13 +05:30
amd-pstate-trace.c
amd-pstate-trace.h
amd-pstate-ut.c cpufreq: amd-pstate: remove global header file 2024-05-28 21:59:39 +02:00
amd-pstate.c cpufreq: amd-pstate: Fix the inconsistency in max frequency units 2024-05-28 22:03:11 +02:00
amd-pstate.h cpufreq: amd-pstate: remove global header file 2024-05-28 21:59:39 +02:00
amd_freq_sensitivity.c cpufreq: amd_freq_sensitivity: Add missing pci_dev_put() 2022-11-30 19:50:04 +01:00
apple-soc-cpufreq.c cpufreq: apple-soc: Fix an IS_ERR() vs NULL check 2023-03-01 19:34:54 +01:00
armada-8k-cpufreq.c cpufreq: armada-8k: Fix parameter type warning 2023-12-18 11:22:57 +05:30
armada-37xx-cpufreq.c cpufreq: Explicitly include correct DT includes 2023-07-20 16:01:57 +05:30
bmips-cpufreq.c cpufreq: bmips-cpufreq: Use module_init and add module_exit 2022-08-30 13:49:23 +05:30
brcmstb-avs-cpufreq.c cpufreq: brcmstb-avs-cpufreq: ISO C90 forbids mixed declarations 2024-04-25 10:36:40 +05:30
cppc_cpufreq.c cppc_cpufreq: Fix possible null pointer dereference 2024-04-19 11:59:16 +05:30
cpufreq-dt-platdev.c cpufreq: dt-platdev: eliminate uses of of_node_put() 2024-04-23 14:59:56 +05:30
cpufreq-dt.c cpufreq: dt: eliminate uses of of_node_put() 2024-04-23 14:59:56 +05:30
cpufreq-dt.h
cpufreq-nforce2.c
cpufreq.c Power management updates for 6.10-rc1 2024-05-14 13:19:15 -07:00
cpufreq_conservative.c cpufreq: conservative: Simplify the condition of storing 'down_threshold' 2023-10-06 21:55:13 +02:00
cpufreq_governor.c cpufreq: governor: Free dbs_data directly when gov->init() fails 2023-08-29 20:21:35 +02:00
cpufreq_governor.h
cpufreq_governor_attr_set.c
cpufreq_ondemand.c cpufreq: Remove references to 10ms min sampling rate 2024-02-24 15:02:33 +01:00
cpufreq_ondemand.h
cpufreq_performance.c
cpufreq_powersave.c
cpufreq_stats.c cpufreq: stats: Fix buffer overflow detection in trans_stats() 2023-10-24 22:02:06 +02:00
cpufreq_userspace.c cpufreq: userspace: Move is_managed indicator into per-policy structure 2023-10-06 22:01:26 +02:00
davinci-cpufreq.c cpufreq: davinci: Convert to platform remove callback returning void 2023-07-20 16:02:13 +05:30
e_powersaver.c
elanfreq.c
freq_table.c cpufreq: Fix up printing large CPU numbers and frequency values 2024-04-30 12:55:01 +02:00
gx-suspmod.c
highbank-cpufreq.c cpufreq: Add __init annotation to module init funcs 2022-09-26 11:15:04 +05:30
imx-cpufreq-dt.c cpufreq: imx-cpufreq-dt: Convert to platform remove callback returning void 2023-07-20 16:02:13 +05:30
imx6q-cpufreq.c cpufreq: imx6: use regmap to read ocotp register 2024-01-23 11:36:21 +05:30
intel_pstate.c cpufreq: intel_pstate: fix struct cpudata::epp_cached kernel-doc 2024-05-07 15:02:43 +02:00
Kconfig cpufreq: Move CPPC configs to common Kconfig and add RISC-V 2024-03-19 18:30:55 -07:00
Kconfig.arm RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
Kconfig.powerpc
Kconfig.x86 cpufreq: amd-pstate: Add a kernel config option to set default mode 2023-06-21 18:44:56 +02:00
kirkwood-cpufreq.c cpufreq: kirkwood: Convert to platform remove callback returning void 2023-07-20 16:02:13 +05:30
longhaul.c cpufreq: longhaul: Make array speeds static const 2022-11-03 19:13:34 +01:00
longhaul.h
longrun.c
loongson2_cpufreq.c
Makefile arch: Remove Itanium (IA-64) architecture 2023-09-11 08:13:17 +00:00
maple-cpufreq.c cpufreq: Adjust includes to remove of_device.h 2023-04-13 17:46:35 -05:00
mediatek-cpufreq-hw.c cpufreq: mediatek-hw: Don't error out if supply is not found 2024-01-29 10:34:17 +05:30
mediatek-cpufreq.c cpufreq: mediatek: Add support for MT7988A 2024-04-23 11:43:39 +05:30
mvebu-cpufreq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 2) 2022-06-10 14:51:35 +02:00
omap-cpufreq.c cpufreq: omap: Convert to platform remove callback returning void 2023-07-20 16:02:14 +05:30
p4-clockmod.c
pasemi-cpufreq.c
pcc-cpufreq.c cpufreq: pcc: Fix the potentinal scheduling delays in target_index() 2023-08-29 20:41:29 +02:00
pmac32-cpufreq.c powerpc: rename SPRN_HID2 define to SPRN_HID2_750FX 2024-05-08 00:25:00 +10:00
pmac64-cpufreq.c cpufreq: Adjust includes to remove of_device.h 2023-04-13 17:46:35 -05:00
powernow-k6.c
powernow-k7.c
powernow-k7.h
powernow-k8.c cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit() 2023-08-28 12:27:30 +05:30
powernow-k8.h
powernv-cpufreq.c
ppc_cbe_cpufreq.c cpufreq: Explicitly include correct DT includes 2023-07-20 16:01:57 +05:30
ppc_cbe_cpufreq.h
ppc_cbe_cpufreq_pervasive.c
ppc_cbe_cpufreq_pmi.c cpufreq: Explicitly include correct DT includes 2023-07-20 16:01:57 +05:30
pxa2xx-cpufreq.c cpufreq: pxa3: move clk register access to clk driver 2022-05-07 22:55:49 +02:00
pxa3xx-cpufreq.c cpufreq: pxa3: move clk register access to clk driver 2022-05-07 22:55:49 +02:00
qcom-cpufreq-hw.c sched/cpufreq: Rename arch_update_thermal_pressure() => arch_update_hw_pressure() 2024-04-24 12:08:01 +02:00
qcom-cpufreq-nvmem.c cpufreq: qcom-nvmem: Preserve PM domain votes in system suspend 2023-11-23 13:08:01 +05:30
qoriq-cpufreq.c cpufreq: qoriq: Convert to platform remove callback returning void 2023-07-20 16:02:13 +05:30
raspberrypi-cpufreq.c cpufreq: raspberrypi: Convert to platform remove callback returning void 2023-07-20 16:02:13 +05:30
s3c64xx-cpufreq.c
s5pv210-cpufreq.c
sa1110-cpufreq.c ARM: sa1100: remove unused board files 2023-01-12 10:53:12 +01:00
sc520_freq.c
scmi-cpufreq.c cpufreq: scmi: Enable boost support 2024-03-15 11:19:27 +05:30
scpi-cpufreq.c cpufreq: scpi: Convert to platform remove callback returning void 2023-07-20 16:02:12 +05:30
sh-cpufreq.c
sparc-us2e-cpufreq.c cpufreq: sparc: Don't mark cpufreq callbacks with __init 2023-07-12 12:45:18 +02:00
sparc-us3-cpufreq.c cpufreq: sparc: Don't mark cpufreq callbacks with __init 2023-07-12 12:45:18 +02:00
spear-cpufreq.c cpufreq: Adjust includes to remove of_device.h 2023-04-13 17:46:35 -05:00
speedstep-centrino.c
speedstep-ich.c
speedstep-lib.c
speedstep-lib.h
speedstep-smi.c
sti-cpufreq.c cpufreq: Explicitly include correct DT includes 2023-07-20 16:01:57 +05:30
sun50i-cpufreq-nvmem.c cpufreq: sun50i: fix error returns in dt_has_supported_hw() 2024-04-25 10:38:06 +05:30
tegra20-cpufreq.c Devicetree updates for v6.4, part 2: 2023-04-27 10:09:05 -07:00
tegra124-cpufreq.c cpupfreq: tegra124: eliminate uses of of_node_put() 2024-04-19 11:55:44 +05:30
tegra186-cpufreq.c cpufreq: tegra186: Convert to platform remove callback returning void 2023-07-20 16:02:13 +05:30
tegra194-cpufreq.c cpufreq: tegra194: remove redundant AND with cpu_online_mask 2023-10-10 11:06:03 +05:30
ti-cpufreq.c cpufreq: ti: Implement scope-based cleanup in ti_cpufreq_match_node() 2024-04-23 12:51:46 +05:30
vexpress-spc-cpufreq.c cpufreq: vexpress: Convert to platform remove callback returning void 2023-07-20 16:02:12 +05:30