All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Prarit Bhargava" <prarit@redhat.com>,
	"Don Zickus" <dzickus@redhat.com>,
	"Don Dutile" <ddutile@redhat.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Asit Mallick" <asit.k.mallick@intel.com>,
	"David Woodhouse" <dwmw2@infradead.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"Joerg Roedel" <joro@8bytes.org>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"Arkadiusz Miśkiewicz" <arekm@maven.pl>
Subject: Re: [PATCH v9] irq: add quirk for broken interrupt remapping on 55XX chipsets
Date: Mon, 15 Apr 2013 20:43:52 -0400	[thread overview]
Message-ID: <20130416004352.GA10615@neilslaptop.think-freely.org> (raw)
In-Reply-To: <CAE9FiQU_4ix-mc3aL6nrZD6fexm_52jV-=W-But=eTfx6=U0uA@mail.gmail.com>

On Mon, Apr 15, 2013 at 04:02:56PM -0700, Yinghai Lu wrote:
> On Mon, Apr 15, 2013 at 3:41 PM, Neil Horman <nhorman@tuxdriver.com> wrote:
> > A few years back intel published a spec update:
> > http://www.intel.com/content/dam/doc/specification-update/5520-and-5500-chipset-ioh-specification-update.pdf
> >
><snip>
> > diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> > index 3755ef4..ef4ac6c 100644
> > --- a/arch/x86/kernel/early-quirks.c
> > +++ b/arch/x86/kernel/early-quirks.c
> > @@ -18,6 +18,7 @@
> >  #include <asm/apic.h>
> >  #include <asm/iommu.h>
> >  #include <asm/gart.h>
> > +#include "../drivers/iommu/irq_remapping.h"
> 
> looks ugly.
> 
Yes, but I think its acceptible given that it makes sense to me to define the
irq_remap_broken flag in the common driver code.  We can certainly move the
header around, but I'd much rather do that in a separate patch.

> >
> >  static void __init fix_hypertransport_config(int num, int slot, int func)
> >  {
> > @@ -192,6 +193,27 @@ static void __init ati_bugs_contd(int num, int slot, int func)
> >  }
> >  #endif
> >
> > +#ifdef CONFIG_IRQ_REMAP
> > +static void __init intel_remapping_check(int num, int slot, int func)
> > +{
> > +       u8 revision;
> > +
> > +       revision = read_pci_config_byte(num, slot, func, PCI_REVISION_ID);
> > +
> > +       /*
> > +        * Revision 0x13 of this chipset supports irq remapping
> > +        * but has an erratum that breaks its behavior, flag it as such
> > +        */
> > +       if (revision == 0x13)
> > +               irq_remap_broken = 1;
> 
> change to more specific like:
> 
> intel_55xx_rev13_found?
> 
No.  This was discussed previously, and the consensus was that we
can use a generic name, should other chips have simmilarly broken functionality.

><snip>
> >
> >  int disable_irq_remap;
> > +int irq_remap_broken;
> >  int disable_sourceid_checking;
> >  int no_x2apic_optout;
> >
> > diff --git a/drivers/iommu/irq_remapping.h b/drivers/iommu/irq_remapping.h
> > index ecb6376..90c4dae 100644
> > --- a/drivers/iommu/irq_remapping.h
> > +++ b/drivers/iommu/irq_remapping.h
> > @@ -32,6 +32,7 @@ struct pci_dev;
> >  struct msi_msg;
> >
> >  extern int disable_irq_remap;
> > +extern int irq_remap_broken;
> >  extern int disable_sourceid_checking;
> >  extern int no_x2apic_optout;
> >  extern int irq_remapping_enabled;
> > @@ -89,6 +90,7 @@ extern struct irq_remap_ops amd_iommu_irq_ops;
> >
> >  #define irq_remapping_enabled 0
> >  #define disable_irq_remap     1
> > +#define irq_remap_broken      0
> 
> this one is needed
> 
Um, yes?  I think you mean to say its not needed, since all the users of this
check are only in code thats compiled conditionally with CONFIG_IRQ_REMAP.
You're correct, but I like to have it there for completness, should that change
in the future.

Neil


  reply	other threads:[~2013-04-16  0:44 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 17:17 [PATCH] irq: add quirk for broken interrupt remapping on 55XX chipsets Neil Horman
2013-03-01 18:20 ` Yinghai Lu
2013-03-01 19:29   ` Neil Horman
2013-03-02  2:28   ` Jiang Liu
2013-03-02 15:59 ` Andreas Mohr
2013-03-04 13:24   ` Don Dutile
2013-03-10  1:11     ` Prarit Bhargava
2013-03-02 16:21 ` Prarit Bhargava
2013-03-02 20:13   ` Neil Horman
2013-03-04 19:04 ` [PATCH v2] " Neil Horman
2013-03-09 20:49   ` Neil Horman
2013-03-09 22:20     ` Myron Stowe
2013-03-11  1:31       ` Don Dutile
2013-03-11 11:25       ` Neil Horman
2013-03-11 12:17         ` Prarit Bhargava
2013-04-03 23:53   ` Bjorn Helgaas
2013-04-04 11:17     ` Neil Horman
2013-04-04 14:27     ` David Woodhouse
2013-04-04 14:50       ` Neil Horman
2013-04-04 14:50         ` Neil Horman
2013-04-04 14:57         ` Bjorn Helgaas
2013-04-04 15:39           ` Neil Horman
2013-04-04 17:14             ` Bjorn Helgaas
2013-04-04 17:14               ` Bjorn Helgaas
2013-04-04 17:51               ` Neil Horman
2013-04-04 18:41                 ` Bjorn Helgaas
2013-04-04 18:41                   ` Bjorn Helgaas
2013-04-04 20:02                   ` Neil Horman
2013-04-04 13:54 ` [PATCH v3] " Neil Horman
2013-04-04 15:08 ` [PATCH v4] " Neil Horman
2013-04-04 16:16   ` Yinghai Lu
2013-04-04 17:27     ` Don Dutile
2013-04-04 17:40       ` Yinghai Lu
2013-04-04 20:04         ` Neil Horman
2013-04-04 20:33           ` Bjorn Helgaas
2013-04-04 21:11             ` Yinghai Lu
2013-04-05  0:24               ` Neil Horman
2013-04-05 19:25 ` [PATCH v5] " Neil Horman
2013-04-05 19:29   ` Neil Horman
2013-04-05 19:31 ` [PATCH v6] " Neil Horman
2013-04-05 23:37   ` Yinghai Lu
2013-04-06  1:55   ` Bjorn Helgaas
2013-04-08 15:29     ` Don Dutile
2013-04-08 17:17       ` Bjorn Helgaas
2013-04-08 17:42         ` Neil Horman
2013-04-09 10:08           ` Joerg Roedel
2013-04-15 11:18 ` [PATCH v7] " Neil Horman
2013-04-15 15:30   ` Bjorn Helgaas
2013-04-15 16:28     ` Neil Horman
2013-04-15 16:28 ` [PATCH v8] " Neil Horman
2013-04-15 22:41 ` [PATCH v9] " Neil Horman
2013-04-15 23:02   ` Yinghai Lu
2013-04-16  0:43     ` Neil Horman [this message]
2013-04-16  6:20   ` Arkadiusz Miskiewicz
2013-04-16 10:24   ` Joerg Roedel
2013-04-16 13:07     ` Neil Horman
2013-04-16 13:35     ` Neil Horman
2013-04-16 16:37       ` Joerg Roedel
2013-04-16 17:25         ` Neil Horman
2013-04-16 20:38 ` [PATCH v10] " Neil Horman
2013-04-16 22:08   ` Don Dutile
2013-04-18 15:02   ` Joerg Roedel
2013-04-18 17:00     ` Neil Horman

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=20130416004352.GA10615@neilslaptop.think-freely.org \
    --to=nhorman@tuxdriver.com \
    --cc=arekm@maven.pl \
    --cc=asit.k.mallick@intel.com \
    --cc=bhelgaas@google.com \
    --cc=ddutile@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=dzickus@redhat.com \
    --cc=joro@8bytes.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=prarit@redhat.com \
    --cc=yinghai@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.