diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-12-10 05:12:25 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-12-10 06:23:47 -0500 |
commit | 8638c4914f34fedc1c13b1cc13f6d1e5a78c46b4 (patch) | |
tree | 55cc1616c02f140a92f467ef493137d5085537ff /arch/x86/kernel/amd_iommu.c | |
parent | b7cc9554bc73641c9ed4d7eb74b2d6e78f20abea (diff) |
x86/amd-iommu: Fix PCI hotplug with passthrough mode
The device change notifier is initialized in the dma_ops
initialization path. But this path is never executed for
iommu=pt. Move the notifier initialization to IOMMU hardware
init code to fix this.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 450dd6ac03d3..a83185080e91 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -1624,6 +1624,11 @@ static struct notifier_block device_nb = { | |||
1624 | .notifier_call = device_change_notifier, | 1624 | .notifier_call = device_change_notifier, |
1625 | }; | 1625 | }; |
1626 | 1626 | ||
1627 | void amd_iommu_init_notifier(void) | ||
1628 | { | ||
1629 | bus_register_notifier(&pci_bus_type, &device_nb); | ||
1630 | } | ||
1631 | |||
1627 | /***************************************************************************** | 1632 | /***************************************************************************** |
1628 | * | 1633 | * |
1629 | * The next functions belong to the dma_ops mapping/unmapping code. | 1634 | * The next functions belong to the dma_ops mapping/unmapping code. |
@@ -2250,8 +2255,6 @@ int __init amd_iommu_init_dma_ops(void) | |||
2250 | 2255 | ||
2251 | register_iommu(&amd_iommu_ops); | 2256 | register_iommu(&amd_iommu_ops); |
2252 | 2257 | ||
2253 | bus_register_notifier(&pci_bus_type, &device_nb); | ||
2254 | |||
2255 | amd_iommu_stats_init(); | 2258 | amd_iommu_stats_init(); |
2256 | 2259 | ||
2257 | return 0; | 2260 | return 0; |