mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
x86: __always_inline __{rd,wr}msr()
[ Upstream commit 66a425011c ]
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 <rdunlap@infradead.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Link: https://lore.kernel.org/r/X/bf3gV+BW7kGEsB@hirez.programming.kicks-ass.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d2c880ed2c
commit
5929bcb4a4
@@ -86,7 +86,7 @@ static inline void do_trace_rdpmc(unsigned int msr, u64 val, int failed) {}
|
|||||||
* think of extending them - you will be slapped with a stinking trout or a frozen
|
* think of extending them - you will be slapped with a stinking trout or a frozen
|
||||||
* shark will reach you, wherever you are! You've been warned.
|
* shark will reach you, wherever you are! You've been warned.
|
||||||
*/
|
*/
|
||||||
static inline unsigned long long notrace __rdmsr(unsigned int msr)
|
static __always_inline unsigned long long __rdmsr(unsigned int msr)
|
||||||
{
|
{
|
||||||
DECLARE_ARGS(val, low, high);
|
DECLARE_ARGS(val, low, high);
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ static inline unsigned long long notrace __rdmsr(unsigned int msr)
|
|||||||
return EAX_EDX_VAL(val, low, high);
|
return EAX_EDX_VAL(val, low, high);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void notrace __wrmsr(unsigned int msr, u32 low, u32 high)
|
static __always_inline void __wrmsr(unsigned int msr, u32 low, u32 high)
|
||||||
{
|
{
|
||||||
asm volatile("1: wrmsr\n"
|
asm volatile("1: wrmsr\n"
|
||||||
"2:\n"
|
"2:\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user