Mercurial > illumos > illumos-gate
changeset 13065:9377d65d657e
6955196 Intel IOMMU code should use higher-level abstraction interface (fix lint)
author | Frank Van Der Linden <frank.van.der.linden@oracle.com> |
---|---|
date | Mon, 09 Aug 2010 19:07:25 -0700 |
parents | 67f1b74cdb24 |
children | feaeaa778d1c |
files | usr/src/uts/i86pc/io/rootnex.c usr/src/uts/intel/io/iommulib.c |
diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/i86pc/io/rootnex.c Mon Aug 09 15:53:32 2010 -0700 +++ b/usr/src/uts/i86pc/io/rootnex.c Mon Aug 09 19:07:25 2010 -0700 @@ -251,10 +251,12 @@ ddi_dma_handle_t handle, uint_t win, off_t *offp, size_t *lenp, ddi_dma_cookie_t *cookiep, uint_t *ccountp); +#if defined(__amd64) && !defined(__xpv) static int rootnex_coredma_hdl_setprivate(dev_info_t *dip, dev_info_t *rdip, ddi_dma_handle_t handle, void *v); static void *rootnex_coredma_hdl_getprivate(dev_info_t *dip, dev_info_t *rdip, ddi_dma_handle_t handle); +#endif static struct bus_ops rootnex_bus_ops = { @@ -1969,8 +1971,10 @@ { rootnex_sglinfo_t *sinfo; ddi_dma_obj_t *dmao; +#if defined(__amd64) && !defined(__xpv) struct dvmaseg *dvs; ddi_dma_cookie_t *cookie; +#endif ddi_dma_attr_t *attr; ddi_dma_impl_t *hp; rootnex_dma_t *dma; @@ -1980,6 +1984,7 @@ hp = (ddi_dma_impl_t *)handle; dma = (rootnex_dma_t *)hp->dmai_private; + dmao = &dma->dp_dma; sinfo = &dma->dp_sglinfo; attr = &hp->dmai_attr; @@ -2064,7 +2069,6 @@ return (e); } } - #endif /* @@ -2094,8 +2098,6 @@ ncookies += (dmao->dmao_obj.dvma_obj.dv_nseg - 1); sinfo->si_max_pages = MIN(sinfo->si_max_pages, ncookies); - } else { - dmao = &dma->dp_dma; } /* @@ -4960,6 +4962,7 @@ cookiep, ccountp)); } +#if defined(__amd64) && !defined(__xpv) /*ARGSUSED*/ static int rootnex_coredma_hdl_setprivate(dev_info_t *dip, dev_info_t *rdip, @@ -4988,6 +4991,7 @@ return (dma->dp_iommu_private); } +#endif /* * ************************
--- a/usr/src/uts/intel/io/iommulib.c Mon Aug 09 15:53:32 2010 -0700 +++ b/usr/src/uts/intel/io/iommulib.c Mon Aug 09 19:07:25 2010 -0700 @@ -360,7 +360,6 @@ iommulib_unit_t *unitp; int instance = ddi_get_instance(dip); const char *driver = ddi_driver_name(dip); - dev_info_t *pdip = ddi_get_parent(dip); const char *f = "iommulib_register"; ASSERT(ops);