From: Chris Wright Subject: Re: [PATCH 06/15] [swiotlb] In 'swiotlb_init' take advantage of the default swiotlb_engine support. Date: Thu, 14 Jan 2010 17:57:41 -0800 Message-ID: <20100115015741.GF6021@sequoia.sous-sol.org> References: <1263510064-16788-1-git-send-email-konrad.wilk@oracle.com> <1263510064-16788-2-git-send-email-konrad.wilk@oracle.com> <1263510064-16788-3-git-send-email-konrad.wilk@oracle.com> <1263510064-16788-4-git-send-email-konrad.wilk@oracle.com> <1263510064-16788-5-git-send-email-konrad.wilk@oracle.com> <1263510064-16788-6-git-send-email-konrad.wilk@oracle.com> <1263510064-16788-7-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1263510064-16788-7-git-send-email-konrad.wilk@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk Cc: chrisw@sous-sol.org, jeremy@goop.org, xen-devel@lists.xensource.com, Ian.Campbell@eu.citrix.com, joerg.roedel@amd.com, fujita.tomonori@lab.ntt.co.jp, iommu@lists.linux-foundation.org, dwmw2@infradead.org, alex.williamson@hp.com List-Id: xen-devel@lists.xenproject.org * Konrad Rzeszutek Wilk (konrad.wilk@oracle.com) wrote: > For baselevel support we define required functions and fill out > variables. > > Signed-off-by: Konrad Rzeszutek Wilk > --- > lib/swiotlb.c | 22 ++++++++++++++++++++++ > 1 files changed, 22 insertions(+), 0 deletions(-) > > diff --git a/lib/swiotlb.c b/lib/swiotlb.c > index cf29f03..3c7bd4e 100644 > --- a/lib/swiotlb.c > +++ b/lib/swiotlb.c > @@ -132,6 +132,11 @@ static dma_addr_t swiotlb_virt_to_bus(struct device *hwdev, > return phys_to_dma(hwdev, virt_to_phys(address)); > } > > +static void *swiotlb_bus_to_virt(struct device *hwdev, dma_addr_t dev_addr) > +{ > + return phys_to_virt(dma_to_phys(hwdev, dev_addr)); > +}; > + > /* > * Register a software IO TLB engine. > * > @@ -236,9 +241,26 @@ swiotlb_init_with_default_size(size_t default_size, int verbose) > swiotlb_print_info(); > } > > +static int swiotlb_release(struct swiotlb_engine *iotlb) > +{ > + swiotlb_free(); > + return 0; Do you ever expect a failure case here? You mentioned wait and flush or fail, but that's not done here.