public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <len.brown@intel.com>
To: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>,
	Jesse Barnes <jbarnes@engr.sgi.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: RE: 2.6.9-rc2-mm1
Date: 17 Sep 2004 02:50:11 -0400	[thread overview]
Message-ID: <1095403811.2046.51.camel@d845pe> (raw)
In-Reply-To: <452548B29F0CCE48B8ABB094307EBA1C0651E9A9@USRV-EXCH2.na.uis.unisys.com>

On Fri, 2004-09-17 at 01:18, Protasevich, Natalie wrote:
> > On Thursday 16 September 2004 11:14 am, Jesse Barnes wrote:
> > > On Thursday, September 16, 2004 2:40 am, Andrew Morton wrote:
> > >  bk-acpi.patch
> > >
> > > Looks like some changes in this patch break sn2.  In particular,
> this
> > > hunk in
> > > acpi_pci_irq_enable():
> > >
> > > -               if (dev->irq && (dev->irq <= 0xF)) {
> > > +               if (dev->irq >= 0 && (dev->irq <= 0xF)) {
> > >                        printk(" - using IRQ %d\n", dev->irq);
> > >                        return_VALUE(dev->irq);
> > >                }
> > >                else {
> > >                        printk("\n");
> > > -                       return_VALUE(0);
> > > +                       return_VALUE(-EINVAL);
> > >                }
> > >
> > > Now instead of returning 0, we'll get -EINVAL when a driver calls
> > > pci_enable_device.  This is arguably correct since there's no _PRT
> > > entry (and in fact no ACPI namespace on sn2), but shouldn't the
> code
> 
> > > above be looking at the 'pin' value instead of dev->irq?  The sn2
> > > specific PCI code sets up each
> > > dev->irq long before this with the correct values...

No, in this context, the variable "pin" is to select PCI INTA/B/C/D, not
a interrupt controller pin.

If SN2 is using its pre-determied interrupt configuration, then is is
probably a bug that it calls down into this code at all, since SN2 wants
this code to be a NOP, yes?

> > I think the change above is actually from
> >    incorrect-pci-interrupt-assignment-on-es7000-for-pin-zero.patch
> 
> > of which I am officially ignorant :-)

yeah, probably these IRQ patches should come through me, but haven't b/c
my patch throughput has been very low the last couple of weeks.  At
least if I ship no new patches I don't get blamed for breaking stuff;-)

> I realize now that this is very involved piece of code and a lot was
> built around the assumption that IRQ0 is a timer interrupt (pin 0 is
> for
> PCI on ES7000), and assumption that everyone honors this assumption :)
> However, it seems wrong that we are not able to read literally what
> ACPI
> says, such as irq 0 for INTA. Maybe, it would be better if the code
> above was returing an error code, not an irq, which is returned in dev
> anyway. It should be some creative way to resolve this issue... I
> think
> the idea in the comment above by Jesse Barnes has good potential. 

Yes, there are lots of places where IRQ0 is an error condition.  I
expect that this was lazyness based on the fact that the timer code is
hard-wired to use IRQ0, so it is always taken on IA32.  My suggestion
to un-hard-wire the timer code was not greeted with enthusiasm, so this
is how things sit.

But IRQ0 should not be a problem on the ES7000, as there is an override
to supply IRQ0 from pin 0:20.  pin 0:0, on the other hand is a PCI
interrupt on the ES7000, completely valid to be assigned from the _PRT
and to be assigned by the es7000-specific code to any arbitrary IRQ#.

I'm not sure exactly that the patch above was trying to fix.  Looks like
it is time to examine the latest ew7000 changes in detail.  But I think
the patch has pointed out that this routine really should be returning 0
for success and non zero for failure; and returning dev->irq was
probably a latent bug all along.

-Len




  reply	other threads:[~2004-09-17  6:52 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-17  5:18 2.6.9-rc2-mm1 Protasevich, Natalie
2004-09-17  6:50 ` Len Brown [this message]
2004-09-17 15:57   ` 2.6.9-rc2-mm1 Jesse Barnes
2004-11-09  8:47   ` acpi_pci_irq_enable (RE: 2.6.9-rc2-mm1) Len Brown
     [not found] <2F1dX-2r9-5@gated-at.bofh.it>
     [not found] ` <2F7VJ-7o7-7@gated-at.bofh.it>
     [not found]   ` <2F8fj-7yw-39@gated-at.bofh.it>
     [not found]     ` <2F8oL-7DK-1@gated-at.bofh.it>
     [not found]       ` <2F8oR-7DK-17@gated-at.bofh.it>
     [not found]         ` <2FwKr-7VO-7@gated-at.bofh.it>
     [not found]           ` <2GAsE-21G-9@gated-at.bofh.it>
2004-09-20 19:30             ` 2.6.9-rc2-mm1 Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2004-09-16  9:40 2.6.9-rc2-mm1 Andrew Morton
2004-09-16 13:10 ` 2.6.9-rc2-mm1 Diego Calleja
2004-09-16 12:27   ` 2.6.9-rc2-mm1 Alan Cox
2004-09-16 13:34 ` 2.6.9-rc2-mm1 Ryan Cumming
2004-09-16 14:20 ` 2.6.9-rc2-mm1 William Lee Irwin III
2004-09-16 16:45 ` 2.6.9-rc2-mm1 Norberto Bensa
2004-09-16 17:16   ` 2.6.9-rc2-mm1 Arjan van de Ven
2004-09-16 17:28     ` 2.6.9-rc2-mm1 Norberto Bensa
2004-09-16 17:30       ` 2.6.9-rc2-mm1 Arjan van de Ven
2004-09-17 19:29         ` 2.6.9-rc2-mm1 Valdis.Kletnieks
2004-09-20 17:41           ` 2.6.9-rc2-mm1 Terence Ripperda
2004-09-16 17:37   ` 2.6.9-rc2-mm1 Jedi/Sector One
2004-09-16 17:57     ` 2.6.9-rc2-mm1 Norberto Bensa
2004-09-16 17:14 ` 2.6.9-rc2-mm1 Jesse Barnes
2004-09-16 17:38   ` 2.6.9-rc2-mm1 Bjorn Helgaas
2004-09-17  3:00 ` 2.6.9-rc2-mm1 Norberto Bensa
2004-09-17 18:09 ` 2.6.9-rc2-mm1 Dominik Karall
2004-09-18  1:10 ` 2.6.9-rc2-mm1 Sean Neakums
2004-09-18  6:01 ` 2.6.9-rc2-mm1 William Lee Irwin III
2004-09-18  8:18   ` 2.6.9-rc2-mm1 Russell King
2004-09-20  1:12 ` 2.6.9-rc2-mm1 William Lee Irwin III
2004-09-20  4:37   ` 2.6.9-rc2-mm1 Paul Jackson
2004-09-20 23:27     ` 2.6.9-rc2-mm1 Jesse Barnes
2004-09-20  2:34 ` 2.6.9-rc2-mm1 William Lee Irwin III
2004-09-20  4:18   ` 2.6.9-rc2-mm1 Albert Cahalan
2004-09-20  7:47     ` 2.6.9-rc2-mm1 William Lee Irwin III
2004-09-20 15:00       ` 2.6.9-rc2-mm1 Albert Cahalan
2004-09-20 21:01         ` 2.6.9-rc2-mm1 William Lee Irwin III
2004-09-20 22:20           ` 2.6.9-rc2-mm1 William Lee Irwin III
     [not found] ` <200409201939.04207.>
2004-09-20 17:58   ` 2.6.9-rc2-mm1 Andrew Morton
2004-09-20 20:15     ` 2.6.9-rc2-mm1 Magnus Määttä
2004-09-20 20:45     ` 2.6.9-rc2-mm1 David Howells
2004-09-24  5:30 ` 2.6.9-rc2-mm1 William Lee Irwin III
2004-09-24  7:11   ` 2.6.9-rc2-mm1 Jens Axboe
2004-09-24  7:24     ` 2.6.9-rc2-mm1 William Lee Irwin III

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=1095403811.2046.51.camel@d845pe \
    --to=len.brown@intel.com \
    --cc=Natalie.Protasevich@UNISYS.com \
    --cc=akpm@osdl.org \
    --cc=bjorn.helgaas@hp.com \
    --cc=jbarnes@engr.sgi.com \
    --cc=linux-kernel@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