public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Roedel, Joerg" <Joerg.Roedel@amd.com>
To: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: "iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH 1/2] x86/amd-iommu: Add extended feature detection
Date: Tue, 12 Apr 2011 08:33:05 +0200	[thread overview]
Message-ID: <20110412063305.GB20607@amd.com> (raw)
In-Reply-To: <4bd170057af715738bbc818219dffc04.squirrel@webmail.sf-mail.de>

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


  reply	other threads:[~2011-04-12  6:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-11  9:32 [PATCH 0/2] AMD IOMMU Extended feature base support Joerg Roedel
2011-04-11  9:32 ` [PATCH 1/2] x86/amd-iommu: Add extended feature detection Joerg Roedel
2011-04-11 15:11   ` Rolf Eike Beer
2011-04-12  6:33     ` Roedel, Joerg [this message]
2011-04-11  9:32 ` [PATCH 2/2] x86/amd-iommu: Add support for invalidate_all command Joerg Roedel
2011-04-11 13:57   ` Henrique de Moraes Holschuh
2011-04-11 14:08     ` Roedel, Joerg
  -- strict thread matches above, loose matches on Subject: below --
2011-04-12  7:44 [PATCH 0/2] AMD IOMMU Extended feature base support v2 Joerg Roedel
2011-04-12  7:44 ` [PATCH 1/2] x86/amd-iommu: Add extended feature detection Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110412063305.GB20607@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=eike-kernel@sf-tec.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox