Commit 4ff4ba15 authored by Vasily Gorbik's avatar Vasily Gorbik
Browse files

Merge tag 'vfio-ccw-20191111' of...

Merge tag 'vfio-ccw-20191111' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into features

enhance tracing in vfio-ccw

* tag 'vfio-ccw-20191111' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw

:
  vfio-ccw: Rework the io_fctl trace
  vfio-ccw: Add a trace for asynchronous requests
  vfio-ccw: Trace the FSM jumptable
  vfio-ccw: Refactor how the traces are built

Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parents 544f1d62 85298880
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@

# The following is required for define_trace.h to find ./trace.h
CFLAGS_trace.o := -I$(src)
CFLAGS_vfio_ccw_fsm.o := -I$(src)
CFLAGS_vfio_ccw_trace.o := -I$(src)

obj-y += airq.o blacklist.o chsc.o cio.o css.o chp.o idset.o isc.o \
	fcx.o itcw.o crw.o ccwreq.o trace.o ioasm.o
@@ -21,5 +21,5 @@ qdio-objs := qdio_main.o qdio_thinint.o qdio_debug.o qdio_setup.o
obj-$(CONFIG_QDIO) += qdio.o

vfio_ccw-objs += vfio_ccw_drv.o vfio_ccw_cp.o vfio_ccw_ops.o vfio_ccw_fsm.o \
	vfio_ccw_async.o
	vfio_ccw_async.o vfio_ccw_trace.o
obj-$(CONFIG_VFIO_CCW) += vfio_ccw.o
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include <asm/scsw.h>

#include "orb.h"
#include "vfio_ccw_trace.h"

/*
 * Max length for ccw chain.
+6 −5
Original line number Diff line number Diff line
@@ -15,9 +15,6 @@
#include "ioasm.h"
#include "vfio_ccw_private.h"

#define CREATE_TRACE_POINTS
#include "vfio_ccw_trace.h"

static int fsm_io_helper(struct vfio_ccw_private *private)
{
	struct subchannel *sch;
@@ -321,7 +318,7 @@ static void fsm_io_request(struct vfio_ccw_private *private,
	}

err_out:
	trace_vfio_ccw_io_fctl(scsw->cmd.fctl, schid,
	trace_vfio_ccw_fsm_io_request(scsw->cmd.fctl, schid,
				      io_region->ret_code, errstr);
}

@@ -344,6 +341,10 @@ static void fsm_async_request(struct vfio_ccw_private *private,
		/* should not happen? */
		cmd_region->ret_code = -EINVAL;
	}

	trace_vfio_ccw_fsm_async_request(get_schid(private),
					 cmd_region->command,
					 cmd_region->ret_code);
}

/*
+1 −0
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@ extern fsm_func_t *vfio_ccw_jumptable[NR_VFIO_CCW_STATES][NR_VFIO_CCW_EVENTS];
static inline void vfio_ccw_fsm_event(struct vfio_ccw_private *private,
				     int event)
{
	trace_vfio_ccw_fsm_event(private->sch->schid, private->state, event);
	vfio_ccw_jumptable[private->state][event](private, event);
}

+14 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/*
 * Tracepoint definitions for vfio_ccw
 *
 * Copyright IBM Corp. 2019
 * Author(s): Eric Farman <farman@linux.ibm.com>
 */

#define CREATE_TRACE_POINTS
#include "vfio_ccw_trace.h"

EXPORT_TRACEPOINT_SYMBOL(vfio_ccw_fsm_async_request);
EXPORT_TRACEPOINT_SYMBOL(vfio_ccw_fsm_event);
EXPORT_TRACEPOINT_SYMBOL(vfio_ccw_fsm_io_request);
Loading