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

x86/msr: Rename DECLARE_ARGS() to EAX_EDX_DECLARE_ARGS

DECLARE_ARGS() is way too generic of a name that says very little about
why these args are declared in that fashion - use the EAX_EDX_ prefix
to create a common prefix between the three helper methods:

EAX_EDX_DECLARE_ARGS()
EAX_EDX_VAL()
EAX_EDX_RET()

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Uros Bizjak <ubizjak@gmail.com>
Cc: linux-kernel@vger.kernel.org

Ingo Molnar c9d8ea9d 76deb545

+8 -8
+7 -7
arch/x86/include/asm/msr.h
··· 46 46 * clearing the high half of 'low': 47 47 */ 48 48 #ifdef CONFIG_X86_64 49 - # define DECLARE_ARGS(val, low, high) unsigned long low, high 49 + # define EAX_EDX_DECLARE_ARGS(val, low, high) unsigned long low, high 50 50 # define EAX_EDX_VAL(val, low, high) ((low) | (high) << 32) 51 51 # define EAX_EDX_RET(val, low, high) "=a" (low), "=d" (high) 52 52 #else 53 - # define DECLARE_ARGS(val, low, high) u64 val 53 + # define EAX_EDX_DECLARE_ARGS(val, low, high) u64 val 54 54 # define EAX_EDX_VAL(val, low, high) (val) 55 55 # define EAX_EDX_RET(val, low, high) "=A" (val) 56 56 #endif ··· 83 83 */ 84 84 static __always_inline u64 __rdmsr(u32 msr) 85 85 { 86 - DECLARE_ARGS(val, low, high); 86 + EAX_EDX_DECLARE_ARGS(val, low, high); 87 87 88 88 asm volatile("1: rdmsr\n" 89 89 "2:\n" ··· 129 129 130 130 static inline u64 native_read_msr_safe(u32 msr, int *err) 131 131 { 132 - DECLARE_ARGS(val, low, high); 132 + EAX_EDX_DECLARE_ARGS(val, low, high); 133 133 134 134 asm volatile("1: rdmsr ; xor %[err],%[err]\n" 135 135 "2:\n\t" ··· 182 182 */ 183 183 static __always_inline u64 rdtsc(void) 184 184 { 185 - DECLARE_ARGS(val, low, high); 185 + EAX_EDX_DECLARE_ARGS(val, low, high); 186 186 187 187 asm volatile("rdtsc" : EAX_EDX_RET(val, low, high)); 188 188 ··· 199 199 */ 200 200 static __always_inline u64 rdtsc_ordered(void) 201 201 { 202 - DECLARE_ARGS(val, low, high); 202 + EAX_EDX_DECLARE_ARGS(val, low, high); 203 203 204 204 /* 205 205 * The RDTSC instruction is not ordered relative to memory ··· 227 227 228 228 static inline u64 native_read_pmc(int counter) 229 229 { 230 - DECLARE_ARGS(val, low, high); 230 + EAX_EDX_DECLARE_ARGS(val, low, high); 231 231 232 232 asm volatile("rdpmc" : EAX_EDX_RET(val, low, high) : "c" (counter)); 233 233 if (tracepoint_enabled(rdpmc))
+1 -1
arch/x86/kernel/cpu/mce/core.c
··· 390 390 /* MSR access wrappers used for error injection */ 391 391 noinstr u64 mce_rdmsrq(u32 msr) 392 392 { 393 - DECLARE_ARGS(val, low, high); 393 + EAX_EDX_DECLARE_ARGS(val, low, high); 394 394 395 395 if (__this_cpu_read(injectm.finished)) { 396 396 int offset;