[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen/trace: Fix build with !CONFIG_TRACEBUFFER



commit e18840589f03d0f969457dfbdfcd5f3b62f48ad4
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Thu Jul 18 14:29:35 2019 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Jul 18 16:51:16 2019 +0100

    xen/trace: Fix build with !CONFIG_TRACEBUFFER
    
    GCC reports:
    
    In file included from hvm.c:24:0:
    /local/xen.git/xen/include/xen/trace.h: In function â??tb_controlâ??:
    /local/xen.git/xen/include/xen/trace.h:60:13: error: â??ENOSYSâ??
    undeclared (first use in this function)
         return -ENOSYS;
                 ^~~~~~
    
    Include xen/errno.h to resolve the issue.  While tweaking this, add comments
    to the #else and #endif, as they are a fair distance apart.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/include/xen/trace.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/xen/include/xen/trace.h b/xen/include/xen/trace.h
index fad92c784a..e6a4ef93cc 100644
--- a/xen/include/xen/trace.h
+++ b/xen/include/xen/trace.h
@@ -53,7 +53,10 @@ static inline void trace_var(u32 event, int cycles, int 
extra,
 void __trace_hypercall(uint32_t event, unsigned long op,
                        const xen_ulong_t *args);
 
-#else
+#else /* CONFIG_TRACEBUFFER */
+
+#include <xen/errno.h>
+
 static inline void init_trace_bufs(void) {}
 static inline int tb_control(struct xen_sysctl_tbuf_op *tbc)
 {
@@ -71,7 +74,7 @@ static inline void __trace_var(uint32_t event, bool cycles, 
unsigned int extra,
                                const void *extra_data) {}
 static inline void __trace_hypercall(uint32_t event, unsigned long op,
                                      const xen_ulong_t *args) {}
-#endif
+#endif /* CONFIG_TRACEBUFFER */
 
 /* Convenience macros for calling the trace function. */
 #define TRACE_0D(_e)                            \
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.