Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Oct 2015 02:21:20 +0000 (UTC)
From:      "Conrad E. Meyer" <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r289979 - in head/sys: dev/ioat sys
Message-ID:  <201510260221.t9Q2LK72082735@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Mon Oct 26 02:21:19 2015
New Revision: 289979
URL: https://svnweb.freebsd.org/changeset/base/289979

Log:
  ioat: Introduce KTR probes
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/sys/dev/ioat/ioat.c
  head/sys/dev/ioat/ioat_internal.h
  head/sys/sys/ktr_class.h

Modified: head/sys/dev/ioat/ioat.c
==============================================================================
--- head/sys/dev/ioat/ioat.c	Mon Oct 26 00:28:05 2015	(r289978)
+++ head/sys/dev/ioat/ioat.c	Mon Oct 26 02:21:19 2015	(r289979)
@@ -567,7 +567,7 @@ ioat_process_events(struct ioat_softc *i
 	comp_update = *ioat->comp_update;
 	status = comp_update & IOAT_CHANSTS_COMPLETED_DESCRIPTOR_MASK;
 
-	ioat_log_message(3, "%s\n", __func__);
+	CTR0(KTR_IOAT, __func__);
 
 	if (status == ioat->last_seen)
 		goto out;
@@ -575,7 +575,7 @@ ioat_process_events(struct ioat_softc *i
 	while (1) {
 		desc = ioat_get_ring_entry(ioat, ioat->tail);
 		dmadesc = &desc->bus_dmadesc;
-		ioat_log_message(3, "completing desc %d\n", ioat->tail);
+		CTR1(KTR_IOAT, "completing desc %d", ioat->tail);
 
 		if (dmadesc->callback_fn)
 			(*dmadesc->callback_fn)(dmadesc->callback_arg);
@@ -629,7 +629,7 @@ ioat_acquire(bus_dmaengine_t dmaengine)
 
 	ioat = to_ioat_softc(dmaengine);
 	mtx_lock(&ioat->submit_lock);
-	ioat_log_message(3, "%s\n", __func__);
+	CTR0(KTR_IOAT, __func__);
 }
 
 void
@@ -638,7 +638,7 @@ ioat_release(bus_dmaengine_t dmaengine)
 	struct ioat_softc *ioat;
 
 	ioat = to_ioat_softc(dmaengine);
-	ioat_log_message(3, "%s\n", __func__);
+	CTR0(KTR_IOAT, __func__);
 	ioat_write_2(ioat, IOAT_DMACOUNT_OFFSET, (uint16_t)ioat->head);
 	mtx_unlock(&ioat->submit_lock);
 }
@@ -660,7 +660,7 @@ ioat_null(bus_dmaengine_t dmaengine, bus
 	if (ioat_reserve_space_and_lock(ioat, 1) != 0)
 		return (NULL);
 
-	ioat_log_message(3, "%s\n", __func__);
+	CTR0(KTR_IOAT, __func__);
 
 	desc = ioat_get_ring_entry(ioat, ioat->head);
 	hw_desc = desc->u.dma;
@@ -707,7 +707,7 @@ ioat_copy(bus_dmaengine_t dmaengine, bus
 	if (ioat_reserve_space_and_lock(ioat, 1) != 0)
 		return (NULL);
 
-	ioat_log_message(3, "%s\n", __func__);
+	CTR0(KTR_IOAT, __func__);
 
 	desc = ioat_get_ring_entry(ioat, ioat->head);
 	hw_desc = desc->u.dma;

Modified: head/sys/dev/ioat/ioat_internal.h
==============================================================================
--- head/sys/dev/ioat/ioat_internal.h	Mon Oct 26 00:28:05 2015	(r289978)
+++ head/sys/dev/ioat/ioat_internal.h	Mon Oct 26 02:21:19 2015	(r289979)
@@ -29,7 +29,8 @@ __FBSDID("$FreeBSD$");
 #ifndef __IOAT_INTERNAL_H__
 #define __IOAT_INTERNAL_H__
 
-#define DEVICE2SOFTC(dev) ((struct ioat_softc *) device_get_softc(dev))
+#define	DEVICE2SOFTC(dev)	((struct ioat_softc *) device_get_softc(dev))
+#define	KTR_IOAT		KTR_SPARE3
 
 #define	ioat_read_chancnt(ioat) \
 	ioat_read_1((ioat), IOAT_CHANCNT_OFFSET)

Modified: head/sys/sys/ktr_class.h
==============================================================================
--- head/sys/sys/ktr_class.h	Mon Oct 26 00:28:05 2015	(r289978)
+++ head/sys/sys/ktr_class.h	Mon Oct 26 02:21:19 2015	(r289979)
@@ -55,7 +55,7 @@
 #define	KTR_PROC	0x00001000		/* Process scheduling */
 #define	KTR_SYSC	0x00002000		/* System call */
 #define	KTR_INIT	0x00004000		/* System initialization */
-#define	KTR_SPARE3	0x00008000		/* cxgb, drm2, ntb */
+#define	KTR_SPARE3	0x00008000		/* cxgb, drm2, ioat, ntb */
 #define	KTR_SPARE4	0x00010000		/* geom_sched */
 #define	KTR_EVH		0x00020000		/* Eventhandler */
 #define	KTR_VFS		0x00040000		/* VFS events */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510260221.t9Q2LK72082735>