Skip to content

Commit 28eaf87

Browse files
Peter ZijlstraKAGA-KOKO
authored andcommitted
x86/entry: __always_inline debugreg for noinstr
vmlinux.o: warning: objtool: exc_debug()+0x21: call to native_get_debugreg() leaves .noinstr.text section Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 3e77abd commit 28eaf87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/x86/include/asm/debugreg.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ DECLARE_PER_CPU(unsigned long, cpu_dr7);
1818
native_set_debugreg(register, value)
1919
#endif
2020

21-
static inline unsigned long native_get_debugreg(int regno)
21+
static __always_inline unsigned long native_get_debugreg(int regno)
2222
{
2323
unsigned long val = 0; /* Damn you, gcc! */
2424

@@ -47,7 +47,7 @@ static inline unsigned long native_get_debugreg(int regno)
4747
return val;
4848
}
4949

50-
static inline void native_set_debugreg(int regno, unsigned long value)
50+
static __always_inline void native_set_debugreg(int regno, unsigned long value)
5151
{
5252
switch (regno) {
5353
case 0:
@@ -85,7 +85,7 @@ static inline void hw_breakpoint_disable(void)
8585
set_debugreg(0UL, 3);
8686
}
8787

88-
static inline bool hw_breakpoint_active(void)
88+
static __always_inline bool hw_breakpoint_active(void)
8989
{
9090
return __this_cpu_read(cpu_dr7) & DR_GLOBAL_ENABLE_MASK;
9191
}

0 commit comments

Comments
 (0)