From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756019AbbIBUDw (ORCPT ); Wed, 2 Sep 2015 16:03:52 -0400 Received: from mga02.intel.com ([134.134.136.20]:37446 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752597AbbIBUDv (ORCPT ); Wed, 2 Sep 2015 16:03:51 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,456,1437462000"; d="scan'208";a="796940777" Date: Wed, 2 Sep 2015 13:01:27 -0700 From: "Sean O. Stalley" To: Bjorn Helgaas Cc: Yinghai Lu , Rajat Jain , "Michael S. Tsirkin" , =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , "gong.chen@linux.intel.com" , "linux-pci@vger.kernel.org" , Linux Kernel Mailing List , linux-api@vger.kernel.org Subject: Re: [PATCH 2/2] PCI: Add support for Enhanced Allocation devices Message-ID: <20150902200127.GA3347@sean.stalley.intel.com> References: <1440089947-2839-1-git-send-email-sean.stalley@intel.com> <1440089947-2839-3-git-send-email-sean.stalley@intel.com> <20150902174612.GA2700@sean.stalley.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 02, 2015 at 02:25:50PM -0500, Bjorn Helgaas wrote: > On Wed, Sep 2, 2015 at 12:46 PM, Sean O. Stalley wrote: > > > Would it be better to modify pci_claim_resource() to support EA instead of adding pci_ea_claim_resource()? > > That way, EA entries would be claimed at the same time as traditional BARs. > > Yes, I think so. Ok, I'll make it work this way in the next patchset. > Why wouldn't pci_claim_resource() work as-is for EA? I see that > pci_ea_get_parent_resource() defaults to iomem_resource or > ioport_resource if we don't find a parent, but I don't understand why > that's necessary. EA resources may (or may not) be in the parent's range[1]. If the parent doesn't describe this range, we want to default to the top-level resource. Other than that case, I think pci_claim_resource would work as-is. -Sean [1] From the EA ECN: For a bridge function that is permitted to implement EA based on the rules above, it is permitted, but not required, for the bridge function to use EA mechanisms to indicate resource ranges that are located behind the bridge Function (see Section 6.9.1.2).