linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] Add definition for the number of standard PCI BARs
@ 2019-08-11 15:07 Denis Efremov
  2019-08-11 15:07 ` [PATCH 1/7] PCI: Add define " Denis Efremov
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Denis Efremov @ 2019-08-11 15:07 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Denis Efremov, Sebastian Ott, Gerald Schaefer, H. Peter Anvin,
	Giuseppe Cavallaro, Alexandre Torgue, Matt Porter,
	Alexandre Bounine, Peter Jones, Bartlomiej Zolnierkiewicz,
	Cornelia Huck, Alex Williamson, kvm, linux-fbdev, netdev, x86,
	linux-s390, linux-pci, linux-kernel

Code that iterates over all standard PCI BARs typically uses
PCI_STD_RESOURCE_END, but this is error-prone because it requires
"i <= PCI_STD_RESOURCE_END" rather than something like
"i < PCI_STD_NUM_BARS". We could add such a definition and use it the same
way PCI_SRIOV_NUM_BARS is used. There is already the definition
PCI_BAR_COUNT for s390 only. Thus, this patchset introduces it globally.

The patch is splitted into 7 parts for different drivers/subsystems for
easy readability.

Denis Efremov (7):
  PCI: Add define for the number of standard PCI BARs
  s390/pci: Replace PCI_BAR_COUNT with PCI_STD_NUM_BARS
  x86/PCI: Use PCI_STD_NUM_BARS in loops instead of PCI_STD_RESOURCE_END
  PCI/net: Use PCI_STD_NUM_BARS in loops instead of PCI_STD_RESOURCE_END
  rapidio/tsi721: use PCI_STD_NUM_BARS in loops instead of
    PCI_STD_RESOURCE_END
  efifb: Use PCI_STD_NUM_BARS in loops instead of PCI_STD_RESOURCE_END
  vfio_pci: Use PCI_STD_NUM_BARS in loops instead of
    PCI_STD_RESOURCE_END

 arch/s390/include/asm/pci.h                      |  5 +----
 arch/s390/include/asm/pci_clp.h                  |  6 +++---
 arch/s390/pci/pci.c                              | 16 ++++++++--------
 arch/s390/pci/pci_clp.c                          |  6 +++---
 arch/x86/pci/common.c                            |  2 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c |  4 ++--
 drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c   |  2 +-
 drivers/pci/quirks.c                             |  2 +-
 drivers/rapidio/devices/tsi721.c                 |  2 +-
 drivers/vfio/pci/vfio_pci.c                      |  4 ++--
 drivers/vfio/pci/vfio_pci_config.c               |  2 +-
 drivers/vfio/pci/vfio_pci_private.h              |  4 ++--
 drivers/video/fbdev/efifb.c                      |  2 +-
 include/linux/pci.h                              |  2 +-
 include/uapi/linux/pci_regs.h                    |  1 +
 15 files changed, 29 insertions(+), 31 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-08-13 12:48 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-11 15:07 [PATCH 0/7] Add definition for the number of standard PCI BARs Denis Efremov
2019-08-11 15:07 ` [PATCH 1/7] PCI: Add define " Denis Efremov
2019-08-11 15:07 ` [PATCH 2/7] s390/pci: Replace PCI_BAR_COUNT with PCI_STD_NUM_BARS Denis Efremov
2019-08-12 20:02   ` Bjorn Helgaas
2019-08-12 21:06     ` Denis Efremov
2019-08-11 15:07 ` [PATCH 3/7] x86/PCI: Use PCI_STD_NUM_BARS in loops instead of PCI_STD_RESOURCE_END Denis Efremov
2019-08-11 15:08 ` [PATCH 4/7] PCI/net: " Denis Efremov
2019-08-12 20:02   ` Bjorn Helgaas
2019-08-11 15:08 ` [PATCH 5/7] rapidio/tsi721: use " Denis Efremov
2019-08-11 15:08 ` [PATCH 6/7] efifb: Use " Denis Efremov
2019-08-13 12:48   ` Bartlomiej Zolnierkiewicz
2019-08-11 15:08 ` [PATCH 7/7] vfio_pci: " Denis Efremov
2019-08-12 20:02   ` Bjorn Helgaas
2019-08-12 20:52     ` Alex Williamson
2019-08-12  9:06 ` [PATCH 0/7] Add definition for the number of standard PCI BARs Andrew Murray
2019-08-12 21:00   ` Denis Efremov
2019-08-12 20:01 ` Bjorn Helgaas
2019-08-12 20:11   ` Thomas Gleixner

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).