Archive-only list for patches
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev,
	Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>,
	Mario Limonciello <mario.limonciello@amd.com>,
	"Gautham R. Shenoy" <gautham.shenoy@amd.com>,
	Peter Jung <ptr1337@cachyos.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: [PATCH 6.1 59/85] cpufreq: amd-pstate: Fix the inconsistency in max frequency units
Date: Thu, 13 Jun 2024 13:35:57 +0200	[thread overview]
Message-ID: <20240613113216.415839529@linuxfoundation.org> (raw)
In-Reply-To: <20240613113214.134806994@linuxfoundation.org>

6.1-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>

commit e4731baaf29438508197d3a8a6d4f5a8c51663f8 upstream.

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: ec437d71db77 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/cpufreq/amd-pstate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -424,7 +424,7 @@ static int amd_pstate_set_boost(struct c
 	if (state)
 		policy->cpuinfo.max_freq = cpudata->max_freq;
 	else
-		policy->cpuinfo.max_freq = cpudata->nominal_freq;
+		policy->cpuinfo.max_freq = cpudata->nominal_freq * 1000;
 
 	policy->max = policy->cpuinfo.max_freq;
 



  parent reply	other threads:[~2024-06-13 12:51 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 11:34 [PATCH 6.1 00/85] 6.1.94-rc1 review Greg Kroah-Hartman
2024-06-13 11:34 ` [PATCH 6.1 01/85] drm: Check output polling initialized before disabling Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 02/85] drm: Check polling initialized before enabling in drm_helper_probe_single_connector_modes Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 03/85] Bluetooth: btrtl: Add missing MODULE_FIRMWARE declarations Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 04/85] maple_tree: fix allocation in mas_sparse_area() Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 05/85] maple_tree: fix mas_empty_area_rev() null pointer dereference Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 06/85] mmc: core: Do not force a retune before RPMB switch Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 07/85] afs: Dont cross .backup mountpoint from backup volume Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 08/85] riscv: signal: handle syscall restart before get_signal Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 09/85] nilfs2: fix use-after-free of timer for log writer thread Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 10/85] drm/i915/audio: Fix audio time stamp programming for DP Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 11/85] mptcp: avoid some duplicate code in socket option handling Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 12/85] mptcp: cleanup SOL_TCP handling Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 13/85] mptcp: fix full TCP keep-alive support Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 14/85] vxlan: Fix regression when dropping packets due to invalid src addresses Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 15/85] scripts/gdb: fix SB_* constants parsing Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 16/85] f2fs: fix to do sanity check on i_xattr_nid in sanity_check_inode() Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 17/85] media: lgdt3306a: Add a check against null-pointer-def Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 18/85] drm/amdgpu: add error handle to avoid out-of-bounds Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 19/85] bcache: fix variable length array abuse in btree_iter Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 20/85] wifi: rtw89: correct aSIFSTime for 6GHz band Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 21/85] ata: pata_legacy: make legacy_exit() work again Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 22/85] thermal/drivers/qcom/lmh: Check for SCM availability at probe Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 23/85] soc: qcom: rpmh-rsc: Enhance check for VRM in-flight request Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 24/85] ACPI: resource: Do IRQ override on TongFang GXxHRXx and GMxHGxx Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 25/85] arm64: tegra: Correct Tegra132 I2C alias Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 26/85] arm64: dts: qcom: qcs404: fix bluetooth device address Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 27/85] md/raid5: fix deadlock that raid5d() wait for itself to clear MD_SB_CHANGE_PENDING Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 28/85] wifi: rtw89: pci: correct TX resource checking for PCI DMA channel of firmware command Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 29/85] wifi: rtl8xxxu: Fix the TX power of RTL8192CU, RTL8723AU Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 30/85] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 31/85] wifi: rtlwifi: rtl8192de: Fix low speed with WPA3-SAE Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 32/85] wifi: rtlwifi: rtl8192de: Fix endianness issue in RX path Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 33/85] arm64: dts: hi3798cv200: fix the size of GICR Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 34/85] media: mc: Fix graph walk in media_pipeline_start Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 35/85] media: mc: mark the media devnode as registered from the, start Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 36/85] media: mxl5xx: Move xpt structures off stack Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 37/85] media: v4l2-core: hold videodev_lock until dev reg, finishes Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 38/85] mmc: core: Add mmc_gpiod_set_cd_config() function Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 39/85] mmc: sdhci: Add support for "Tuning Error" interrupts Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 40/85] mmc: sdhci-acpi: Sort DMI quirks alphabetically Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 41/85] mmc: sdhci-acpi: Fix Lenovo Yoga Tablet 2 Pro 1380 sdcard slot not working Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 42/85] mmc: sdhci-acpi: Disable write protect detection on Toshiba WT10-A Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 43/85] mmc: sdhci-acpi: Add quirk to enable pull-up on the card-detect GPIO on Asus T100TA Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 44/85] fbdev: savage: Handle err return when savagefb_check_var failed Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 45/85] drm/amdgpu/atomfirmware: add intergrated info v2.3 table Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 46/85] 9p: add missing locking around taking dentry fid list Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 47/85] drm/amd: Fix shutdown (again) on some SMU v13.0.4/11 platforms Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 48/85] KVM: arm64: Fix AArch32 register narrowing on userspace write Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 49/85] KVM: arm64: Allow AArch32 PSTATE.M to be restored as System mode Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 50/85] KVM: arm64: AArch32: Fix spurious trapping of conditional instructions Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 51/85] crypto: ecdsa - Fix module auto-load on add-key Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 52/85] crypto: ecrdsa - Fix module auto-load on add_key Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 53/85] crypto: qat - Fix ADF_DEV_RESET_SYNC memory leak Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 54/85] mm: fix race between __split_huge_pmd_locked() and GUP-fast Greg Kroah-Hartman
2024-06-24  8:39   ` Ryan Roberts
2024-06-13 11:35 ` [PATCH 6.1 55/85] scsi: core: Handle devices which return an unusually large VPD page count Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 56/85] net/ipv6: Fix route deleting failure when metric equals 0 Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 57/85] net/9p: fix uninit-value in p9_client_rpc() Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 58/85] kmsan: do not wipe out origin when doing partial unpoisoning Greg Kroah-Hartman
2024-06-13 11:35 ` Greg Kroah-Hartman [this message]
2024-06-13 11:35 ` [PATCH 6.1 60/85] intel_th: pci: Add Meteor Lake-S CPU support Greg Kroah-Hartman
2024-06-13 11:35 ` [PATCH 6.1 61/85] sparc64: Fix number of online CPUs Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 62/85] mm/cma: drop incorrect alignment check in cma_init_reserved_mem Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 63/85] mm/hugetlb: pass correct order_per_bit to cma_declare_contiguous_nid Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 64/85] watchdog: rti_wdt: Set min_hw_heartbeat_ms to accommodate a safety margin Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 65/85] kdb: Fix buffer overflow during tab-complete Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 66/85] kdb: Use format-strings rather than \0 injection in kdb_read() Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 67/85] kdb: Fix console handling when editing and tab-completing commands Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 68/85] kdb: Merge identical case statements in kdb_read() Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 69/85] kdb: Use format-specifiers rather than memset() for padding " Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 70/85] net: fix __dst_negative_advice() race Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 71/85] sparc: move struct termio to asm/termios.h Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 72/85] ext4: set type of ac_groups_linear_remaining to __u32 to avoid overflow Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 73/85] ext4: fix mb_cache_entrys e_refcnt leak in ext4_xattr_block_cache_find() Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 74/85] parisc: Define HAVE_ARCH_HUGETLB_UNMAPPED_AREA Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 75/85] parisc: Define sigset_t in parisc uapi header Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 76/85] s390/ap: Fix crash in AP internal function modify_bitmap() Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 77/85] s390/cpacf: Split and rework cpacf query functions Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 78/85] s390/cpacf: Make use of invalid opcode produce a link error Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 79/85] i3c: master: svc: fix invalidate IBI type and miss call client IBI handler Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 80/85] EDAC/igen6: Convert PCIBIOS_* return codes to errnos Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 81/85] nfs: fix undefined behavior in nfs_block_bits() Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 82/85] NFS: Fix READ_PLUS when server doesnt support OP_READ_PLUS Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 83/85] btrfs: fix crash on racing fsync and size-extending write into prealloc Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 84/85] powerpc/bpf: enforce full ordering for ATOMIC operations with BPF_FETCH Greg Kroah-Hartman
2024-06-13 11:36 ` [PATCH 6.1 85/85] smb: client: fix deadlock in smb2_find_smb_tcon() Greg Kroah-Hartman
2024-06-13 16:49 ` [PATCH 6.1 00/85] 6.1.94-rc1 review SeongJae Park
2024-06-13 17:43 ` Guenter Roeck
2024-06-15 11:09   ` Greg Kroah-Hartman
2024-06-14  9:35 ` Pavel Machek
2024-06-14 10:17 ` Naresh Kamboju
2024-06-14 12:00 ` Ron Economos
2024-06-14 14:14 ` Mark Brown
2024-06-14 17:03 ` Jon Hunter
2024-06-14 23:21 ` Peter Schneider
2024-06-15  2:09 ` Shuah Khan
2024-06-15 13:19 ` Mateusz Jończyk
2024-06-16 13:18 ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240613113216.415839529@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=Dhananjay.Ugwekar@amd.com \
    --cc=gautham.shenoy@amd.com \
    --cc=mario.limonciello@amd.com \
    --cc=patches@lists.linux.dev \
    --cc=ptr1337@cachyos.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox