Skip to content

Commit 08dd8cd

Browse files
dagrhKAGA-KOKO
authored andcommitted
x86/msr: Use the proper trace point conditional for writes
The msr tracing for writes is incorrectly conditional on the read trace. Fixes: 7f47d8c "x86, tracing, perf: Add trace point for MSR accesses" Signed-off-by: Dr. David Alan Gilbert <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
1 parent af8c34c commit 08dd8cd

File tree

1 file changed

+2
-2
lines changed
  • arch/x86/include/asm

1 file changed

+2
-2
lines changed

arch/x86/include/asm/msr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ notrace static inline void native_write_msr(unsigned int msr,
122122
"2:\n"
123123
_ASM_EXTABLE_HANDLE(1b, 2b, ex_handler_wrmsr_unsafe)
124124
: : "c" (msr), "a"(low), "d" (high) : "memory");
125-
if (msr_tracepoint_active(__tracepoint_read_msr))
125+
if (msr_tracepoint_active(__tracepoint_write_msr))
126126
do_trace_write_msr(msr, ((u64)high << 32 | low), 0);
127127
}
128128

@@ -141,7 +141,7 @@ notrace static inline int native_write_msr_safe(unsigned int msr,
141141
: "c" (msr), "0" (low), "d" (high),
142142
[fault] "i" (-EIO)
143143
: "memory");
144-
if (msr_tracepoint_active(__tracepoint_read_msr))
144+
if (msr_tracepoint_active(__tracepoint_write_msr))
145145
do_trace_write_msr(msr, ((u64)high << 32 | low), err);
146146
return err;
147147
}

0 commit comments

Comments
 (0)