public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
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 22:42:49 -0700	[thread overview]
Message-ID: <20080821054249.GA3192@kroah.com> (raw)
In-Reply-To: <C86899CCB10A6C4E93D5978DCB232D4B091A399F@GDCMX01.igglobal.com>

On Tue, Aug 19, 2008 at 10:41:26AM +0530, Rajat Jain wrote:
> 
> Hi,
> 
> 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. 
> 
> 1) My first question is WHO writes that IRQ value in the device
> configuration space? Is it hardwired on the card? Is it written by the
> PCI controller driver or some other kernel component? Or some other
> piece of software takes care of it?

The BIOS/ACPI handles this, the kernel does not assign this directly
(well, kind of indirectly, but it's complex...)

> 2) Secondly, irrespective of whoever writes it, what determines the irq
> vector VALUE that will be written? So given that a PCI card uses PCI
> INTA, what determines the IRQ vector associated with it? My
> understanding is that the board specifications say something like "The
> INTA from this PCI slot goes to IRQx input of interrupt controller". And
> then from interrupt controller dosument we can find out which IRQ vector
> is associated with input IRQx. Is this right?

Kind of, please realize that irq's are getting to be more and more
"fake" with the advent of pci express and MSI.

All of this is handled by ACPI on intel-based processors, if you want to
go read that mess of a spec.

> 3) Lastly, if we boot linux and a different OS, on the same board with
> the same PCI card plugged in, are they bound to use the same IRQ number?
> Why or why not?

They should be, but I have seen plenty of instances where it is not the
same.  This is usually bios bugs.  Older versions of the kernel used to
tell ACPI that the OS was Linux, now we say we are windows so this
shouldn't happen anymore.

Sorry for being vague, but for a driver writer or a user, none of this
matters, as it out of your hands :)

thanks,

greg k-h
--
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

      parent reply	other threads:[~2008-08-21  5:42 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
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 [this message]

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=20080821054249.GA3192@kroah.com \
    --to=greg@kroah.com \
    --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