From patchwork Mon Mar 10 18:24:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 3805151 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 674BD9F369 for ; Mon, 10 Mar 2014 18:24:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A0A8202A1 for ; Mon, 10 Mar 2014 18:24:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B800F20237 for ; Mon, 10 Mar 2014 18:24:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2B46AFA5ED; Mon, 10 Mar 2014 11:24:39 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) by gabe.freedesktop.org (Postfix) with ESMTP id B96FFFA6E9 for ; Mon, 10 Mar 2014 11:24:37 -0700 (PDT) Received: by mail-ie0-f176.google.com with SMTP id rd18so7680701iec.21 for ; Mon, 10 Mar 2014 11:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=tLmFJ1OewZAgNPvz9u4CC13AkoOPF9YRpmwdRvArSQw=; b=n9funQQFyGibSO2MFNZriIaPsvi6dEgpu6fqFTa4EfQVxi6qgXUWnT28G4q00V18xc qNXes2XpGUykJZAD7kDrIbB89Gtekc6fpfo0DMqtrWWk1Giv8pwzLmzWGr26+opgiklP Z2bklk+PFWP9KaPevC5t+pkJE4ObgTkRyC54FaGRbHDD5ITgYR/6eAMpLMyYlBop2gVt 1USs4yPKvGtZ9A68ntex5VA29xb7IgIsBlr6XJVEN0uuctosgDq9scgneVAsPD4RCkI/ BBV1g0xZRqihbh26wFJi7xHmrL0ZsIsi/+RpVKuHev4y7XuC+yTWmWXF0nohEHLEKwhq A+sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=tLmFJ1OewZAgNPvz9u4CC13AkoOPF9YRpmwdRvArSQw=; b=C4s6V6Z2mOReyFU3iHohJ6UmrB0BNBy3kIWm8os6XTwMtdYgB/Rr2pBEvpLMUzhIGm igXgGIaNpVu8F5dnM/4SCMvtzWJ0zhw8oLhp7LxAahLbSv74z0gr3T+jzH8NBQ6pqZjK GeAKyaE9on9gh947PTnwFixoyH67wUncjvSfiA/5RCQH0wr//jHu+1IHdMric6R3hJdR SQcbr7+nwyok701duO8G1JbUG9teevKN2qhCN5+fxehc7j/QavCFykdwtAuSLJWdXymc /EkdfJCSvbxFlWiWnjd/VS7uRrW9bIJghq/FavPwmuIMnTxezf2o07j/b085PKAs4Q/a XgeQ== X-Gm-Message-State: ALoCoQmmYCZ2MBfwguNpumNNiuuVYuk69TeWh4/hsWbf3IpDRp4QV9zwEMOt9grgQb7EckM56kRAfLu4H4So95KQpU+NdzZ9YPxptf4I86KRWGEoK04whBbCa/sf9z45tNgYraGRmQYdE6MKEA7/Potl66Fm2gUaTgAPSepyLx7eB3zCS80rlububUn3ZqfDBgnIm/TgluqbmlKuXG/X1Ky8o2QINnxoLQ== X-Received: by 10.50.3.9 with SMTP id 9mr19747186igy.16.1394475876279; Mon, 10 Mar 2014 11:24:36 -0700 (PDT) Received: from google.com ([172.16.50.85]) by mx.google.com with ESMTPSA id an1sm35953188igc.0.2014.03.10.11.24.34 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 10 Mar 2014 11:24:35 -0700 (PDT) Date: Mon, 10 Mar 2014 12:24:31 -0600 From: Bjorn Helgaas To: Paul Bolle Message-ID: <20140310182431.GA11424@google.com> References: <1391951759.6036.7.camel@artifact> <1391952344.25424.4.camel@x220> <1394185698.5608.5.camel@x41> <1394212609.1987.6.camel@x41> <20140307204021.GA9822@google.com> <1394289877.31006.2.camel@x41> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1394289877.31006.2.camel@x41> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: David Airlie , Daniel Vetter , intel-gfx , Linux Kernel Mailing List , linux-pci@vger.kernel.org, Yinghai Lu Subject: Re: [Intel-gfx] agp/intel: can't ioremap flush page - no chipset flushing X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,RCVD_IN_DNSWL_MED,T_DKIM_INVALID,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP [+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 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 --- 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