Messages in this thread | | | Date | Fri, 23 Sep 2011 17:19:36 +0200 | From | "Roedel, Joerg" <> | Subject | Re: [PATCH 02/10] Driver core: Add iommu_ops to bus_type |
| |
On Thu, Sep 22, 2011 at 04:11:55PM -0400, Greg KH wrote: > On Thu, Sep 22, 2011 at 06:14:54PM +0200, Joerg Roedel wrote: > > This is the starting point to make the iommu_ops used for > > the iommu-api a per-bus-type structure. It is required to > > easily implement bus-specific setup in the iommu-layer. > > The first user will be the iommu-group attribute in sysfs. > > > > Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> > > --- > > drivers/base/bus.c | 29 +++++++++++++++++++++++++++++ > > drivers/iommu/iommu.c | 4 ++++ > > include/linux/device.h | 10 ++++++++++ > > include/linux/iommu.h | 2 ++ > > 4 files changed, 45 insertions(+), 0 deletions(-) > > > > diff --git a/drivers/base/bus.c b/drivers/base/bus.c > > index 000e7b2..b3014fe 100644 > > --- a/drivers/base/bus.c > > +++ b/drivers/base/bus.c > > @@ -1028,6 +1028,35 @@ void bus_sort_breadthfirst(struct bus_type *bus, > > } > > EXPORT_SYMBOL_GPL(bus_sort_breadthfirst); > > > > +#ifdef CONFIG_IOMMU_API > > +/** > > This ifdef really isn't needed, is it? I think you can remove it.
Actually, iommu_bus_init is only defined with CONFIG_IOMMU_API=y. But you are right, the ifdef is not very nice here. I solved this situation by moving the function into drivers/iommu/iommu.c which is only compiled with CONFIG_IOMMU_API=y anyway, so no ifdef is required anymore.
> Other than that, looks much better, thanks.
Great, I sent a new round if these patches. Moving this function to another file caused some changes in the following patches too during the rebase.
Thanks,
Joerg
-- AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo, Andrew Bowd Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
| |