x86/oprof: fix !HVM && !PV32 build
authorJan Beulich <jbeulich@suse.com>
Fri, 23 Apr 2021 13:57:27 +0000 (15:57 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 23 Apr 2021 13:57:27 +0000 (15:57 +0200)
clang, at the very least, doesn't like unused inline functions, unless
their definitions live in a header.

Fixes: d23d792478 ("x86: avoid building COMPAT code when !HVM && !PV32")
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/oprofile/backtrace.c

index 929bf51a4081db3ba35be209b8cda76246cef97d..bd5d1b0f6ce8926e04ae22e6a88036965c12f948 100644 (file)
@@ -43,6 +43,7 @@ dump_hypervisor_backtrace(struct vcpu *vcpu, const struct frame_head *head,
     return head->ebp;
 }
 
+#ifdef CONFIG_COMPAT
 static inline int is_32bit_vcpu(struct vcpu *vcpu)
 {
     if (is_hvm_vcpu(vcpu))
@@ -50,6 +51,7 @@ static inline int is_32bit_vcpu(struct vcpu *vcpu)
     else
         return is_pv_32bit_vcpu(vcpu);
 }
+#endif
 
 static struct frame_head *
 dump_guest_backtrace(struct vcpu *vcpu, const struct frame_head *head,