Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752156AbbDJENI (ORCPT ); Fri, 10 Apr 2015 00:13:08 -0400 Received: from mail-ig0-f174.google.com ([209.85.213.174]:33889 "EHLO mail-ig0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750869AbbDJEND (ORCPT ); Fri, 10 Apr 2015 00:13:03 -0400 MIME-Version: 1.0 In-Reply-To: <1428622302.18187.87.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> <1428622302.18187.87.camel@kernel.crashing.org> Date: Thu, 9 Apr 2015 21:13:02 -0700 X-Google-Sender-Auth: 3Gcybi5tRWvfeO-gNrR9BJMeMes 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: 1068 Lines: 32 On Thu, Apr 9, 2015 at 4:31 PM, Benjamin Herrenschmidt wrote: >> 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, > > Do you need to pass bus if you have dev ? in following path: _pci_assign_resource only take dev, and it will go up for parent bus while ((ret = __pci_assign_resource(bus, dev, resno, size, min_align, fit))) { if (!bus->parent || !bus->self->transparent) break; bus = bus->parent; } and __pci_assign_resource will call pci_bus_alloc_resource. so it is could go up several levels to use upper bus there. -- 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/