Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/msr: Harmonize the prototype and definition of do_trace_rdpmc()

In <asm/msr.h> the first parameter of do_trace_rdpmc() is named 'msr':

extern void do_trace_rdpmc(unsigned int msr, u64 val, int failed);

But in the definition it's 'counter':

void do_trace_rdpmc(unsigned counter, u64 val, int failed)

Use 'msr' in both cases, and change the type to u32.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Juergen Gross <jgross@suse.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Xin Li <xin@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>

+4 -4
+2 -2
arch/x86/include/asm/msr.h
··· 65 65 DECLARE_TRACEPOINT(rdpmc); 66 66 extern void do_trace_write_msr(unsigned int msr, u64 val, int failed); 67 67 extern void do_trace_read_msr(unsigned int msr, u64 val, int failed); 68 - extern void do_trace_rdpmc(unsigned int msr, u64 val, int failed); 68 + extern void do_trace_rdpmc(u32 msr, u64 val, int failed); 69 69 #else 70 70 static inline void do_trace_write_msr(unsigned int msr, u64 val, int failed) {} 71 71 static inline void do_trace_read_msr(unsigned int msr, u64 val, int failed) {} 72 - static inline void do_trace_rdpmc(unsigned int msr, u64 val, int failed) {} 72 + static inline void do_trace_rdpmc(u32 msr, u64 val, int failed) {} 73 73 #endif 74 74 75 75 /*
+2 -2
arch/x86/lib/msr.c
··· 136 136 EXPORT_SYMBOL(do_trace_read_msr); 137 137 EXPORT_TRACEPOINT_SYMBOL(read_msr); 138 138 139 - void do_trace_rdpmc(unsigned counter, u64 val, int failed) 139 + void do_trace_rdpmc(u32 msr, u64 val, int failed) 140 140 { 141 - trace_rdpmc(counter, val, failed); 141 + trace_rdpmc(msr, val, failed); 142 142 } 143 143 EXPORT_SYMBOL(do_trace_rdpmc); 144 144 EXPORT_TRACEPOINT_SYMBOL(rdpmc);