]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/IOV: Use VF0 cached config registers for other VFs
authorKarimAllah Ahmed <karahmed@amazon.de>
Mon, 19 Mar 2018 20:06:00 +0000 (21:06 +0100)
committerBjorn Helgaas <helgaas@kernel.org>
Sat, 31 Mar 2018 20:32:43 +0000 (15:32 -0500)
commit73cf00e8d8d5d7b0afc341cf70d034836a2bec2d
treee2a61ebd1a8c46a4fcac4231effc95a7c8469a75
parentf70aa0e9d2ac1bdba5fa96e383def8899d40c9fa
PCI/IOV: Use VF0 cached config registers for other VFs

Cache some config data from VF0 and use it for all other VFs instead of
reading it from the config space of each VF.  We assume these items are the
same across all associated VFs:

   Revision ID
   Class Code
   Subsystem Vendor ID
   Subsystem ID

This is an optimization when enabling SR-IOV on a device with many VFs.

Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
[bhelgaas: changelog, simplify comments, remove unused "device", test
CONFIG_PCI_IOV instead of CONFIG_PCI_ATS, rename functions]
Signed-off-by: Bjorn Helgaas <helgaas@kernel.org>
drivers/pci/iov.c
drivers/pci/pci.h
drivers/pci/probe.c