1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Fixup KTR traces.

This commit is contained in:
Maxime Henrion 2005-03-08 14:49:05 +00:00
parent 3443b65a06
commit 68d9d1e64e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=143294
2 changed files with 32 additions and 32 deletions

View File

@ -225,7 +225,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF,
M_ZERO | M_NOWAIT);
if (newtag == NULL) {
CTR3(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
__func__, newtag, 0, error);
return (ENOMEM);
}
@ -307,7 +307,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
} else {
*dmat = newtag;
}
CTR3(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
__func__, newtag, (newtag != NULL ? newtag->flags : 0), error);
return (error);
}
@ -348,7 +348,7 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat)
}
}
out:
CTR2(KTR_BUSDMA, "%s tag %p error %d", __func__, dmat_copy, error);
CTR3(KTR_BUSDMA, "%s tag %p error %d", __func__, dmat_copy, error);
return (error);
}
@ -368,7 +368,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)
sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF,
M_NOWAIT);
if (dmat->segments == NULL) {
CTR2(KTR_BUSDMA, "%s: tag %p error %d",
CTR3(KTR_BUSDMA, "%s: tag %p error %d",
__func__, dmat, ENOMEM);
return (ENOMEM);
}
@ -392,7 +392,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)
*mapp = (bus_dmamap_t)malloc(sizeof(**mapp), M_DEVBUF,
M_NOWAIT | M_ZERO);
if (*mapp == NULL) {
CTR2(KTR_BUSDMA, "%s: tag %p error %d",
CTR3(KTR_BUSDMA, "%s: tag %p error %d",
__func__, dmat, ENOMEM);
return (ENOMEM);
}
@ -426,7 +426,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)
}
if (error == 0)
dmat->map_count++;
CTR3(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, error);
return (error);
}
@ -440,14 +440,14 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)
{
if (map != NULL && map != &nobounce_dmamap) {
if (STAILQ_FIRST(&map->bpages) != NULL) {
CTR2(KTR_BUSDMA, "%s: tag %p error %d",
CTR3(KTR_BUSDMA, "%s: tag %p error %d",
__func__, dmat, EBUSY);
return (EBUSY);
}
free(map, M_DEVBUF);
}
dmat->map_count--;
CTR1(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat);
CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat);
return (0);
}
@ -478,7 +478,7 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF,
M_NOWAIT);
if (dmat->segments == NULL) {
CTR3(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, ENOMEM);
return (ENOMEM);
}
@ -499,11 +499,11 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
dmat->boundary);
}
if (*vaddr == NULL) {
CTR3(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, ENOMEM);
return (ENOMEM);
}
CTR3(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, ENOMEM);
return (0);
}
@ -527,7 +527,7 @@ bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
else {
contigfree(vaddr, dmat->maxsize, M_DEVBUF);
}
CTR2(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags);
CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags);
}
/*
@ -696,7 +696,7 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
&lastaddr, dmat->segments, &nsegs, 1);
if (error == EINPROGRESS) {
CTR3(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, error);
return (error);
}
@ -706,7 +706,7 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
else
(*callback)(callback_arg, dmat->segments, nsegs + 1, 0);
CTR3(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error 0 nsegs %d",
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error 0 nsegs %d",
__func__, dmat, dmat->flags, nsegs + 1);
return (0);
}
@ -753,7 +753,7 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat, bus_dmamap_t map,
(*callback)(callback_arg, dmat->segments,
nsegs+1, m0->m_pkthdr.len, error);
}
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
__func__, dmat, dmat->flags, error, nsegs + 1);
return (error);
}
@ -790,7 +790,7 @@ bus_dmamap_load_mbuf_sg(bus_dma_tag_t dmat, bus_dmamap_t map,
/* XXX FIXME: Having to increment nsegs is really annoying */
++*nsegs;
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
__func__, dmat, dmat->flags, error, *nsegs);
return (error);
}
@ -850,7 +850,7 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map,
(*callback)(callback_arg, dmat->segments,
nsegs+1, uio->uio_resid, error);
}
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
__func__, dmat, dmat->flags, error, nsegs + 1);
return (error);
}
@ -881,7 +881,7 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
* the caches on broken hardware
*/
dmat->bounce_zone->total_bounced++;
CTR3(KTR_BUSDMA, "%s: tag %p tag flags 0x%x op 0x%x "
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x op 0x%x "
"performing bounce", __func__, op, dmat, dmat->flags);
if (op & BUS_DMASYNC_PREWRITE) {

View File

@ -178,7 +178,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF, M_NOWAIT);
if (newtag == NULL) {
CTR3(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
__func__, newtag, 0, error);
return (ENOMEM);
}
@ -230,7 +230,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
}
*dmat = newtag;
CTR3(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d",
__func__, newtag, (newtag != NULL ? newtag->flags : 0), error);
return (error);
@ -265,7 +265,7 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat)
dmat = NULL;
}
}
CTR1(KTR_BUSDMA, "%s tag %p", __func__, dmat_copy);
CTR2(KTR_BUSDMA, "%s tag %p", __func__, dmat_copy);
return (0);
}
@ -284,7 +284,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)
newmap = malloc(sizeof(*newmap), M_DEVBUF, M_NOWAIT | M_ZERO);
if (newmap == NULL) {
CTR2(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM);
CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM);
return (ENOMEM);
}
*mapp = newmap;
@ -292,7 +292,7 @@ bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp)
newmap->flags = 0;
dmat->map_count++;
CTR3(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, error);
return (0);
@ -308,7 +308,7 @@ bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)
free(map, M_DEVBUF);
dmat->map_count--;
CTR1(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat);
CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat);
return (0);
}
@ -335,8 +335,8 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
if (!*mapp) {
newmap = malloc(sizeof(*newmap), M_DEVBUF, M_NOWAIT | M_ZERO);
if (newmap == NULL) {
CTR3(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
dmat, dmat->flags, ENOMEM);
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, ENOMEM);
return (ENOMEM);
}
dmat->map_count++;
@ -382,7 +382,7 @@ bus_dmamem_free(bus_dma_tag_t dmat, void *vaddr, bus_dmamap_t map)
}
dmat->map_count--;
free(map, M_DEVBUF);
CTR2(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags);
CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat, dmat->flags);
}
/*
@ -548,7 +548,7 @@ bus_dmamap_load(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf,
else
(*callback)(callback_arg, dm_segments, nsegs + 1, error);
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
__func__, dmat, dmat->flags, nsegs + 1, error);
return (0);
@ -597,7 +597,7 @@ bus_dmamap_load_mbuf(bus_dma_tag_t dmat, bus_dmamap_t map, struct mbuf *m0,
(*callback)(callback_arg, dm_segments, nsegs + 1,
m0->m_pkthdr.len, error);
}
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
__func__, dmat, dmat->flags, error, nsegs + 1);
return (error);
@ -634,7 +634,7 @@ bus_dmamap_load_mbuf_sg(bus_dma_tag_t dmat, bus_dmamap_t map,
/* XXX FIXME: Having to increment nsegs is really annoying */
++*nsegs;
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
__func__, dmat, dmat->flags, error, *nsegs);
return (error);
}
@ -700,7 +700,7 @@ bus_dmamap_load_uio(bus_dma_tag_t dmat, bus_dmamap_t map, struct uio *uio,
uio->uio_resid, error);
}
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
__func__, dmat, dmat->flags, error, nsegs + 1);
return (error);
}
@ -746,7 +746,7 @@ bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
return;
if (map->flags & DMAMAP_COHERENT)
return;
CTR2(KTR_BUSDMA, "%s: op %x flags %x", __func__, op, map->flags);
CTR3(KTR_BUSDMA, "%s: op %x flags %x", __func__, op, map->flags);
switch(map->flags & DMAMAP_TYPE_MASK) {
case DMAMAP_LINEAR:
bus_dmamap_sync_buf(map->buffer, map->len, op);