Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934008AbbFWXCh (ORCPT ); Tue, 23 Jun 2015 19:02:37 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:35398 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933976AbbFWXCf (ORCPT ); Tue, 23 Jun 2015 19:02:35 -0400 MIME-Version: 1.0 In-Reply-To: <1435099588.3996.14.camel@kernel.crashing.org> References: <1432342336-25832-1-git-send-email-linux@roeck-us.net> <20150527210447.GY32152@google.com> <20150602145510.GE23650@red-moon> <1435099588.3996.14.camel@kernel.crashing.org> From: Bjorn Helgaas Date: Tue, 23 Jun 2015 18:02:14 -0500 Message-ID: Subject: Re: [PATCH] PCI: Only enable IO window if supported To: Benjamin Herrenschmidt Cc: Lorenzo Pieralisi , Guenter Roeck , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "suravee.suthikulpanit@amd.com" , Will Deacon 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: 1244 Lines: 28 On Tue, Jun 23, 2015 at 5:46 PM, Benjamin Herrenschmidt wrote: > On Tue, 2015-06-02 at 15:55 +0100, Lorenzo Pieralisi wrote: >> While at it, do you think it is reasonable to also claim the bridge >> windows (resources) in the respective pci_read_bridge_* calls ? > > No, don't claim in read. There's a clear distinction between gathering > resources and claiming them, and we need to keep that. > > Some fixups might happen in between the two for example. Are there any existing fixups like that? Concrete examples would help figure out the best way forward. Most arches call pci_read_bridge_bases() from pcibios_fixup_bus(). I think that's a poor place to do it because it's code that normally doesn't have to be arch-specific. Resource claiming is also usually done from arch code, and it shouldn't be arch-specific either. If we move both the read and claim into generic code, then we might need to make sure there's a fixup phase in between or something. Bjorn -- 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/