@@ -25,7 +25,7 @@ struct pci_sysdata {
void *fwnode; /* IRQ domain for MSI assignment */
#endif
#if IS_ENABLED(CONFIG_VMD)
- bool vmd_domain; /* True if in Intel VMD domain */
+ struct device *vmd_dev; /* Main device if in Intel VMD domain */
#endif
};
@@ -64,12 +64,11 @@ static inline void *_pci_root_bus_fwnode(struct pci_bus *bus)
#if IS_ENABLED(CONFIG_VMD)
static inline bool is_vmd(struct pci_bus *bus)
{
- return to_pci_sysdata(bus)->vmd_domain;
+ return to_pci_sysdata(bus)->vmd_dev != NULL;
}
#else
#define is_vmd(bus) false
#endif /* CONFIG_VMD */
-}
/* Can be used to override the logic in pci_scan_bus for skipping
already-configured bus numbers - to be used for buggy BIOSes
@@ -679,7 +679,7 @@ static int vmd_enable_domain(struct vmd_dev *vmd, unsigned long features)
.parent = res,
};
- sd->vmd_domain = true;
+ sd->vmd_dev = &vmd->dev->dev;
sd->domain = vmd_find_free_domain();
if (sd->domain < 0)
return sd->domain;