Skip to content

Commit 9e6c535

Browse files
committed
Merge tag 'pci-v5.6-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/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
2 parents 750ce8c + 2e34673 commit 9e6c535

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

arch/x86/include/asm/pci.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ extern int pci_routeirq;
3333
extern int noioapicquirk;
3434
extern int noioapicreroute;
3535

36-
#ifdef CONFIG_PCI
37-
3836
static inline struct pci_sysdata *to_pci_sysdata(const struct pci_bus *bus)
3937
{
4038
return bus->sysdata;
4139
}
4240

41+
#ifdef CONFIG_PCI
42+
4343
#ifdef CONFIG_PCI_DOMAINS
4444
static inline int pci_domain_nr(struct pci_bus *bus)
4545
{

drivers/pci/ats.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,12 @@ void pci_restore_pasid_state(struct pci_dev *pdev)
426426
int pci_pasid_features(struct pci_dev *pdev)
427427
{
428428
u16 supported;
429-
int pasid = pdev->pasid_cap;
429+
int pasid;
430430

431431
if (pdev->is_virtfn)
432432
pdev = pci_physfn(pdev);
433433

434+
pasid = pdev->pasid_cap;
434435
if (!pasid)
435436
return -EINVAL;
436437

@@ -453,11 +454,12 @@ int pci_pasid_features(struct pci_dev *pdev)
453454
int pci_max_pasids(struct pci_dev *pdev)
454455
{
455456
u16 supported;
456-
int pasid = pdev->pasid_cap;
457+
int pasid;
457458

458459
if (pdev->is_virtfn)
459460
pdev = pci_physfn(pdev);
460461

462+
pasid = pdev->pasid_cap;
461463
if (!pasid)
462464
return -EINVAL;
463465

0 commit comments

Comments
 (0)