mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Michael Ellerman <michael@ellerman.id.au>
Cc: linux-pci@atrey.karlin.mff.cuni.cz,
	Greg Kroah-Hartman <greg@kroah.com>,
	"David S. Miller" <davem@davemloft.net>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	<linux-kernel@vger.kernel.org>, Andrew Morton <akpm@osdl.org>,
	<daniel.e.wolstenholme@intel.com>
Subject: Re: [PATCH 10/21] MSI: Add an arch_msi_supported()
Date: Tue, 27 Mar 2007 23:54:43 -0600	[thread overview]
Message-ID: <m1fy7psyjg.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20070322105340.C6E43DDF66@ozlabs.org> (Michael Ellerman's message of "Thu, 22 Mar 2007 21:51:39 +1100")

Michael Ellerman <michael@ellerman.id.au> writes:

> Add an arch_msi_supported(), which gives archs a chance to check the input
> to pci_enable_msi/x. For MSI-X this routine might need the entry array, so
> pass it in. For plain MSI, NULL is passed, the arch routine needs to cope
> with that. Propagate the error value returned from the arch routine out to
> the caller.

Ugh.  I'm not very comfortable with passing struct msix_entry into
the architectures right now.

There are a couple of reasons.
- It's irq field is to small (so we need to change it at some point)
- No a single driver that calls pci_enable_msix uses the scatter gather
  feature (so the entry member is redundant).

So this struct msix_entry needs to change and we need to change the drivers
along with it.  Having to change a couple of architectures as well sounds
painful.  So we might as well fix that at the same time as we are
adding the RTAS support so architectures don't have to deal with this
nasty unused concept.

I'm thinking the same thing to do is to completely remove struct msix_entry
and just let drivers walk the linked list you introduce a few patches
later down.  All they need is to get their irq numbers anyway.

I was tempted to drop nvec as well since our irq numbers are virtual,
we could always delay the failure into request_irq.  But there are
a few embedded architectures like the arm where the number irqs
numbers may stay limited for a long time and if the driver will never
use all of the irqs we get to save some resources and some work.  So
that makes sense.

So can we please at least move this patch down to the end with the
rest of the RTAS arch support?

Moving it towards the end will allow it to be reviewed in the context
where it will be used and it will give us a chance to simplify
pci_enable_msix before we get there.

Eric

       reply	other threads:[~2007-03-28  5:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070322105340.C6E43DDF66@ozlabs.org>
2007-03-28  5:54 ` Eric W. Biederman [this message]
2007-03-29  4:13   ` Michael Ellerman
2007-03-29  4:41     ` Eric W. Biederman

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=m1fy7psyjg.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=daniel.e.wolstenholme@intel.com \
    --cc=davem@davemloft.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=michael@ellerman.id.au \
    /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

Powered by JetHome