PCI: Identify Enhanced Allocation (EA) BAR Equivalent resources in sysfs
Resource flags are exposed to userspace via the sysfs "resource" file. lspci reads the sysfs file to determine resource properties. Add a "BAR Equivalent Indicator" flag so lspci can distinguish between [virtual] and [enhanced] resources. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Sean O. Stalley <sean.stalley@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
committed by
Bjorn Helgaas
parent
c20e128030
commit
92efb1bd9b
@@ -2228,7 +2228,7 @@ void pci_pm_init(struct pci_dev *dev)
|
|||||||
|
|
||||||
static unsigned long pci_ea_flags(struct pci_dev *dev, u8 prop)
|
static unsigned long pci_ea_flags(struct pci_dev *dev, u8 prop)
|
||||||
{
|
{
|
||||||
unsigned long flags = IORESOURCE_PCI_FIXED;
|
unsigned long flags = IORESOURCE_PCI_FIXED | IORESOURCE_PCI_EA_BEI;
|
||||||
|
|
||||||
switch (prop) {
|
switch (prop) {
|
||||||
case PCI_EA_P_MEM:
|
case PCI_EA_P_MEM:
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ struct resource {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* IO resources have these defined flags.
|
* IO resources have these defined flags.
|
||||||
|
*
|
||||||
|
* PCI devices expose these flags to userspace in the "resource" sysfs file,
|
||||||
|
* so don't move them.
|
||||||
*/
|
*/
|
||||||
#define IORESOURCE_BITS 0x000000ff /* Bus-specific bits */
|
#define IORESOURCE_BITS 0x000000ff /* Bus-specific bits */
|
||||||
|
|
||||||
@@ -110,6 +113,7 @@ struct resource {
|
|||||||
|
|
||||||
/* PCI control bits. Shares IORESOURCE_BITS with above PCI ROM. */
|
/* PCI control bits. Shares IORESOURCE_BITS with above PCI ROM. */
|
||||||
#define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */
|
#define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */
|
||||||
|
#define IORESOURCE_PCI_EA_BEI (1<<5) /* BAR Equivalent Indicator */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* I/O Resource Descriptors
|
* I/O Resource Descriptors
|
||||||
|
|||||||
Reference in New Issue
Block a user