From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Michael Ellerman <michael@ellerman.id.au>
Cc: paulus@samba.org, linuxppc-dev@lists.ozlabs.org,
Anton Blanchard <anton@samba.org>
Subject: Re: [PATCH] powerpc: pseries: Round up MSI-X requests
Date: Wed, 13 Jun 2012 15:25:37 +1000 [thread overview]
Message-ID: <1339565137.9220.87.camel@pasglop> (raw)
In-Reply-To: <1339564687.8742.9.camel@concordia>
On Wed, 2012-06-13 at 15:18 +1000, Michael Ellerman wrote:
> On Tue, 2012-06-05 at 12:47 +1000, Anton Blanchard wrote:
> > Hi,
> >
> > > On Mon, 2012-06-04 at 16:43 +1000, Michael Ellerman wrote:
> > > > There is some chance this will result in breakage because the driver
> > > > asks for N - and assumes that is what was allocated - and the
> > > > device is configured for > N.
> > >
> > > We can fix that. We can whack the configuration back with N, just know
> > > that we have "allocated" > N.
>
> I think whacking config space is more likely to break something than
> just configuring more than the driver asked for.
How so ? I tend to disagree here..
.
> > I agree we don't want to be giving back a larger value than requested.
> > There's only one place that can happen in theory and since firmware only
> > returns power of two values I dont think it will happen in practise.
>
> Don't follow you here.
>
> > Even so do we want to do something like this (as yet untested)? If the
> > rounded up request fails we retry with the original request.
>
> Yes we do. Had a chance to test it?
>
> > The pseries msi free code just sets our vectors to 0 so it doesn't need
> > to know how many were originally allocated.
>
> Yep, looks like it will cope.
>
> We only create virqs for what's in pdev->msi_list, which will be what
> the driver originally asked for, and we free all those by walking the
> list again. So the fact that firmware allocated a few extra for us is
> OK, we have nothing extra to cleanup.
The firmware interface is busted anyway. We want to be able to
enable/allocate individual MSI-X at runtime, we need to get a new
interface sorted.
Ben.
prev parent reply other threads:[~2012-06-13 5:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-03 23:15 [PATCH] powerpc: pseries: Round up MSI-X requests Anton Blanchard
2012-06-04 6:43 ` Michael Ellerman
2012-06-04 6:54 ` Benjamin Herrenschmidt
2012-06-05 2:47 ` Anton Blanchard
2012-06-13 5:18 ` Michael Ellerman
2012-06-13 5:25 ` Benjamin Herrenschmidt [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=1339565137.9220.87.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=anton@samba.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=michael@ellerman.id.au \
--cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).