diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/iommu.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/iommu.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 9e90d41131d..513e2723149 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -42,13 +42,14 @@ | |||
42 | #include <asm/pci-bridge.h> | 42 | #include <asm/pci-bridge.h> |
43 | #include <asm/machdep.h> | 43 | #include <asm/machdep.h> |
44 | #include <asm/abs_addr.h> | 44 | #include <asm/abs_addr.h> |
45 | #include <asm/plpar_wrappers.h> | ||
46 | #include <asm/pSeries_reconfig.h> | 45 | #include <asm/pSeries_reconfig.h> |
47 | #include <asm/systemcfg.h> | 46 | #include <asm/systemcfg.h> |
48 | #include <asm/firmware.h> | 47 | #include <asm/firmware.h> |
49 | #include <asm/tce.h> | 48 | #include <asm/tce.h> |
50 | #include <asm/ppc-pci.h> | 49 | #include <asm/ppc-pci.h> |
51 | 50 | ||
51 | #include "plpar_wrappers.h" | ||
52 | |||
52 | #define DBG(fmt...) | 53 | #define DBG(fmt...) |
53 | 54 | ||
54 | extern int is_python(struct device_node *); | 55 | extern int is_python(struct device_node *); |
@@ -498,7 +499,7 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long acti | |||
498 | 499 | ||
499 | switch (action) { | 500 | switch (action) { |
500 | case PSERIES_RECONFIG_REMOVE: | 501 | case PSERIES_RECONFIG_REMOVE: |
501 | if (pci->iommu_table && | 502 | if (pci && pci->iommu_table && |
502 | get_property(np, "ibm,dma-window", NULL)) | 503 | get_property(np, "ibm,dma-window", NULL)) |
503 | iommu_free_table(np); | 504 | iommu_free_table(np); |
504 | break; | 505 | break; |