xen/trace: Fix build with !CONFIG_TRACEBUFFER
PATCH 1/1 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.
---
CC: George Dunlap <[email protected]>
CC: Ian Jackson <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Tim Deegan <[email protected]>
CC: Wei Liu <[email protected]>
CC: Julien Grall <[email protected]>
--- xen/include/xen/trace.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
xen/include/xen/trace.h +5 -2
@@ -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) \
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 6 lines · Andrew Cooper
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)
Quoted 7 lines
return -ENOSYS; ^~~~~~Include
xen/errno.hto 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 <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel