#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#define CREATE_TRACE_POINTS
#include "greybus.h"
+#include "greybus_trace.h"
/* Allow greybus to be disabled at boot if needed */
static bool nogreybus;
gb_operation_exit();
bus_unregister(&greybus_bus_type);
gb_debugfs_cleanup();
+ tracepoint_synchronize_unregister();
}
module_exit(gb_exit);
MODULE_LICENSE("GPL v2");
#include <linux/workqueue.h>
#include "greybus.h"
+#include "greybus_trace.h"
static struct kmem_cache *gb_operation_cache;
static struct kmem_cache *gb_message_cache;
{
struct gb_connection *connection = message->operation->connection;
+ trace_gb_message_send(message);
return connection->hd->driver->message_send(connection->hd,
connection->hd_cport_id,
message,
gb_operation_put(operation);
return;
}
+ trace_gb_message_recv_request(operation->request);
/*
* The initial reference to the operation will be dropped when the
message->header->type, size, message_size);
errno = -EMSGSIZE;
}
+ trace_gb_message_recv_response(operation->response);
/* We must ignore the payload if a bad status is returned */
if (errno)
gb_message_cancel(operation->request);
queue_work(gb_operation_completion_wq, &operation->work);
}
+ trace_gb_message_cancel_outgoing(operation->request);
atomic_inc(&operation->waiters);
wait_event(gb_operation_cancellation_queue,
if (!gb_operation_result_set(operation, errno))
gb_message_cancel(operation->response);
}
+ trace_gb_message_cancel_incoming(operation->response);
atomic_inc(&operation->waiters);
wait_event(gb_operation_cancellation_queue,