From: "Sean O. Stalley" <sean.stalley@intel.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
"Rajat Jain" <rajatxjain@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Rafał Miłecki" <zajec5@gmail.com>,
"gong.chen@linux.intel.com" <gong.chen@linux.intel.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
linux-api@vger.kernel.org
Subject: Re: [PATCH v2 0/2] PCI: Add support for PCI Enhanced Allocation "BARs"
Date: Wed, 23 Sep 2015 16:51:09 -0700 [thread overview]
Message-ID: <20150923235109.GA4384@sean.stalley.intel.com> (raw)
In-Reply-To: <CAE9FiQXYzcEnagnAZ_agXXSVssAfVD8tBjKh9ox_ajqKG0v27g@mail.gmail.com>
On Wed, Sep 23, 2015 at 04:26:56PM -0700, Yinghai Lu wrote:
> On Wed, Sep 23, 2015 at 3:27 PM, Sean O. Stalley <sean.stalley@intel.com> wrote:
> > PCI Enhanced Allocation is a new method of allocating MMIO & IO
> > resources for PCI devices & bridges. It can be used instead
> > of the traditional PCI method of using BARs.
> >
> > EA entries are hardware-initialized to a fixed address.
> > Unlike BARs, regions described by EA are cannot be moved.
> > Because of this, only devices which are permanently connected to
> > the PCI bus can use EA. A removable PCI card must not use EA.
>
> As it is fixed, can you put IORESOURCE_PCI_FIXED in the res->flags?
>
> Thanks
>
> Yinghai
IORESOURCE_PCI_FIXED is set in pci_ea_set_flags():
+static unsigned long pci_ea_set_flags(struct pci_dev *dev, u8 prop)
+{
+ unsigned long flags = IORESOURCE_PCI_FIXED;
+
+
Which is called in pci_ea_read(), and passed to res->flags (if there aren't any errors):
+
+ /* Try to use primary properties, otherwise fall back to secondary */
+ flags = pci_ea_set_flags(dev, PCI_EA_PP(dw0));
+ if (!flags)
+ flags = pci_ea_set_flags(dev, PCI_EA_SP(dw0));
+
...
+ res->flags = flags;
-Sean
next prev parent reply other threads:[~2015-09-23 23:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-23 22:27 [PATCH v2 0/2] PCI: Add support for PCI Enhanced Allocation "BARs" Sean O. Stalley
2015-09-23 22:27 ` [PATCH v2 1/2] PCI: Add Enhanced Allocation register entries Sean O. Stalley
2015-09-23 22:27 ` [PATCH v2 2/2] PCI: Add support for Enhanced Allocation devices Sean O. Stalley
2015-09-23 23:26 ` [PATCH v2 0/2] PCI: Add support for PCI Enhanced Allocation "BARs" Yinghai Lu
2015-09-23 23:51 ` Sean O. Stalley [this message]
2015-09-24 0:25 ` Yinghai Lu
2015-09-24 0:34 ` David Daney
2015-09-24 16:39 ` Sean O. Stalley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150923235109.GA4384@sean.stalley.intel.com \
--to=sean.stalley@intel.com \
--cc=bhelgaas@google.com \
--cc=gong.chen@linux.intel.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mst@redhat.com \
--cc=rajatxjain@gmail.com \
--cc=yinghai@kernel.org \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).