[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 0/5] pci: expand usage of pci_sbdf_t



pci: expand usage of pci_sbdf_t

Start by switching the seg, bus and devfn fields of pci_dev to a single
pci_sdbf_t field, and fixup the users. Also change the pci_conf and pci
capabilities related functions to use pci_sbdf_t as parameter instead of
passing the sbdf in multiple parameters. Finally also introduce a printf
format specifier to print a pci_sbdf_t.

IMO pci_sbdf_t it's nicer to use than passing around a sbdf in multiple
fields. However it's hard to expand the usage of pci_sbdf_t in the code
base without changing some of the core pci functions and the pci_dev
struct fields, hence this patch set.

Note there's still more low hanging fruit that could benefit from
switching to pci_sbdf_t, this patch series just changes some of the more
core pci functions to use pci_sbdf_t.

This series should not introduce any functional changes.

Roger Pau Monne (5):
  pci: use pci_sbdf_t in pci_dev
  pci: use function generation macros for pci_config_{write,read}<size>
  pci: switch pci_conf_{read/write} to use pci_sbdf_t
  print: introduce a format specifier for pci_sbdf_t
  pci: switch PCI capabilities related functions to use pci_sbdf_t

 docs/misc/printk-formats.txt                |   5 +
 xen/arch/x86/cpu/amd.c                      |  27 +-
 xen/arch/x86/dmi_scan.c                     |   9 +-
 xen/arch/x86/hvm/vmsi.c                     |  16 +-
 xen/arch/x86/mm.c                           |   2 +-
 xen/arch/x86/msi.c                          | 288 +++++++----------
 xen/arch/x86/oprofile/op_model_athlon.c     |  12 +-
 xen/arch/x86/x86_64/mmconf-fam10h.c         |  13 +-
 xen/arch/x86/x86_64/mmconfig-shared.c       |  26 +-
 xen/arch/x86/x86_64/pci.c                   | 136 +++-----
 xen/common/vsprintf.c                       |  18 ++
 xen/drivers/acpi/reboot.c                   |   8 +-
 xen/drivers/char/ehci-dbgp.c                |  78 +++--
 xen/drivers/char/ns16550.c                  |  80 ++---
 xen/drivers/passthrough/amd/iommu_acpi.c    |  17 +-
 xen/drivers/passthrough/amd/iommu_cmd.c     |  17 +-
 xen/drivers/passthrough/amd/iommu_detect.c  |  10 +-
 xen/drivers/passthrough/amd/iommu_init.c    |  37 ++-
 xen/drivers/passthrough/amd/iommu_intr.c    |  22 +-
 xen/drivers/passthrough/amd/iommu_map.c     |  10 +-
 xen/drivers/passthrough/amd/pci_amd_iommu.c |  65 ++--
 xen/drivers/passthrough/ats.h               |  14 +-
 xen/drivers/passthrough/pci.c               | 325 ++++++++------------
 xen/drivers/passthrough/vtd/dmar.c          |  56 ++--
 xen/drivers/passthrough/vtd/intremap.c      |  19 +-
 xen/drivers/passthrough/vtd/iommu.c         | 108 +++----
 xen/drivers/passthrough/vtd/qinval.c        |   2 +-
 xen/drivers/passthrough/vtd/quirks.c        | 102 +++---
 xen/drivers/passthrough/vtd/utils.c         |   6 +-
 xen/drivers/passthrough/vtd/x86/ats.c       |  11 +-
 xen/drivers/passthrough/x86/ats.c           |  32 +-
 xen/drivers/pci/pci.c                       |  40 +--
 xen/drivers/video/vga.c                     |  21 +-
 xen/drivers/vpci/header.c                   |  65 ++--
 xen/drivers/vpci/msi.c                      |  17 +-
 xen/drivers/vpci/msix.c                     |  39 +--
 xen/drivers/vpci/vpci.c                     |  42 +--
 xen/include/xen/pci.h                       |  45 ++-
 38 files changed, 836 insertions(+), 1004 deletions(-)

-- 
2.17.2 (Apple Git-113)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.