From: Jeff Garzik <jeff@garzik.org>
To: Shawn Jin <shawnxjin@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Multiple MSI messages support
Date: Tue, 30 Oct 2007 18:23:14 -0400 [thread overview]
Message-ID: <4727AED2.6010908@garzik.org> (raw)
In-Reply-To: <c3d0340b0710301413r2607ee08x8b27c5bffa43f1c4@mail.gmail.com>
Shawn Jin wrote:
> Hi,
>
> If this is really off-topic here, I apologize first. But I cannot
> think a better place to ask this particular question.
>
> I understand that the current PCI subsystem or linux kernel (x86)
> supports only one message when MSI is enabled even for devices having
> multiple MSI messages. But why? Is this a limitation solely due to the
> OS or due to the x86 APIC?
>
> I know the current linux kernel (2.6.23) changed MSI message data
> format a little bit to support other architectures. But some older
> version (e.g. 2.6.18) defined a specific format for the MSI msg data
> in a way that 8 bits contain the irq number and the other 8 bits have
> the interrupt attributes, which is x86 specific. Why does the msg data
> need to contain the irq number? Here is my hypothetic explanation. The
> device writes the MSI msg data to the specified MSI msg address. And
> APIC uses the irq number in the msg data to generate appropriate
> interrupt, which of course results in an appropriate ISR invoked. A
> device having multiple MSI messages typically appends some information
> of which MSI message to the msg data field. For example, if the system
> (or OS) configures the MSI msg data as 0x5000, a device having 4 MSI
> messages could write 0x5000, 0x5001, 0x5002, 0x5003 to differentiate
> the MSI messages. However this cannot work with the APIC due to the
> way how APIC asserts interrupts as I described above (if my
> understanding is correct).
>
> Hence my answer to the question is this is due to the x86 APIC. For
> other architectures such as powerpc this is probably not a problem
> since the interrupt controller is different. Am I correct?
IMO it's more like there has never been enough need for anybody to look
into it, I bet...
The way drivers are written, you are typically must touch a few key
hardware registers _anyway_, so the multiple messages in practice are
not much more useful than the simple fact that your MSI irq handler
function was called (with all that indicates and implies).
Jeff
next prev parent reply other threads:[~2007-10-30 22:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-30 21:13 Multiple MSI messages support Shawn Jin
2007-10-30 22:23 ` Jeff Garzik [this message]
2007-10-30 22:51 ` Roland Dreier
2007-10-30 23:02 ` David Miller
2007-10-31 1:34 ` Shawn Jin
2007-10-31 4:00 ` Jeff Garzik
2007-10-31 5:05 ` Shawn Jin
2007-10-31 5:17 ` Roland Dreier
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=4727AED2.6010908@garzik.org \
--to=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shawnxjin@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.