public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: Steven Newbury <steve@snewbury.org.uk>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	David Airlie <airlied@linux.ie>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Yinghai Lu <yinghai@kernel.org>,
	linux-pci@vger.kernel.org
Subject: Re: [Intel-gfx] agp/intel: can't ioremap flush page - no chipset flushing
Date: Mon, 10 Mar 2014 12:24:31 -0600	[thread overview]
Message-ID: <20140310182431.GA11424@google.com> (raw)
In-Reply-To: <1394289877.31006.2.camel@x41>

[+cc linux-pci]

On Sat, Mar 08, 2014 at 03:44:37PM +0100, Paul Bolle wrote:
> Bjorn Helgaas schreef op za 08-03-2014 om 07:12 [-0700]:
> > I assume you have CONFIG_PHYS_ADDR_T_64BIT=n (which is perfectly
> > legal); let me know if otherwise.
> 
> $ grep CONFIG_PHYS_ADDR_T_64BIT /boot/config-3.14.0-0.rc5.1.local2.fc20.i686 
> # CONFIG_PHYS_ADDR_T_64BIT is not set
> 
> So, yes, CONFIG_PHYS_ADDR_T_64BIT=n here.

Thanks.  Can you try the patch below?  I think it should fix the problem.


PCI: Don't check resource_size() in pci_bus_alloc_resource()

From: Bjorn Helgaas <bhelgaas@google.com>

When resource_size_t is 32 bits wide, e.g., when CONFIG_PHYS_ADDR_T_64BIT
is not defined, resource_size() on [mem 0x00000000-0xffffffff] returns 0
because (r->end - r->start + 1) overflows.

Therefore, we can't use "resource_size() == 0" to decide that allocation
from this resource will fail.  allocate_resource() should fail anyway if it
can't satisfy the address constraints, so we should just depend on that.

A [mem 0x00000000-0xffffffff] bus resource is obviously not really valid,
but we do fall back to it as a default when we don't have information about
host bridge apertures.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=71611
Fixes: f75b99d5a77d PCI: Enforce bus address limits in resource allocation
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/bus.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 00660cc502c5..38901665c770 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -162,8 +162,6 @@ static int pci_bus_alloc_from_region(struct pci_bus *bus, struct resource *res,
 
 		avail = *r;
 		pci_clip_resource_to_region(bus, &avail, region);
-		if (!resource_size(&avail))
-			continue;
 
 		/*
 		 * "min" is typically PCIBIOS_MIN_IO or PCIBIOS_MIN_MEM to

  reply	other threads:[~2014-03-10 18:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-08 19:06 agp/intel: can't ioremap flush page - no chipset flushing Paul Bolle
2014-02-08 19:59 ` Daniel Vetter
2014-02-08 20:22   ` Paul Bolle
2014-02-09  0:02     ` Daniel Vetter
2014-02-09 13:15       ` [Intel-gfx] " Steven Newbury
2014-02-09 13:25         ` Paul Bolle
2014-02-09 13:32           ` Steven Newbury
2014-02-10 21:33           ` Bjorn Helgaas
2014-03-06 20:25             ` Paul Bolle
2014-03-06 21:38               ` Bjorn Helgaas
2014-03-07 20:33               ` Bjorn Helgaas
2014-03-07  9:48             ` Paul Bolle
2014-03-07 16:55               ` Bjorn Helgaas
2014-03-07 17:16                 ` Paul Bolle
2014-03-07 20:40                   ` Bjorn Helgaas
2014-03-07 21:03                     ` Paul Bolle
2014-03-07 22:07                       ` Bjorn Helgaas
2014-03-08 14:12                     ` Bjorn Helgaas
2014-03-08 14:44                       ` Paul Bolle
2014-03-10 18:24                         ` Bjorn Helgaas [this message]
2014-03-10 23:45                           ` Paul Bolle
2014-03-11  0:07                             ` Bjorn Helgaas
2014-03-11  0:15                               ` Paul Bolle
2014-03-11  2:07                                 ` Bjorn Helgaas
2014-03-11  9:20                                   ` Paul Bolle

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=20140310182431.GA11424@google.com \
    --to=bhelgaas@google.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=pebolle@tiscali.nl \
    --cc=steve@snewbury.org.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox