Skip to content

Commit 66a4250

Browse files
Peter ZijlstraKAGA-KOKO
authored andcommitted
x86: __always_inline __{rd,wr}msr()
When the compiler choses to not inline the trivial MSR helpers: vmlinux.o: warning: objtool: __sev_es_nmi_complete()+0xce: call to __wrmsr.constprop.14() leaves .noinstr.text section Reported-by: Randy Dunlap <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Randy Dunlap <[email protected]> # build-tested Link: https://lore.kernel.org/r/X/[email protected]
1 parent 7374953 commit 66a4250

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
@@ -86,7 +86,7 @@ static inline void do_trace_rdpmc(unsigned int msr, u64 val, int failed) {}
8686
* think of extending them - you will be slapped with a stinking trout or a frozen
8787
* shark will reach you, wherever you are! You've been warned.
8888
*/
89-
static inline unsigned long long notrace __rdmsr(unsigned int msr)
89+
static __always_inline unsigned long long __rdmsr(unsigned int msr)
9090
{
9191
DECLARE_ARGS(val, low, high);
9292

@@ -98,7 +98,7 @@ static inline unsigned long long notrace __rdmsr(unsigned int msr)
9898
return EAX_EDX_VAL(val, low, high);
9999
}
100100

101-
static inline void notrace __wrmsr(unsigned int msr, u32 low, u32 high)
101+
static __always_inline void __wrmsr(unsigned int msr, u32 low, u32 high)
102102
{
103103
asm volatile("1: wrmsr\n"
104104
"2:\n"

0 commit comments

Comments
 (0)