All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Alan <gnomes@lxorguk.ukuu.org.uk>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Nikhil P Rao <nikhil.rao@intel.com>
Subject: Re: [PATCH] pci: Allow very large resource windows
Date: Mon, 19 May 2014 14:28:53 -0600	[thread overview]
Message-ID: <20140519202853.GA1371@google.com> (raw)
In-Reply-To: <20140519130255.15364.49358.stgit@alan.etchedpixels.co.uk>

On Mon, May 19, 2014 at 02:03:14PM +0100, Alan wrote:
> From: Alan <alan@linux.intel.com>
> 
> This is needed for some of the Xeon Phi type systems.
> 
> Signed-off-by: Alan Cox <alan@linux.intel.com>

I applied this to my pci/resource branch for v3.16.  Nikhil
posted essentially the same patch a couple years ago, so I added
his signed-off-by and adopted his use of ARRAY_SIZE() to connect the
"order > 13" test with the aligns[] declaration.

Bjorn

> ---
>  drivers/pci/setup-bus.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
> index d219d44..4184112 100644
> --- a/drivers/pci/setup-bus.c
> +++ b/drivers/pci/setup-bus.c
> @@ -921,7 +921,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask,
>  {
>  	struct pci_dev *dev;
>  	resource_size_t min_align, align, size, size0, size1;
> -	resource_size_t aligns[12];	/* Alignments from 1Mb to 2Gb */
> +	resource_size_t aligns[14];	/* Alignments from 1Mb to 8Gb */
>  	int order, max_order;
>  	struct resource *b_res = find_free_bus_resource(bus, type);
>  	unsigned int mem64_mask = 0;
> @@ -960,7 +960,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask,
>  			/* For bridges size != alignment */
>  			align = pci_resource_alignment(dev, r);
>  			order = __ffs(align) - 20;
> -			if (order > 11) {
> +			if (order > 13) {
>  				dev_warn(&dev->dev, "disabling BAR %d: %pR "
>  					 "(bad alignment %#llx)\n", i, r,
>  					 (unsigned long long) align);
> 

  reply	other threads:[~2014-05-19 20:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 13:03 [PATCH] pci: Allow very large resource windows Alan
2014-05-19 20:28 ` Bjorn Helgaas [this message]
2014-05-23 17:51   ` Kevin Hilman
2014-05-23 17:51     ` Kevin Hilman
2014-05-23 18:41     ` Bjorn Helgaas
2014-05-23 18:41       ` Bjorn Helgaas
  -- strict thread matches above, loose matches on Subject: below --
2014-06-11  6:01 Guo Chao
2014-06-11 17:23 ` Yinghai Lu
2014-06-12 11:32   ` Guo Chao
2014-07-02 21:07   ` Bjorn Helgaas
2014-07-02 22:54     ` Yinghai Lu
2014-07-03 13:15       ` Bjorn Helgaas
2014-07-03 19:59         ` Yinghai Lu
2014-07-03 22:11           ` Bjorn Helgaas
2014-07-11  1:12             ` Yinghai Lu
2014-07-11 18:00               ` Bjorn Helgaas
2014-07-11 18:09                 ` Yinghai Lu
2014-07-11 18:21                   ` Linus Torvalds
2014-07-11 18:40                     ` Bjorn Helgaas
2014-07-12  1:22                       ` Yinghai Lu
2014-09-04  4:20                         ` Bjorn Helgaas
2014-04-28 20:23 Alan

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=20140519202853.GA1371@google.com \
    --to=bhelgaas@google.com \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=nikhil.rao@intel.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.