]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
x86/entry: __always_inline debugreg for noinstr
authorPeter Zijlstra <peterz@infradead.org>
Wed, 3 Jun 2020 11:40:17 +0000 (13:40 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 11 Jun 2020 13:15:26 +0000 (15:15 +0200)
vmlinux.o: warning: objtool: exc_debug()+0x21: call to native_get_debugreg() leaves .noinstr.text section

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200603114051.954401211@infradead.org
arch/x86/include/asm/debugreg.h

index 42fc35d865357040032bf6af149ae471abfa5051..e89558a3fe4af8f59b89ea7c0851ae630a5afea9 100644 (file)
@@ -18,7 +18,7 @@ DECLARE_PER_CPU(unsigned long, cpu_dr7);
        native_set_debugreg(register, value)
 #endif
 
-static inline unsigned long native_get_debugreg(int regno)
+static __always_inline unsigned long native_get_debugreg(int regno)
 {
        unsigned long val = 0;  /* Damn you, gcc! */
 
@@ -47,7 +47,7 @@ static inline unsigned long native_get_debugreg(int regno)
        return val;
 }
 
-static inline void native_set_debugreg(int regno, unsigned long value)
+static __always_inline void native_set_debugreg(int regno, unsigned long value)
 {
        switch (regno) {
        case 0:
@@ -85,7 +85,7 @@ static inline void hw_breakpoint_disable(void)
        set_debugreg(0UL, 3);
 }
 
-static inline bool hw_breakpoint_active(void)
+static __always_inline bool hw_breakpoint_active(void)
 {
        return __this_cpu_read(cpu_dr7) & DR_GLOBAL_ENABLE_MASK;
 }