/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_PX_DMA_H
#define _SYS_PX_DMA_H
#ifdef __cplusplus
extern "C" {
#endif
{ \
(cp)->dmac_notused = 0; \
}
typedef struct px_dma_hdl {
} px_dma_hdl_t;
void *dmai_pfnlst;
void *dmai_winlst;
int dmai_fault;
};
/* Included in case other px-specific flags are added later. */
/*
* flags for overloading dmai_inuse field of the dma request
* structure:
*/
(p)->dma_attr_addr_lo = (lo); \
(p)->dma_attr_addr_hi = (hi); \
(p)->dma_attr_seg = (nocross); \
(p)->dma_attr_count_max = (cntmax);
(p)->dma_attr_align = (align);
/*
* #define PX_DMAI_FLAGS_MAP_BUFZONE 0x40000
* See pcie_impl.h
*/
((align_pg) <= px_dvma_page_cache_clustsz))
#ifdef PX_DMA_PROF
/* collect fast track failure statistics */
px_dvmaft_npages++; \
else if (!PX_HAS_NOFASTLIMIT(mp)) \
px_dvmaft_limit++; \
}
#else /* !PX_DMA_PROF */
#endif /* PX_DMA_PROF */
typedef struct px_dma_win {
/* cookie table: sizeof (ddi_dma_cookie_t) * win_ncookies */
} px_dma_win_t;
/* dvma debug records */
struct px_dvma_rec {
char *dvma_addr;
};
ddi_dma_impl_t *mp);
} else \
(px_iopfn_t)(pfn); \
}
}
#if defined(DEBUG)
ddi_dma_impl_t *hp);
#else
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PX_DMA_H */