Skip to content

Commit

Permalink
Merge tag 'pci-v5.6-fixes-1' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:

 - Define to_pci_sysdata() always to fix build breakage when !CONFIG_PCI
   (Jason A. Donenfeld)

 - Use PF PASID for VFs to fix VF IOMMU bind failures (Kuppuswamy
   Sathyanarayanan)

* tag 'pci-v5.6-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI/ATS: Use PF PASID for VFs
  x86/PCI: Define to_pci_sysdata() even when !CONFIG_PCI
  • Loading branch information
Linus Torvalds committed Feb 6, 2020
2 parents 750ce8c + 2e34673 commit 9e6c535
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions arch/x86/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ extern int pci_routeirq;
extern int noioapicquirk;
extern int noioapicreroute;

#ifdef CONFIG_PCI

static inline struct pci_sysdata *to_pci_sysdata(const struct pci_bus *bus)
{
return bus->sysdata;
}

#ifdef CONFIG_PCI

#ifdef CONFIG_PCI_DOMAINS
static inline int pci_domain_nr(struct pci_bus *bus)
{
Expand Down
6 changes: 4 additions & 2 deletions drivers/pci/ats.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,12 @@ void pci_restore_pasid_state(struct pci_dev *pdev)
int pci_pasid_features(struct pci_dev *pdev)
{
u16 supported;
int pasid = pdev->pasid_cap;
int pasid;

if (pdev->is_virtfn)
pdev = pci_physfn(pdev);

pasid = pdev->pasid_cap;
if (!pasid)
return -EINVAL;

Expand All @@ -453,11 +454,12 @@ int pci_pasid_features(struct pci_dev *pdev)
int pci_max_pasids(struct pci_dev *pdev)
{
u16 supported;
int pasid = pdev->pasid_cap;
int pasid;

if (pdev->is_virtfn)
pdev = pci_physfn(pdev);

pasid = pdev->pasid_cap;
if (!pasid)
return -EINVAL;

Expand Down

0 comments on commit 9e6c535

Please sign in to comment.