Skip to contentSkip to conversation

msr: replace rdmsr()/wrmsr() in comments

PATCH New Juergen Gross 2 participants 2 messages Nov 24

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 msr: replace rdmsr()/wrmsr() in comments

Replace all mentioning of rdmsr() and wrmsr() in comments with rdmsrq() and wrmsrq(), as the former functions are no longer existing.

In drivers/hwmon/coretemp.c drop mentioning rdmsr/wrmsr, as the comment was incorrect in this regard.

---
To be applied on top of current core/msr branch of the tip tree. V2:
- drop comment in drivers/hwmon/coretemp.c (Asaf Nuri Bertizlioglu)

---
 Documentation/arch/x86/microcode.rst  | 2 +-
 arch/x86/events/amd/ibs.c             | 2 +-
 arch/x86/events/intel/core.c          | 2 +-
 arch/x86/events/intel/lbr.c           | 6 +++---
 arch/x86/include/asm/shared/msr.h     | 2 +-
 arch/x86/kernel/cpu/feat_ctl.c        | 2 +-
 drivers/hwmon/coretemp.c              | 3 +--
 drivers/platform/x86/intel/ifs/load.c | 5 +++--
 8 files changed, 12 insertions(+), 12 deletions(-)
Documentation/arch/x86/microcode.rst +1 -1
index b627c6f36bcf..df1fb2c82333 100644
@@ -151,7 +151,7 @@ are also treated as fatal by the kernel.
 On certain Intel machines, MCEs are also broadcast to all threads in a
 system. If one thread is in the middle of executing WRMSR, a MCE will be
 taken at the end of the flow. Either way, they will wait for the thread
-performing the wrmsr(0x79) to rendezvous in the MCE handler and shutdown
+performing the wrmsrq(0x79) to rendezvous in the MCE handler and shutdown
 eventually if any of the threads in the system fail to check in to the
 MCE rendezvous.
 
arch/x86/events/amd/ibs.c +1 -1
index f43949bde19c..2ef0530b6561 100644
@@ -591,7 +591,7 @@ static void perf_ibs_start(struct perf_event *event, int flags)
 		 *  o Set VAL bit            CTL2[Dis] = 1
 		 *  o Raise NMI --.        o ...
 		 *                 \       o ->start()
-		 *                  \        wrmsr(IBS_{FETCH|OP}_CTL, new value);
+		 *                  \        wrmsrq(IBS_{FETCH|OP}_CTL, new value);
 		 *                   \       (wrmsr clears the VAL bit)
 		 *                    `--> o Receives delayed NMI
 		 *                           (Unknown NMI since VAL bit is cleared)
arch/x86/events/intel/core.c +1 -1
index 96bcbf823aec..1b6213ef2ced 100644
@@ -6963,7 +6963,7 @@ static bool check_msr(unsigned long msr, u64 mask)
 		return false;
 
 	/*
-	 * Quirk only affects validation in wrmsr(), so wrmsrq()'s value
+	 * Quirk only affects validation in wrmsrq(), so wrmsrq()'s value
 	 * should equal rdmsrq()'s even with the quirk.
 	 */
 	if (val_new != val_tmp)
arch/x86/events/intel/lbr.c +3 -3
index beac04502b73..760d5e465a56 100644
@@ -222,7 +222,7 @@ enum {
  * are the TSX flags when TSX is supported, but when TSX is not supported
  * they have no consistent behavior:
  *
- *   - For wrmsr(), bits 61:62 are considered part of the sign extension.
+ *   - For wrmsrq(), bits 61:62 are considered part of the sign extension.
  *   - For HW updates (branch captures) bits 61:62 are always OFF and are not
  *     part of the sign extension.
  *
@@ -231,8 +231,8 @@ enum {
  *   1) LBR format LBR_FORMAT_EIP_FLAGS2
  *   2) CPU has no TSX support enabled
  *
- * ... then any value passed to wrmsr() must be sign extended to 63 bits and any
- * value from rdmsr() must be converted to have a 61 bits sign extension,
+ * ... then any value passed to wrmsrq() must be sign extended to 63 bits and
+ * any value from rdmsrq() must be converted to have a 61 bits sign extension,
  * ignoring the TSX flags.
  */
 static inline bool lbr_from_signext_quirk_needed(void)
arch/x86/include/asm/shared/msr.h +1 -1
index a20b1c08c99f..c46188ca5403 100644
@@ -13,7 +13,7 @@ struct msr {
 };
 
 /*
- * The kernel proper already defines rdmsr()/wrmsr(), but they are not for the
+ * The kernel proper already defines rdmsrq()/wrmsrq(), but they are not for the
  * boot kernel since they rely on tracepoint/exception handling infrastructure
  * that's not available here.
  */
arch/x86/kernel/cpu/feat_ctl.c +1 -1
index 7228fc2bb43e..0c10b1f35270 100644
@@ -36,7 +36,7 @@ static void init_vmx_capabilities(struct cpuinfo_x86 *c)
 	 * features that can be turned off.  Ignore the allowed-0 settings,
 	 * if a feature can be turned on then it's supported.
 	 *
-	 * Use raw rdmsr() for primary processor controls and pin controls MSRs
+	 * Use raw rdmsrq() for primary processor controls and pin controls MSRs
 	 * as they exist on any CPU that supports VMX, i.e. we want the WARN if
 	 * the RDMSR faults.
 	 */
drivers/hwmon/coretemp.c +1 -2
index 96d57fe12de6..ad5e8f40ad0c 100644
@@ -66,8 +66,7 @@ enum coretemp_attr_index {
  *		IA32_TEMPERATURE_TARGET MSR.
  * @last_updated: The time when the current temperature value was updated
  *		earlier (in jiffies).
- * @cpu_core_id: The CPU Core from which temperature values should be read
- *		This value is passed as "id" field to rdmsr/wrmsr functions.
+ * @cpu_core_id: The CPU Core from which temperature values should be read.
  * @status_reg: One of IA32_THERM_STATUS or IA32_PACKAGE_THERM_STATUS,
  *		from where the temperature values should be read.
  * @attr_size:  Number of sysfs attributes in this temperature data group.
drivers/platform/x86/intel/ifs/load.c +3 -2
index 6320a0e45d38..74041a3410c3 100644
@@ -110,8 +110,9 @@ static void auth_err_message(struct device *dev, u32 err_code)
 /*
  * To copy scan hashes and authenticate test chunks, the initiating cpu must point
  * to the EDX:EAX to the test image in linear address.
- * Run wrmsr(MSR_COPY_SCAN_HASHES) for scan hash copy and run wrmsr(MSR_AUTHENTICATE_AND_COPY_CHUNK)
- * for scan hash copy and test chunk authentication.
+ * Run wrmsrq(MSR_COPY_SCAN_HASHES) for scan hash copy and run
+ * wrmsrq(MSR_AUTHENTICATE_AND_COPY_CHUNK) for scan hash copy and test chunk
+ * authentication.
  */
 static void copy_hashes_authenticate_chunks(struct work_struct *work)
 {
Signature · 1 line
2.56.0
#1 lore raw
Sashiko has reviewed this patch and found no issues.
Quoted 8 lines

Replace all mentioning of rdmsr() and wrmsr() in comments with rdmsrq() and wrmsrq(), as the former functions are no longer existing.

In drivers/hwmon/coretemp.c drop mentioning rdmsr/wrmsr, as the comment was incorrect in this regard.

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1