Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933131AbbDISbe (ORCPT ); Thu, 9 Apr 2015 14:31:34 -0400 Received: from mail-ie0-f178.google.com ([209.85.223.178]:35823 "EHLO mail-ie0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932647AbbDISbb (ORCPT ); Thu, 9 Apr 2015 14:31:31 -0400 MIME-Version: 1.0 In-Reply-To: <1428569681.18187.69.camel@kernel.crashing.org> References: <1427857069-6789-1-git-send-email-yinghai@kernel.org> <1427857069-6789-4-git-send-email-yinghai@kernel.org> <20150406220638.GH10892@google.com> <20150406.203533.1356187749826485194.davem@davemloft.net> <20150408154759.GN10892@google.com> <1428527527.18187.28.camel@kernel.crashing.org> <1428549459.18187.56.camel@kernel.crashing.org> <1428569681.18187.69.camel@kernel.crashing.org> Date: Thu, 9 Apr 2015 11:31:30 -0700 X-Google-Sender-Auth: uqlC9jk57plnB2-nl_6ZJuE_6Fs Message-ID: Subject: Re: [PATCH 3/3] PCI: Set pref for mem64 resource of pcie device From: Yinghai Lu To: Benjamin Herrenschmidt Cc: Bjorn Helgaas , David Miller , David Ahern , "linux-pci@vger.kernel.org" , "sparclinux@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1341 Lines: 35 On Thu, Apr 9, 2015 at 1:54 AM, Benjamin Herrenschmidt wrote: > On Wed, 2015-04-08 at 23:26 -0500, Bjorn Helgaas wrote: >> I'm not planning to review this until after the merge window opens, >> but I took a quick glance, and I agree with Ben. I don't want to add >> a new IORESOURCE_ flag. I think a pci_resource_compatible() helper is >> a great idea. > > So the new resource flag was handy here still regardless of the > implementation choice because otherwise, we have to do the whole tree > walk to check for "PCI Express only path". > > *But*, this is a property of the device as a whole, not of the resource, > so we could instead have a pci_dev flag established at probe time that > indicates that the path to a given device is PCIe only. > That way, you avoid the special resource flag alltogether. in the assign path: pci_bus_alloc_resource() does not take dev pointer. should we make int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, to int pci_bus_alloc_resource(struct pci_bus *bus, struct pci_dev *dev, struct resource *res, ? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/