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: 3805171 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F1E77BF540 for ; Mon, 10 Mar 2014 18:24:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 243712010F for ; Mon, 10 Mar 2014 18:24:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3DE85202A1 for ; Mon, 10 Mar 2014 18:24:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752826AbaCJSYi (ORCPT ); Mon, 10 Mar 2014 14:24:38 -0400 Received: from mail-ig0-f178.google.com ([209.85.213.178]:59446 "EHLO mail-ig0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752605AbaCJSYg (ORCPT ); Mon, 10 Mar 2014 14:24:36 -0400 Received: by mail-ig0-f178.google.com with SMTP id uq10so9020711igb.5 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=V3zA96Ej96oEJ79Nszs1oihUKbnb7bUW1GlIEFYPoXMa5SrznCylst3hF3Kj88s3iP QC6B3vnzs53naDIzb2LZEWwnxiMTIy734gG7AVQopkRDb2HChmaByaHWr7yFZDq+lP8L 0JsR4R9OJtRUcM5kQ2VeVHJJMc/YTLljuzjynI09QckR8YBuq86YLhLMv8cikMe3zKHB IVDnclC+/4opzKm6LCsSLNlFr9h7TTfmC6dKpDrAs4W95ALfkqZ+VtcLgctf3q3CsFz4 IjzDwmoEsaxr6N5i8fa4UoyCPf8SMZsa5AGIRsejUsPJF44bmBHYHWD0DyFhK+X+YgBt 0upw== X-Gm-Message-State: ALoCoQnpRlJTWKrpEWJ9pKZCsIKrlp+TyrlApdDlEQ8XMNFE9brARDruDPfFVKLjE6hktpqE95jsXYJiF/f6zxBncKWuHRf2Mk3rQKMQtEbs9t7fN2PkeUFnVZN5LZ9C8/m0csL6Za7nSb4eWYq16EOIF1WN69K8JGaqulEKM5XlLYQMCc/acFu5Ou05kMAUi7fmITnpxPWxBXuKTKVEXlDCeQl+ecUC1Q== 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 Cc: Steven Newbury , Daniel Vetter , David Airlie , intel-gfx , Linux Kernel Mailing List , Yinghai Lu , linux-pci@vger.kernel.org Subject: Re: [Intel-gfx] agp/intel: can't ioremap flush page - no chipset flushing 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) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,RCVD_IN_DNSWL_HI,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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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