public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olaf Dabrunz <od@suse.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Olaf Dabrunz <od@suse.de>, Ingo Molnar <mingo@elte.hu>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Jon Masters <jonathan@jonmasters.org>,
	Stefan Assmann <sassmann@suse.de>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/7] Boot IRQ quirks and rerouting
Date: Tue, 3 Jun 2008 19:08:41 +0200	[thread overview]
Message-ID: <20080603170841.GI27585@suse.de> (raw)
In-Reply-To: <alpine.LFD.1.10.0806031201010.3235@apollo.tec.linutronix.de>

Hello Thomas, :)

On 03-Jun-08, Thomas Gleixner wrote:
> Olaf,
> 
> On Mon, 2 Jun 2008, Olaf Dabrunz wrote:
> > These patches are against linux-2.6-tip, auto-x86-next.
> > 
> > When IRQ lines on secondary or higher IO-APICs are masked (as done by
> > RT and others), many chipsets redirect IRQs on this line to the PIC, and
> > thereby regularly to the first IO-APIC in the system. This causes
> > spurious interrupts and can lead to disabled IRQ lines.
> > 
> > Disabling this "boot interrupt" (as it is mostly used to supply all
> > IRQs to the legacy PIC during boot) is chipset-specific, and not
> > possible for all chips. This patchset disables the boot interrupt on
> > chipsets where this is possible and where we know how to do it.
> > 
> > When disabling the boot interrupt is not possible, the patches tell the
> > IRQ code to always use the redirected interrupt line (on the first
> > IO-APIC) instead of the "original" line on the secondary (tertiary ...)
> > IO-APIC. The original line remains masked, and IRQs always appear on
> > the boot interrupt line on the first IO-APIC instead.
> 
> Thanks for doing the research on this problem. 
> 
> We probably don't want to enable this unconditionally right away, so
> we should have a command line option which enables these quirks.

Is this part of the process (sth like: keep it disabled until we trust
it)?

Otherwise I would suggest to enable the "disable-quirks" by default
(when we use the APICs), and to disable the reroute stuff by default
until people trust it.

The "disable-quirks" are what some chipset documentation recommends to
do in the ACPI "_PIC" method anyway, when APIC mode is selected by the
operating system. I have seen a few BIOSes that do exactly the same in
the "_PIC" method. They are straightforward and simple. I believe they
are safe in APIC mode (and off in PIC mode) and we should expose them to
testing.

The reroute patch is a bit of a hack for the chips where boot interrupts
cannot be switched off. It is a simple approach, and I can think up
(so far theoretical) scenarios where it breaks.

In defense of the reroute patch:

    - we have not seen it break during our testing on more than 10 intel
      machines (with and without chips on which it is used) and

    - so far the rerouting was only necessary for some intel bridges,
      and I checked that

        1) all these bridges use the same routing for boot interrupts to
           PCI IRQs, as in the i6700PXH datasheet, section 2.15.2:

                Pin          INT

                0,4,8,12  -> INTA
                1,5,9,13  -> INTB
                2,6,10,14 -> INTC
                3,7,11,15 -> INTD

           (also note that this routing pattern is required by the PCI
           specs for _cards_ that add PCI bridges, as the BIOS cannot
           otherwise know the routing)

        2) all intel ICHxs use the same routing for external PCI IRQs to
           the ICHx's IO-APIC, as in the ICH5 datasheet, section 5.9.2:

                Direct
                from Pin     IRQ #

                PIRQA#    -> 16
                PIRQB#    -> 17
                PIRQC#    -> 18
                PIRQD#    -> 19
                PIRQE#    -> 20
                PIRQF#    -> 21
                PIRQG#    -> 22
                PIRQH#    -> 23

      and as the ICH provides a PIC, it needs to be the first interrupt
      controller in the system, unless another chip also provides a PIC.

To break the reroute patch, someone would need to connect the PCI IRQs
from an intel PCI bridge that cannot disable boot interrupts
(6700PX[VH], 8033[23] or 6300ESB) to something other than an intel ICHx.
I have never seen such a board and I doubt there will be many such
boards.

> Also is there any interaction with MSI ?

The docs for the 6700PX[VH], and IIRC also for the 8033[23] or 6300ESB
say that boot irqs are generated when the original ones are masked. So
this is independent of MSI.

We have not many boards where MSI is enabled (as there are quirks for
many chips that switch MSI off). But our testing showed no problems on
MSI-enabled machines.

> Thanks,
> 	tglx

Thanks, :)

-- 
Olaf Dabrunz (od/odabrunz), SUSE Linux Products GmbH, Nürnberg


  reply	other threads:[~2008-06-03 17:11 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-02 12:45 [PATCH 0/7] Boot IRQ quirks and rerouting Olaf Dabrunz
2008-06-02 12:45 ` [PATCH 1/7] add kernel cmdline option to disable pci-irq quirks Olaf Dabrunz
2008-06-03 10:13   ` Thomas Gleixner
2008-06-03 17:00     ` Stefan Assmann
2008-06-02 12:45 ` [PATCH 2/7] reroute PCI interrupt to legacy boot interrupt equivalent Olaf Dabrunz
2008-06-03 10:37   ` Thomas Gleixner
2008-06-03 22:59     ` Randy Dunlap
2008-06-12 14:14     ` Olaf Dabrunz
2008-06-02 12:45 ` [PATCH 3/7] disable legacy boot interrupt generation Olaf Dabrunz
2008-06-03 10:40   ` Thomas Gleixner
2008-06-02 12:45 ` [PATCH 4/7] disable broadcomm " Olaf Dabrunz
2008-06-03 10:46   ` Thomas Gleixner
2008-06-03 15:46   ` Jon Masters
2008-06-03 15:59     ` Olaf Dabrunz
2008-06-03 16:05       ` Jon Masters
2008-06-03 17:27         ` Olaf Dabrunz
2008-06-02 12:45 ` [PATCH 5/7] disable AMD/ATI " Olaf Dabrunz
2008-06-03 10:54   ` Thomas Gleixner
2008-06-12 14:14     ` Olaf Dabrunz
2008-06-02 12:45 ` [PATCH 6/7] disable pci legacy boot irq quirks on noapic boot Olaf Dabrunz
2008-06-03 10:55   ` Thomas Gleixner
2008-06-02 12:45 ` [PATCH 7/7] bootirqquirk= parameter to enable bootirq quirks for additional chips Olaf Dabrunz
2008-06-03 10:56   ` Thomas Gleixner
2008-06-04 10:06     ` Olaf Dabrunz
2008-06-02 16:43 ` [PATCH 0/7] Boot IRQ quirks and rerouting Olaf Dabrunz
2008-06-03 10:11 ` Thomas Gleixner
2008-06-03 17:08   ` Olaf Dabrunz [this message]
2008-06-03 10:21 ` Olaf Dabrunz
2008-06-03 15:52 ` Jon Masters
2008-06-03 16:17   ` Stefan Assmann
2008-06-03 16:56   ` Olaf Dabrunz
2008-06-04  2:35 ` Eric W. Biederman
2008-06-04  9:49   ` Stefan Assmann
2008-06-04 10:45     ` Eric W. Biederman
2008-06-04 11:33       ` Stefan Assmann
2008-06-04 15:52         ` Maciej W. Rozycki
2008-06-04 16:08           ` Thomas Gleixner
2008-06-04 17:18             ` Maciej W. Rozycki
2008-06-04 17:33               ` Thomas Gleixner
2008-06-04 17:53                 ` Maciej W. Rozycki
2008-06-04 18:35                   ` Thomas Gleixner
2008-06-04 18:51                     ` Maciej W. Rozycki
2010-02-16  0:30           ` Yuhong Bao
2008-06-04 18:57         ` Jon Masters
2008-06-04 19:19           ` Maciej W. Rozycki
2008-06-04 19:59             ` Jon Masters
2008-06-04 22:07               ` Maciej W. Rozycki
2008-06-04 22:27                 ` Jon Masters
2008-06-04 23:08                   ` Maciej W. Rozycki
2008-06-04 11:37       ` Olaf Dabrunz
2008-06-04 18:44     ` Jon Masters

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=20080603170841.GI27585@suse.de \
    --to=od@suse.de \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=jonathan@jonmasters.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sassmann@suse.de \
    --cc=tglx@linutronix.de \
    /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