Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42248979 authored by Peter Oberparleiter's avatar Peter Oberparleiter Committed by Martin Schwidefsky
Browse files

s390/cio: Introduce common I/O layer tracepoints



Add tracepoints to interrupt handler and core inline assemblies used by
the s390 common I/O layer. These tracepoints can be used to monitor and
validate hardware and hypervisor requests and responses.

Signed-off-by: default avatarPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
Reviewed-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 2ab59de7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2,8 +2,11 @@
# Makefile for the S/390 common i/o drivers
#

# The following is required for define_trace.h to find ./trace.h
CFLAGS_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
	fcx.o itcw.o crw.o ccwreq.o trace.o
ccw_device-objs += device.o device_fsm.o device_ops.o
ccw_device-objs += device_id.o device_pgid.o device_status.o
obj-y += ccw_device.o cmf.o
+1 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ static irqreturn_t do_airq_interrupt(int irq, void *dummy)

	set_cpu_flag(CIF_NOHZ_DELAY);
	tpi_info = (struct tpi_info *) &get_irq_regs()->int_code;
	trace_s390_cio_adapter_int(tpi_info);
	head = &airq_lists[tpi_info->isc];
	rcu_read_lock();
	hlist_for_each_entry_rcu(airq, head, list)
+2 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@
#include "blacklist.h"
#include "cio_debug.h"
#include "chp.h"
#include "trace.h"

debug_info_t *cio_debug_msg_id;
debug_info_t *cio_debug_trace_id;
@@ -539,6 +540,7 @@ static irqreturn_t do_cio_interrupt(int irq, void *dummy)

	set_cpu_flag(CIF_NOHZ_DELAY);
	tpi_info = (struct tpi_info *) &get_irq_regs()->int_code;
	trace_s390_cio_interrupt(tpi_info);
	irb = this_cpu_ptr(&cio_irb);
	sch = (struct subchannel *)(unsigned long) tpi_info->intparm;
	if (!sch) {
+25 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
#include <asm/crw.h>
#include "orb.h"
#include "cio.h"
#include "trace.h"

/*
 * Some S390 specific IO instructions as inline
@@ -25,6 +26,8 @@ static inline int stsch(struct subchannel_id schid, struct schib *addr)
		: "+d" (ccode), "=m" (*addr)
		: "d" (reg1), "a" (addr)
		: "cc");
	trace_s390_cio_stsch(schid, addr, ccode);

	return ccode;
}

@@ -42,6 +45,8 @@ static inline int msch(struct subchannel_id schid, struct schib *addr)
		: "+d" (ccode)
		: "d" (reg1), "a" (addr), "m" (*addr)
		: "cc");
	trace_s390_cio_msch(schid, addr, ccode);

	return ccode;
}

@@ -57,6 +62,8 @@ static inline int tsch(struct subchannel_id schid, struct irb *addr)
		: "=d" (ccode), "=m" (*addr)
		: "d" (reg1), "a" (addr)
		: "cc");
	trace_s390_cio_tsch(schid, addr, ccode);

	return ccode;
}

@@ -74,6 +81,8 @@ static inline int ssch(struct subchannel_id schid, union orb *addr)
		: "+d" (ccode)
		: "d" (reg1), "a" (addr), "m" (*addr)
		: "cc", "memory");
	trace_s390_cio_ssch(schid, addr, ccode);

	return ccode;
}

@@ -89,6 +98,8 @@ static inline int csch(struct subchannel_id schid)
		: "=d" (ccode)
		: "d" (reg1)
		: "cc");
	trace_s390_cio_csch(schid, ccode);

	return ccode;
}

@@ -103,6 +114,8 @@ static inline int tpi(struct tpi_info *addr)
		: "=d" (ccode), "=m" (*addr)
		: "a" (addr)
		: "cc");
	trace_s390_cio_tpi(addr, ccode);

	return ccode;
}

@@ -118,6 +131,8 @@ static inline int chsc(void *chsc_area)
		: "=d" (cc), "=m" (*(addr_type *) chsc_area)
		: "d" (chsc_area), "m" (*(addr_type *) chsc_area)
		: "cc");
	trace_s390_cio_chsc(chsc_area, cc);

	return cc;
}

@@ -132,6 +147,8 @@ static inline int rchp(struct chp_id chpid)
		"	ipm	%0\n"
		"	srl	%0,28"
		: "=d" (ccode) : "d" (reg1) : "cc");
	trace_s390_cio_rchp(chpid, ccode);

	return ccode;
}

@@ -147,6 +164,8 @@ static inline int rsch(struct subchannel_id schid)
		: "=d" (ccode)
		: "d" (reg1)
		: "cc", "memory");
	trace_s390_cio_rsch(schid, ccode);

	return ccode;
}

@@ -162,6 +181,8 @@ static inline int hsch(struct subchannel_id schid)
		: "=d" (ccode)
		: "d" (reg1)
		: "cc");
	trace_s390_cio_hsch(schid, ccode);

	return ccode;
}

@@ -177,6 +198,8 @@ static inline int xsch(struct subchannel_id schid)
		: "=d" (ccode)
		: "d" (reg1)
		: "cc");
	trace_s390_cio_xsch(schid, ccode);

	return ccode;
}

@@ -191,6 +214,8 @@ static inline int stcrw(struct crw *crw)
		: "=d" (ccode), "=m" (*crw)
		: "a" (crw)
		: "cc");
	trace_s390_cio_stcrw(crw, ccode);

	return ccode;
}

+24 −0
Original line number Diff line number Diff line
/*
 * Tracepoint definitions for s390_cio
 *
 * Copyright IBM Corp. 2015
 * Author(s): Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
 */

#include <asm/crw.h>
#include "cio.h"

#define CREATE_TRACE_POINTS
#include "trace.h"

EXPORT_TRACEPOINT_SYMBOL(s390_cio_stsch);
EXPORT_TRACEPOINT_SYMBOL(s390_cio_msch);
EXPORT_TRACEPOINT_SYMBOL(s390_cio_tsch);
EXPORT_TRACEPOINT_SYMBOL(s390_cio_tpi);
EXPORT_TRACEPOINT_SYMBOL(s390_cio_ssch);
EXPORT_TRACEPOINT_SYMBOL(s390_cio_csch);
EXPORT_TRACEPOINT_SYMBOL(s390_cio_hsch);
EXPORT_TRACEPOINT_SYMBOL(s390_cio_xsch);
EXPORT_TRACEPOINT_SYMBOL(s390_cio_rsch);
EXPORT_TRACEPOINT_SYMBOL(s390_cio_rchp);
EXPORT_TRACEPOINT_SYMBOL(s390_cio_chsc);
Loading