From: Ingo Molnar <mingo@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>,
"H . Peter Anvin" <hpa@zytor.com>,
Dave Hansen <dave.hansen@intel.com>, Xin Li <xin@zytor.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Borislav Petkov <bp@alien8.de>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>
Subject: [PATCH 00/20] x86 MSR in-kernel API type cleanup and rename
Date: Wed, 9 Apr 2025 22:28:47 +0200 [thread overview]
Message-ID: <20250409202907.3419480-1-mingo@kernel.org> (raw)
H. Peter Anvin recently observed that the rdmsrl*()/wrmsrl*() APIs
are historic misnomers and are actively misleading: the 'l' suffix
suggests a 32-bit nature, while all these APIs are fixed 64-bit,
for which we use the 'q' suffix.
Make the names reflect that, by renaming them to rdmsrq*()/wrmsrq*().
Also clean up the types to u32 and u64 in <asm/msr.h> and affected code,
from a hodgepodge of equivalent integer types, to indicate that these
are all hardware ABI derived types.
The Git tree with these commits can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git WIP.x86/msr
Thanks,
Ingo
==================>
Ingo Molnar (20):
x86/msr: Standardize on u64 in <asm/msr.h>
x86/msr: Standardize on u64 in <asm/msr-index.h>
x86/msr: Use u64 in rdmsrl_amd_safe() and wrmsrl_amd_safe()
x86/msr: Use u64 in rdmsrl_safe() and paravirt_read_pmc()
x86/msr: Harmonize the prototype and definition of do_trace_rdpmc()
x86/msr: Standardize on 'u32' MSR indices in <asm/msr.h>
x86/msr: Rename 'rdmsrl()' to 'rdmsrq()'
x86/msr: Rename 'wrmsrl()' to 'wrmsrq()'
x86/msr: Rename 'rdmsrl_safe()' to 'rdmsrq_safe()'
x86/msr: Rename 'wrmsrl_safe()' to 'wrmsrq_safe()'
x86/msr: Rename 'rdmsrl_safe_on_cpu()' to 'rdmsrq_safe_on_cpu()'
x86/msr: Rename 'wrmsrl_safe_on_cpu()' to 'wrmsrq_safe_on_cpu()'
x86/msr: Rename 'rdmsrl_on_cpu()' to 'rdmsrq_on_cpu()'
x86/msr: Rename 'wrmsrl_on_cpu()' to 'wrmsrq_on_cpu()'
x86/msr: Rename 'mce_rdmsrl()' to 'mce_rdmsrq()'
x86/msr: Rename 'mce_wrmsrl()' to 'mce_wrmsrq()'
x86/msr: Rename 'rdmsrl_amd_safe()' to 'rdmsrq_amd_safe()'
x86/msr: Rename 'wrmsrl_amd_safe()' to 'wrmsrq_amd_safe()'
x86/msr: Rename 'native_wrmsrl()' to 'native_wrmsrq()'
x86/msr: Rename 'wrmsrl_cstar()' to 'wrmsrq_cstar()'
arch/x86/coco/sev/core.c | 2 +-
arch/x86/events/amd/brs.c | 8 +-
arch/x86/events/amd/core.c | 12 +--
arch/x86/events/amd/ibs.c | 26 ++---
arch/x86/events/amd/lbr.c | 20 ++--
arch/x86/events/amd/power.c | 10 +-
arch/x86/events/amd/uncore.c | 12 +--
arch/x86/events/core.c | 42 ++++----
arch/x86/events/intel/core.c | 66 ++++++-------
arch/x86/events/intel/cstate.c | 2 +-
arch/x86/events/intel/ds.c | 10 +-
arch/x86/events/intel/knc.c | 16 +--
arch/x86/events/intel/lbr.c | 44 ++++-----
arch/x86/events/intel/p4.c | 24 ++---
arch/x86/events/intel/p6.c | 12 +--
arch/x86/events/intel/pt.c | 32 +++---
arch/x86/events/intel/uncore.c | 2 +-
arch/x86/events/intel/uncore_discovery.c | 10 +-
arch/x86/events/intel/uncore_nhmex.c | 70 ++++++-------
arch/x86/events/intel/uncore_snb.c | 42 ++++----
arch/x86/events/intel/uncore_snbep.c | 50 +++++-----
arch/x86/events/msr.c | 2 +-
arch/x86/events/perf_event.h | 26 ++---
arch/x86/events/probe.c | 2 +-
arch/x86/events/rapl.c | 8 +-
arch/x86/events/zhaoxin/core.c | 16 +--
arch/x86/hyperv/hv_apic.c | 4 +-
arch/x86/hyperv/hv_init.c | 66 ++++++-------
arch/x86/hyperv/hv_spinlock.c | 6 +-
arch/x86/hyperv/ivm.c | 2 +-
arch/x86/include/asm/apic.h | 8 +-
arch/x86/include/asm/debugreg.h | 4 +-
arch/x86/include/asm/fsgsbase.h | 4 +-
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/include/asm/microcode.h | 2 +-
arch/x86/include/asm/msr-index.h | 12 +--
arch/x86/include/asm/msr.h | 73 +++++++-------
arch/x86/include/asm/paravirt.h | 8 +-
arch/x86/include/asm/spec-ctrl.h | 2 +-
arch/x86/kernel/acpi/cppc.c | 8 +-
arch/x86/kernel/amd_nb.c | 2 +-
arch/x86/kernel/apic/apic.c | 16 +--
arch/x86/kernel/apic/apic_numachip.c | 6 +-
arch/x86/kernel/cet.c | 2 +-
arch/x86/kernel/cpu/amd.c | 28 +++---
arch/x86/kernel/cpu/aperfmperf.c | 28 +++---
arch/x86/kernel/cpu/bugs.c | 24 ++---
arch/x86/kernel/cpu/bus_lock.c | 18 ++--
arch/x86/kernel/cpu/common.c | 68 ++++++-------
arch/x86/kernel/cpu/feat_ctl.c | 4 +-
arch/x86/kernel/cpu/hygon.c | 6 +-
arch/x86/kernel/cpu/intel.c | 10 +-
arch/x86/kernel/cpu/intel_epb.c | 12 +--
arch/x86/kernel/cpu/mce/amd.c | 22 ++---
arch/x86/kernel/cpu/mce/core.c | 58 +++++------
arch/x86/kernel/cpu/mce/inject.c | 32 +++---
arch/x86/kernel/cpu/mce/intel.c | 32 +++---
arch/x86/kernel/cpu/mce/internal.h | 2 +-
arch/x86/kernel/cpu/microcode/amd.c | 2 +-
arch/x86/kernel/cpu/microcode/intel.c | 2 +-
arch/x86/kernel/cpu/mshyperv.c | 12 +--
arch/x86/kernel/cpu/resctrl/core.c | 10 +-
arch/x86/kernel/cpu/resctrl/monitor.c | 2 +-
arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 2 +-
arch/x86/kernel/cpu/resctrl/rdtgroup.c | 6 +-
arch/x86/kernel/cpu/sgx/main.c | 2 +-
arch/x86/kernel/cpu/topology.c | 2 +-
arch/x86/kernel/cpu/topology_amd.c | 4 +-
arch/x86/kernel/cpu/tsx.c | 20 ++--
arch/x86/kernel/cpu/umwait.c | 2 +-
arch/x86/kernel/fpu/core.c | 2 +-
arch/x86/kernel/fpu/xstate.c | 10 +-
arch/x86/kernel/fpu/xstate.h | 2 +-
arch/x86/kernel/fred.c | 20 ++--
arch/x86/kernel/hpet.c | 2 +-
arch/x86/kernel/kvm.c | 28 +++---
arch/x86/kernel/kvmclock.c | 4 +-
arch/x86/kernel/mmconf-fam10h_64.c | 8 +-
arch/x86/kernel/process.c | 16 +--
arch/x86/kernel/process_64.c | 20 ++--
arch/x86/kernel/reboot_fixups_32.c | 2 +-
arch/x86/kernel/shstk.c | 18 ++--
arch/x86/kernel/traps.c | 10 +-
arch/x86/kernel/tsc.c | 2 +-
arch/x86/kernel/tsc_sync.c | 14 +--
arch/x86/kvm/svm/avic.c | 2 +-
arch/x86/kvm/svm/sev.c | 2 +-
arch/x86/kvm/svm/svm.c | 16 +--
arch/x86/kvm/vmx/nested.c | 4 +-
arch/x86/kvm/vmx/pmu_intel.c | 4 +-
arch/x86/kvm/vmx/sgx.c | 8 +-
arch/x86/kvm/vmx/vmx.c | 66 ++++++-------
arch/x86/kvm/x86.c | 38 ++++----
arch/x86/lib/insn-eval.c | 6 +-
arch/x86/lib/msr-smp.c | 16 +--
arch/x86/lib/msr.c | 12 +--
arch/x86/mm/pat/memtype.c | 4 +-
arch/x86/mm/tlb.c | 2 +-
arch/x86/pci/amd_bus.c | 10 +-
arch/x86/platform/olpc/olpc-xo1-rtc.c | 6 +-
arch/x86/platform/olpc/olpc-xo1-sci.c | 2 +-
arch/x86/power/cpu.c | 26 ++---
arch/x86/realmode/init.c | 2 +-
arch/x86/virt/svm/sev.c | 20 ++--
arch/x86/xen/suspend.c | 6 +-
drivers/acpi/acpi_extlog.c | 2 +-
drivers/acpi/acpi_lpit.c | 2 +-
drivers/cpufreq/acpi-cpufreq.c | 8 +-
drivers/cpufreq/amd-pstate-ut.c | 6 +-
drivers/cpufreq/amd-pstate.c | 22 ++---
drivers/cpufreq/amd_freq_sensitivity.c | 2 +-
drivers/cpufreq/e_powersaver.c | 6 +-
drivers/cpufreq/intel_pstate.c | 108 ++++++++++-----------
drivers/cpufreq/longhaul.c | 24 ++---
drivers/cpufreq/powernow-k7.c | 14 +--
drivers/crypto/ccp/sev-dev.c | 2 +-
drivers/edac/amd64_edac.c | 6 +-
drivers/gpu/drm/i915/selftests/librapl.c | 4 +-
drivers/hwmon/fam15h_power.c | 6 +-
drivers/idle/intel_idle.c | 34 +++----
drivers/mtd/nand/raw/cs553x_nand.c | 6 +-
drivers/platform/x86/intel/ifs/core.c | 4 +-
drivers/platform/x86/intel/ifs/load.c | 20 ++--
drivers/platform/x86/intel/ifs/runtest.c | 16 +--
drivers/platform/x86/intel/pmc/cnp.c | 6 +-
drivers/platform/x86/intel/pmc/core.c | 8 +-
.../x86/intel/speed_select_if/isst_if_common.c | 18 ++--
.../x86/intel/speed_select_if/isst_if_mbox_msr.c | 14 +--
.../x86/intel/speed_select_if/isst_tpmi_core.c | 2 +-
drivers/platform/x86/intel/tpmi_power_domains.c | 4 +-
drivers/platform/x86/intel/turbo_max_3.c | 4 +-
.../x86/intel/uncore-frequency/uncore-frequency.c | 10 +-
drivers/platform/x86/intel_ips.c | 36 +++----
drivers/powercap/intel_rapl_msr.c | 6 +-
.../int340x_thermal/processor_thermal_device.c | 2 +-
drivers/thermal/intel/intel_hfi.c | 14 +--
drivers/thermal/intel/intel_powerclamp.c | 4 +-
drivers/thermal/intel/intel_tcc_cooling.c | 4 +-
drivers/thermal/intel/therm_throt.c | 10 +-
drivers/video/fbdev/geode/gxfb_core.c | 2 +-
drivers/video/fbdev/geode/lxfb_ops.c | 22 ++---
drivers/video/fbdev/geode/suspend_gx.c | 10 +-
drivers/video/fbdev/geode/video_gx.c | 16 +--
include/hyperv/hvgdk_mini.h | 2 +-
144 files changed, 1049 insertions(+), 1050 deletions(-)
--
2.45.2
next reply other threads:[~2025-04-09 20:29 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 20:28 Ingo Molnar [this message]
2025-04-09 20:28 ` [PATCH 01/20] x86/msr: Standardize on u64 in <asm/msr.h> Ingo Molnar
2025-04-09 20:28 ` [PATCH 02/20] x86/msr: Standardize on u64 in <asm/msr-index.h> Ingo Molnar
2025-04-09 20:28 ` [PATCH 03/20] x86/msr: Use u64 in rdmsrl_amd_safe() and wrmsrl_amd_safe() Ingo Molnar
2025-04-09 20:28 ` [PATCH 04/20] x86/msr: Use u64 in rdmsrl_safe() and paravirt_read_pmc() Ingo Molnar
2025-04-09 20:28 ` [PATCH 05/20] x86/msr: Harmonize the prototype and definition of do_trace_rdpmc() Ingo Molnar
2025-04-09 20:28 ` [PATCH 06/20] x86/msr: Standardize on 'u32' MSR indices in <asm/msr.h> Ingo Molnar
2025-04-09 21:55 ` Xin Li
2025-04-10 1:37 ` H. Peter Anvin
2025-04-10 3:18 ` Xin Li
2025-04-10 3:29 ` H. Peter Anvin
2025-04-10 3:53 ` Xin Li
2025-04-10 6:14 ` H. Peter Anvin
2025-04-10 6:34 ` Xin Li
2025-04-10 6:36 ` H. Peter Anvin
2025-04-10 7:48 ` Peter Zijlstra
2025-04-10 8:53 ` H. Peter Anvin
2025-04-10 17:45 ` Xin Li
2025-04-10 6:39 ` Ingo Molnar
2025-04-10 6:52 ` Xin Li
2025-04-10 7:00 ` H. Peter Anvin
2025-04-09 20:28 ` [PATCH 07/20] x86/msr: Rename 'rdmsrl()' to 'rdmsrq()' Ingo Molnar
2025-04-09 20:28 ` [PATCH 08/20] x86/msr: Rename 'wrmsrl()' to 'wrmsrq()' Ingo Molnar
2025-04-09 20:28 ` [PATCH 09/20] x86/msr: Rename 'rdmsrl_safe()' to 'rdmsrq_safe()' Ingo Molnar
2025-04-09 20:28 ` [PATCH 10/20] x86/msr: Rename 'wrmsrl_safe()' to 'wrmsrq_safe()' Ingo Molnar
2025-04-09 20:28 ` [PATCH 11/20] x86/msr: Rename 'rdmsrl_safe_on_cpu()' to 'rdmsrq_safe_on_cpu()' Ingo Molnar
2025-04-09 20:28 ` [PATCH 12/20] x86/msr: Rename 'wrmsrl_safe_on_cpu()' to 'wrmsrq_safe_on_cpu()' Ingo Molnar
2025-04-09 20:29 ` [PATCH 13/20] x86/msr: Rename 'rdmsrl_on_cpu()' to 'rdmsrq_on_cpu()' Ingo Molnar
2025-04-09 20:29 ` [PATCH 14/20] x86/msr: Rename 'wrmsrl_on_cpu()' to 'wrmsrq_on_cpu()' Ingo Molnar
2025-04-09 20:29 ` [PATCH 15/20] x86/msr: Rename 'mce_rdmsrl()' to 'mce_rdmsrq()' Ingo Molnar
2025-04-09 20:29 ` [PATCH 16/20] x86/msr: Rename 'mce_wrmsrl()' to 'mce_wrmsrq()' Ingo Molnar
2025-04-09 20:29 ` [PATCH 17/20] x86/msr: Rename 'rdmsrl_amd_safe()' to 'rdmsrq_amd_safe()' Ingo Molnar
2025-04-09 20:29 ` [PATCH 18/20] x86/msr: Rename 'wrmsrl_amd_safe()' to 'wrmsrq_amd_safe()' Ingo Molnar
2025-04-09 20:29 ` [PATCH 19/20] x86/msr: Rename 'native_wrmsrl()' to 'native_wrmsrq()' Ingo Molnar
2025-04-09 20:29 ` [PATCH 20/20] x86/msr: Rename 'wrmsrl_cstar()' to 'wrmsrq_cstar()' Ingo Molnar
2025-04-10 7:31 ` [PATCH 00/20] x86 MSR in-kernel API type cleanup and rename Peter Zijlstra
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=20250409202907.3419480-1-mingo@kernel.org \
--to=mingo@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=xin@zytor.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.