From: Bjorn Helgaas <bhelgaas@google.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: linux-pci@vger.kernel.org, Wei Yang <weiyang@linux.vnet.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH] PCI: keep resource size during alignment reordering
Date: Fri, 5 Jun 2015 14:38:31 -0500 [thread overview]
Message-ID: <20150605193831.GB20943@google.com> (raw)
In-Reply-To: <1432878000-10921-1-git-send-email-yinghai@kernel.org>
On Thu, May 28, 2015 at 10:40:00PM -0700, Yinghai Lu wrote:
> In d74b9027a4da ("PCI: Consider additional PF's IOV BAR alignment in sizing
> and assigning"), it stores additional alignment in realloc_head and takes
> this into consideration for assignment.
> During update the resource before reordering, it does not calculate
> resource end correctly.
>
> We need to keep the original resource size before updating start.
> otherwise we will smaller size during updating end.
>
> Fixes: d74b9027a4da ("PCI: Consider additional PF's IOV BAR alignment in sizing and assigning")
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> Cc: Wei Yang <weiyang@linux.vnet.ibm.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
I applied this with the following changelog, included here so search
engines can find the original thread:
PCI: Preserve resource size during alignment reordering
In d74b9027a4da ("PCI: Consider additional PF's IOV BAR alignment in sizing
and assigning"), we store additional alignment in realloc_head and take
this into consideration for assignment.
In __assign_resources_sorted(), we changed dev_res->res->start, then used
resource_start() (which depends on res->start), so the recomputed res->end
was completely bogus. Even if we'd had the correct size, the end would
have been off by one.
Preserve the resource size when we adjust its alignment.
[bhelgaas: changelog]
Fixes: d74b9027a4da ("PCI: Consider additional PF's IOV BAR alignment in sizing and assigning")
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Wei Yang <weiyang@linux.vnet.ibm.com>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
prev parent reply other threads:[~2015-06-05 19:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 5:40 [PATCH] PCI: keep resource size during alignment reordering Yinghai Lu
2015-05-29 21:16 ` Bjorn Helgaas
2015-05-30 5:46 ` Yinghai Lu
2015-06-01 2:25 ` Wei Yang
2015-06-01 23:07 ` Bjorn Helgaas
2015-06-05 19:38 ` Bjorn Helgaas [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=20150605193831.GB20943@google.com \
--to=bhelgaas@google.com \
--cc=benh@kernel.crashing.org \
--cc=linux-pci@vger.kernel.org \
--cc=weiyang@linux.vnet.ibm.com \
--cc=yinghai@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 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.