PCI: Add resizable BAR infrastructure
authorChristian König <christian.koenig@amd.com>
Tue, 24 Oct 2017 19:40:20 +0000 (14:40 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 24 Oct 2017 19:40:20 +0000 (14:40 -0500)
commit276b738deb5bf856b9f6049fcd92a967f52643d7
treecac0ccc12391b30c519e116c696955da34fdb8cb
parentcb21bc9469c4c8a4d38f52d779ccc11e4329f016
PCI: Add resizable BAR infrastructure

Add resizable BAR infrastructure, including defines and helper functions to
read the possible sizes of a BAR and update its size.  See PCIe r3.1, sec
7.22.

Link: https://pcisig.com/sites/default/files/specification_documents/ECN_Resizable-BAR_24Apr2008.pdf
Signed-off-by: Christian König <christian.koenig@amd.com>
[bhelgaas: rename to functions with "rebar" (to match #defines), drop shift
#defines, drop "_MASK" suffixes, fix typos, fix kerneldoc]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
drivers/pci/pci.c
drivers/pci/pci.h
include/uapi/linux/pci_regs.h