blob: 329f60eb95deb1cffdbe5818df5a6139dddb33b9 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Jeremy Fitzhardingef04e2ee2010-12-16 14:15:23 -08002#include <linux/ftrace.h>
Konrad Rzeszutek Wilkc00c8aa2011-08-04 18:42:10 -04003#include <xen/interface/xen.h>
Juergen Grossfc903f82015-01-21 08:49:24 +01004#include <xen/interface/xen-mca.h>
Jeremy Fitzhardingef04e2ee2010-12-16 14:15:23 -08005
Juergen Grossfc903f82015-01-21 08:49:24 +01006#define HYPERCALL(x) [__HYPERVISOR_##x] = "("#x")",
Jeremy Fitzhardingec796f212010-12-16 14:33:27 -08007static const char *xen_hypercall_names[] = {
Juergen Grossfc903f82015-01-21 08:49:24 +01008#include <asm/xen-hypercalls.h>
Jeremy Fitzhardingec796f212010-12-16 14:33:27 -08009};
Juergen Grossfc903f82015-01-21 08:49:24 +010010#undef HYPERCALL
Jeremy Fitzhardingec796f212010-12-16 14:33:27 -080011
12static const char *xen_hypercall_name(unsigned op)
13{
14 if (op < ARRAY_SIZE(xen_hypercall_names) && xen_hypercall_names[op] != NULL)
15 return xen_hypercall_names[op];
16
17 return "";
18}
19
Jeremy Fitzhardingef04e2ee2010-12-16 14:15:23 -080020#define CREATE_TRACE_POINTS
21#include <trace/events/xen.h>