Hi Wolfram-san, > From: Wolfram Sang, Sent: Friday, June 14, 2019 4:38 AM > > On Thu, Jun 13, 2019 at 07:20:11PM +0900, Yoshihiro Shimoda wrote: > > This patch adds an exported function to get minimum page size for > > a domain. This patch also modifies similar codes on the iommu.c. > > > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> > > --- > > drivers/iommu/iommu.c | 18 +++++++++++++++--- > > include/linux/iommu.h | 1 + > > 2 files changed, 16 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c > > index 2a90638..7ed16af 100644 > > --- a/drivers/iommu/iommu.c > > +++ b/drivers/iommu/iommu.c > > @@ -280,6 +280,18 @@ iommu_insert_device_resv_regions(struct list_head *dev_resv_regions, > > return ret; > > } > > > > +/** > > + * iommu_get_minimum_page_size - get minimum page size for a domain > > + * @domain: the domain > > + * > > + * Allow iommu driver to get a minimum page size for a domain. > > + */ > > +unsigned long iommu_get_minimum_page_size(struct iommu_domain *domain) > > +{ > > + return 1UL << __ffs(domain->pgsize_bitmap); > > +} > > +EXPORT_SYMBOL_GPL(iommu_get_minimum_page_size); > > What about making this a 'static inline' in the iommu header file? I'd > think it is simple enough and would save us the EXPORT symbol. Thank you for the review. I think so. I'll use 'static inline' instead of EXPORT symbol. Best regards, Yoshihiro Shimoda