From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [Patch v2 7/9] iommu/amd: copy old tables and do not update dev tables before driver init Date: Wed, 16 Dec 2015 16:51:34 +0100 Message-ID: <20151216155133.GJ18805@8bytes.org> References: <1446811851-20623-1-git-send-email-bhe@redhat.com> <1446811851-20623-8-git-send-email-bhe@redhat.com> <20151127113517.GF24300@8bytes.org> <20151213011929.GA2490@x1.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20151213011929.GA2490-ejN7fcUYdH/by3iVrkZq2A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Baoquan He Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: iommu@lists.linux-foundation.org Hi Baoquan, On Sun, Dec 13, 2015 at 09:19:29AM +0800, Baoquan He wrote: >>From definition and usage for other arch/component set_dma_mask is only > used to set the DMA addressing limitations which is I got from reading. > Could you please give more tips on this? Maybe I didn't dig into it deep > enough to get it. The device drivers usually call set_dma_mask before they issue any other dma-api call. So they call it at driver-init time, making the call-back a good indication that a driver is about to grab a device. As a bonus we also get the dma-mask and can make choices on how to initialize the device. But that is out-of-scope for this patch-set. Joerg