diff options
| -rw-r--r-- | drivers/iommu/dmar.c | 1 | ||||
| -rw-r--r-- | include/linux/dmar.h | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 8ed55b0a1ce4..68da1ab0f2cd 100644 --- a/drivers/iommu/dmar.c +++ b/drivers/iommu/dmar.c | |||
| @@ -155,6 +155,7 @@ dmar_alloc_pci_notify_info(struct pci_dev *dev, unsigned long event) | |||
| 155 | if (event == BUS_NOTIFY_ADD_DEVICE) { | 155 | if (event == BUS_NOTIFY_ADD_DEVICE) { |
| 156 | for (tmp = dev; tmp; tmp = tmp->bus->self) { | 156 | for (tmp = dev; tmp; tmp = tmp->bus->self) { |
| 157 | level--; | 157 | level--; |
| 158 | info->path[level].bus = tmp->bus->number; | ||
| 158 | info->path[level].device = PCI_SLOT(tmp->devfn); | 159 | info->path[level].device = PCI_SLOT(tmp->devfn); |
| 159 | info->path[level].function = PCI_FUNC(tmp->devfn); | 160 | info->path[level].function = PCI_FUNC(tmp->devfn); |
| 160 | if (pci_is_root_bus(tmp->bus)) | 161 | if (pci_is_root_bus(tmp->bus)) |
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 1deece46a0ca..593fff99e6bf 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
| @@ -56,13 +56,19 @@ struct dmar_drhd_unit { | |||
| 56 | struct intel_iommu *iommu; | 56 | struct intel_iommu *iommu; |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | struct dmar_pci_path { | ||
| 60 | u8 bus; | ||
| 61 | u8 device; | ||
| 62 | u8 function; | ||
| 63 | }; | ||
| 64 | |||
| 59 | struct dmar_pci_notify_info { | 65 | struct dmar_pci_notify_info { |
| 60 | struct pci_dev *dev; | 66 | struct pci_dev *dev; |
| 61 | unsigned long event; | 67 | unsigned long event; |
| 62 | int bus; | 68 | int bus; |
| 63 | u16 seg; | 69 | u16 seg; |
| 64 | u16 level; | 70 | u16 level; |
| 65 | struct acpi_dmar_pci_path path[]; | 71 | struct dmar_pci_path path[]; |
| 66 | } __attribute__((packed)); | 72 | } __attribute__((packed)); |
| 67 | 73 | ||
| 68 | extern struct rw_semaphore dmar_global_lock; | 74 | extern struct rw_semaphore dmar_global_lock; |
