x86/msr: Remove the unused rdpmc() method
authorXin Li (Intel) <xin@zytor.com>
Sun, 27 Apr 2025 09:20:15 +0000 (02:20 -0700)
committerIngo Molnar <mingo@kernel.org>
Fri, 2 May 2025 08:25:04 +0000 (10:25 +0200)
rdpmc() is not used anywhere anymore, remove it.

Signed-off-by: Xin Li (Intel) <xin@zytor.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.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: Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Uros Bizjak <ubizjak@gmail.com>
Link: https://lore.kernel.org/r/20250427092027.1598740-4-xin@zytor.com
arch/x86/include/asm/msr.h
arch/x86/include/asm/paravirt.h

index f5c0969fa3bbdab47372021528d58d1701d8a167..07d45fc374ef514425ce08ce9e52dfe9b9c7bac2 100644 (file)
@@ -217,13 +217,6 @@ static inline int rdmsrq_safe(u32 msr, u64 *p)
        return err;
 }
 
-#define rdpmc(counter, low, high)                      \
-do {                                                   \
-       u64 _l = native_read_pmc((counter));            \
-       (low)  = (u32)_l;                               \
-       (high) = (u32)(_l >> 32);                       \
-} while (0)
-
 #define rdpmcl(counter, val) ((val) = native_read_pmc(counter))
 
 #endif /* !CONFIG_PARAVIRT_XXL */
index 86a77528792dc7f5976c2ad6a3da320bbd1a6363..c4dedb9847357cb21a17113cf4cf34be2ab8281e 100644 (file)
@@ -244,13 +244,6 @@ static inline u64 paravirt_read_pmc(int counter)
        return PVOP_CALL1(u64, cpu.read_pmc, counter);
 }
 
-#define rdpmc(counter, low, high)              \
-do {                                           \
-       u64 _l = paravirt_read_pmc(counter);    \
-       low = (u32)_l;                          \
-       high = _l >> 32;                        \
-} while (0)
-
 #define rdpmcl(counter, val) ((val) = paravirt_read_pmc(counter))
 
 static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries)