public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
From: Rene Herman <rene.herman@keyaccess.nl>
To: Rajat Jain <Rajat.Jain@infogain.com>
Cc: kernelnewbies@nl.linux.org, linux-newbie@vger.kernel.org
Subject: Re: PCI interrupt queries
Date: Wed, 20 Aug 2008 20:04:59 +0200	[thread overview]
Message-ID: <48AC5CCB.6060302@keyaccess.nl> (raw)
In-Reply-To: <C86899CCB10A6C4E93D5978DCB232D4B091A43F9@GDCMX01.igglobal.com>

On 20-08-08 06:50, Rajat Jain wrote:

>> On 19-08-08 07:11, Rajat Jain wrote:
>>
>>> I want to understand who decides the IRQ number that a agiven PCI
>>> card will use. I understand that from a PCI device drivers point of
>>> view, it'll find the IRQ vector that it needs to attach by reading
>>> it from the configuration space of the device.
>> Actually, a quick look at struct pci_dev suggests you should
>> be using pci_dev->irq. Note sure why that is; maybe odd
>> bridged setups.
> 
> Where in source code is pci_dev->irq getting populated? I tried but
> could not exactly locate it...

pci_read_irq() it seems.

> OK. But who does it in an embedded environment (PPC for eg) where
> there is no POST software. The first piece of code that gets executed
> is U-boot and then the kernel. So who writes the LINE value into the
> config space?

If anything, the kernel and specifically that bit of the kernel that 
sets up the routing (if there is anything to setup; might ofcourse be 
fully hardwired there).

The "if anything" might be the reason for needing to use pci_dev->irq as 
per the comment. As said, don't know. Makes sense though; why would you 
write it back to config space if you can just supply it as part of pci_dev.

Rene.
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

  reply	other threads:[~2008-08-20 18:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-19  5:11 PCI interrupt queries Rajat Jain
2008-08-19 20:34 ` Rene Herman
2008-08-20  4:50   ` Rajat Jain
2008-08-20 18:04     ` Rene Herman [this message]
2008-08-21  9:31     ` Welch, Martyn (GE EntSol, Intelligent Platforms)
2008-08-21 11:10       ` Rene Herman
2008-08-21 11:12         ` Welch, Martyn (GE EntSol, Intelligent Platforms)
2008-08-21 17:14       ` Om
2008-08-21  5:42 ` Greg KH

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=48AC5CCB.6060302@keyaccess.nl \
    --to=rene.herman@keyaccess.nl \
    --cc=Rajat.Jain@infogain.com \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linux-newbie@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