From: Grant Grundler <grundler@cup.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] [PATCH] dynamic IRQ allocation
Date: Fri, 02 Aug 2002 18:58:57 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590701905889@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590701905851@msgid-missing>
"KOCHI, Takayoshi" wrote:
> But how can you trust Interrupt Line value set by BIOS?
I don't see any evidence ia64 uses INT_LINE from config space.
IA64 seems to overwrite pcidev->irq with the "vector" from ACPI.
However, I've not (recently) studied iosapic.c thoroughly.
Last time I took a close look was when david/stephane publish
the full ia64 source tree in Feb 2000 at NYLWE.
(http://lists.parisc-linux.org/hypermail/parisc-linux-cvs/2859.html)
My understanding is ia64 does a looks in the "PCI routing Table"
(_PRT) provided by ACPI. Input paramters to the lookup are IO SAPIC
address, IRQ *pin*, pci device bus/dev/func. Output values are
"global" IRQ number (= vector?) and which IRTE to use in the
given IO SAPIC.
> It is definitely not an interrupt vector number, as
> interrupt vector number is what OS allocates and ties into
> a device. Then is it a global interrupt vector?
I don't know the right terminology here.
I'd think "global" interrupt vector is what goes into pcidev->irq.
INT_LINE isn't used so maybe it just doesn't matter. ;^)
> The config space Interrupt Line value is only 8bit while
> ACPI 2.0 can describe 32bit global interrupt vector.
> NEC's platform actually use value of 256 and above
> for global interrupt vector, therefore Interrupt Line
> value of configuration space will be inevitably bogus.
right. similar issue on parisc.
...
> Okay, then pci_set_master and pci_disable_device are a pair of APIs
> and pci_enable_device/pci_disable_device are not symmetric... sigh.
I think that depends on which platform.
My preference would be drivers not use pci_set_master().
> It is ok for PCI hotplug that we don't have an architecture-dependent
> pci_disable_device hook because there are other hooks when
> a device driver releases control of a device.
ok.
> > Use different magic numbers for each IRQ?
> > They can be any *int* value. You can even use them to index into
> > an array or structures. The trick is to fully hide the IRQ<->pcidev
> > relationship in the platform specific support.
>
> Yes, but I think it will complicate things more than necessary.
ACPI seems to provide the "magic" number.
We don't need to anything else in addition so far.
> Now I understand that
>
> 1) pci_dev->irq should be fixed-up at pci_fixup stage
> in the kernel
s/should/could/
It's platform dependent.
> 2) pci_dev->irq is ia64 interrupt vector only
> because we choose to do so and can be implemented
> another way
> 3) ia64 interrupt vector can be allocated when enabled
> but we allocate ahead of enabling
>
> It is an implementation choice developers took long time ago
> that sharing a vector space with all processors in a system
> and one-to-one mapping between pci_dev->irq and interrupt vector.
yes. it's simple and sufficient for boxes currently on the market.
> iosapic.c has been written upon these assumptions.
> My patch doesn't break them.
TBH, I haven't looked at your patch.
> Implementing ia64 interrupt in other ways may be interesting
> but it's a 2.5-series matter. For 2.4, current vector
> allocation scheme is broken at least on our platform with large
> configuration. What we'd like to do now is fix these cases for
> stable series without breaking others.
ok.
thanks,
grant
next prev parent reply other threads:[~2002-08-02 18:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-30 2:36 [Linux-ia64] [PATCH] dynamic IRQ allocation KOCHI, Takayoshi
2002-07-30 5:01 ` Grant Grundler
2002-07-30 18:04 ` KOCHI, Takayoshi
2002-07-30 22:14 ` Grant Grundler
2002-07-30 23:49 ` KOCHI, Takayoshi
2002-08-01 1:03 ` Grant Grundler
2002-08-02 0:39 ` KOCHI, Takayoshi
2002-08-02 6:04 ` David Mosberger
2002-08-02 15:56 ` Bjorn Helgaas
2002-08-02 16:32 ` David Mosberger
2002-08-02 17:45 ` KOCHI, Takayoshi
2002-08-02 18:58 ` Grant Grundler [this message]
2002-08-02 21:22 ` David Mosberger
2002-08-02 21:44 ` Bjorn Helgaas
2002-08-02 21:47 ` David Mosberger
2002-08-02 22:01 ` KOCHI, Takayoshi
2002-08-02 22:04 ` David Mosberger
2002-08-02 22:22 ` KOCHI, Takayoshi
2002-08-02 22:37 ` Grant Grundler
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=marc-linux-ia64-105590701905889@msgid-missing \
--to=grundler@cup.hp.com \
--cc=linux-ia64@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