linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Wei Yang <weiyang@linux.vnet.ibm.com>
Cc: linux-pci@vger.kernel.org, Gavin Shan <shangw@linux.vnet.ibm.com>
Subject: Re: [PATCH 3/3] PCI: Pass full info for window alignment
Date: Fri, 6 Sep 2013 17:19:08 -0600	[thread overview]
Message-ID: <20130906231908.GE12956@google.com> (raw)
In-Reply-To: <1378431958-7874-3-git-send-email-weiyang@linux.vnet.ibm.com>

[+cc Gavin]

On Fri, Sep 06, 2013 at 09:45:58AM +0800, Wei Yang wrote:
> When calculating the window_alignment(), type information like IORESOURCE_MEM
> and IORESOURCE_PREFETCH is not enough for some platform.
> 
> As on powernv platform, one prefetchable window could be IORESOURCE_MEM_64 or
> not. The platform will calculate the alignment based on this information.
> 
> This patch passes the full info for window alignment.
> 
> Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
> ---
>  drivers/pci/setup-bus.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
> index 989de3c..8781eb1 100644
> --- a/drivers/pci/setup-bus.c
> +++ b/drivers/pci/setup-bus.c
> @@ -980,7 +980,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask,
>  	}
>  
>  	min_align = calculate_mem_align(aligns, max_order);
> -	min_align = max(min_align, window_alignment(bus, b_res->flags & mask));
> +	min_align = max(min_align, window_alignment(bus, b_res->flags));

This makes sense to me, but since Gavin added this window_alignment()
call recently with the mask, I'd like him to ack this before I apply it.

>  	size0 = calculate_memsize(size, min_size, 0, resource_size(b_res), min_align);
>  	if (children_add_size > add_size)
>  		add_size = children_add_size;
> -- 
> 1.7.1
> 

  reply	other threads:[~2013-09-06 23:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-06  1:45 [PATCH 1/3] PCI: use pci_is_root_bus() to check whether it is a root bus Wei Yang
2013-09-06  1:45 ` [PATCH 2/3] PCI: Use spec name for the comment of PCIe capability field Wei Yang
2013-09-06 23:12   ` Bjorn Helgaas
2013-09-09  2:10     ` Wei Yang
2013-09-06  1:45 ` [PATCH 3/3] PCI: Pass full info for window alignment Wei Yang
2013-09-06 23:19   ` Bjorn Helgaas [this message]
2013-09-06 23:09 ` [PATCH 1/3] PCI: use pci_is_root_bus() to check whether it is a root bus Bjorn Helgaas
2013-09-09  2:14   ` Wei Yang
2013-09-09  7:00   ` Wei Yang
2013-09-09 16:15     ` Bjorn Helgaas
2013-09-10  7:46       ` Wei Yang
2013-09-10 10:24         ` Benjamin Herrenschmidt
2013-09-11  0:45           ` Wei Yang
     [not found]   ` <CA+C+4OYxqgExkepUix5wU4VPRRUcnAFPQJcbUYcLHRcAmNgqgw@mail.gmail.com>
2013-09-09 16:10     ` Alex Chiang

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=20130906231908.GE12956@google.com \
    --to=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=shangw@linux.vnet.ibm.com \
    --cc=weiyang@linux.vnet.ibm.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 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).