Re: [PATCH 1/2] x86/amd-iommu: Add extended feature detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 11, 2011 at 11:11:44AM -0400, Rolf Eike Beer wrote:
> > This patch adds detection of the extended features of an
> > AMD IOMMU. The available features are printed to dmesg on
> > boot.
> 
> > diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
> > index bcf58ea..d609610 100644
> > --- a/arch/x86/kernel/amd_iommu.c
> > +++ b/arch/x86/kernel/amd_iommu.c
> > @@ -29,8 +29,8 @@
> >  #include <asm/proto.h>
> >  #include <asm/iommu.h>
> >  #include <asm/gart.h>
> > -#include <asm/amd_iommu_proto.h>
> >  #include <asm/amd_iommu_types.h>
> > +#include <asm/amd_iommu_proto.h>
> >  #include <asm/amd_iommu.h>
> 
> That one (and the second place where this happens later) look suspicious.
> Do you need that change? Usually those includes tend to be alphabetically
> sorted (which you destroy here).
> 
> When you _need_ that change that means that you probably use some things
> from amd_iommu_types.h in amd_iommu_proto.h without including that header
> there (which is a bug in amd_iommu_proto.h and must be fixed there).
> Otherwise this change is just noise. So either way this change should not
> happen IMHO.

Yeah, this is not very good style, I agree with that. In this case the
amd_iommu_proto.h file got a new inline function which needs the struct
amd_iommu.

I have merging of the different include files for the AMD IOMMU driver
on my cleanup list. There are currently 3 include files which seems a
bit too much. A single one will do too. Meanwhile I change this patch so
that amd_iommu_proto.h will include amd_iommu_types.h itself. This
doesn't make it nice and clean but at least less ugly meanwhile ;)

	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

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux