Commit 7af52cca authored by Eric Farman's avatar Eric Farman Committed by Cornelia Huck

vfio-ccw: Refactor how the traces are built

Commit 3cd90214 ("vfio: ccw: add tracepoints for interesting error
paths") added a quick trace point to determine where a channel program
failed while being processed.  It's a great addition, but adding more
traces to vfio-ccw is more cumbersome than it needs to be.

Let's refactor how this is done, so that additional traces are easier
to add and can exist outside of the FSM if we ever desire.
Signed-off-by: default avatarEric Farman <farman@linux.ibm.com>
Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
Message-Id: <20191016142040.14132-2-farman@linux.ibm.com>
Acked-by: default avatarHalil Pasic <pasic@linux.ibm.com>
Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>
parent 89d0180a
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# The following is required for define_trace.h to find ./trace.h # The following is required for define_trace.h to find ./trace.h
CFLAGS_trace.o := -I$(src) 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 \ 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 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 ...@@ -21,5 +21,5 @@ qdio-objs := qdio_main.o qdio_thinint.o qdio_debug.o qdio_setup.o
obj-$(CONFIG_QDIO) += qdio.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-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 obj-$(CONFIG_VFIO_CCW) += vfio_ccw.o
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <asm/scsw.h> #include <asm/scsw.h>
#include "orb.h" #include "orb.h"
#include "vfio_ccw_trace.h"
/* /*
* Max length for ccw chain. * Max length for ccw chain.
......
...@@ -15,9 +15,6 @@ ...@@ -15,9 +15,6 @@
#include "ioasm.h" #include "ioasm.h"
#include "vfio_ccw_private.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) static int fsm_io_helper(struct vfio_ccw_private *private)
{ {
struct subchannel *sch; struct subchannel *sch;
......
// 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_io_fctl);
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
* Halil Pasic <pasic@linux.vnet.ibm.com> * Halil Pasic <pasic@linux.vnet.ibm.com>
*/ */
#include "cio.h"
#undef TRACE_SYSTEM #undef TRACE_SYSTEM
#define TRACE_SYSTEM vfio_ccw #define TRACE_SYSTEM vfio_ccw
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment