diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2010-10-18 03:27:03 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-11-28 23:48:21 -0500 |
commit | a8daac8a517dacfea951424f67c1f07e1f76b2ad (patch) | |
tree | 32dff1b065dda352cbf3078ba31be685da87166a | |
parent | 34c4d012554ed8c99b3fb25baea9bab3507e9f76 (diff) |
powerpc/pseries: iommu cleanup
No need to initialize per-cpu pointer to NULL, it is the default.
Direct dma ops and no setup are the defaults, no need to set for
iommu-off.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/platforms/pseries/iommu.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index fa2906a103dd..9fecb313a4c9 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -140,7 +140,7 @@ static int tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
140 | return ret; | 140 | return ret; |
141 | } | 141 | } |
142 | 142 | ||
143 | static DEFINE_PER_CPU(u64 *, tce_page) = NULL; | 143 | static DEFINE_PER_CPU(u64 *, tce_page); |
144 | 144 | ||
145 | static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | 145 | static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, |
146 | long npages, unsigned long uaddr, | 146 | long npages, unsigned long uaddr, |
@@ -589,13 +589,8 @@ static struct notifier_block iommu_reconfig_nb = { | |||
589 | /* These are called very early. */ | 589 | /* These are called very early. */ |
590 | void iommu_init_early_pSeries(void) | 590 | void iommu_init_early_pSeries(void) |
591 | { | 591 | { |
592 | if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL)) { | 592 | if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL)) |
593 | /* Direct I/O, IOMMU off */ | ||
594 | ppc_md.pci_dma_dev_setup = NULL; | ||
595 | ppc_md.pci_dma_bus_setup = NULL; | ||
596 | set_pci_dma_ops(&dma_direct_ops); | ||
597 | return; | 593 | return; |
598 | } | ||
599 | 594 | ||
600 | if (firmware_has_feature(FW_FEATURE_LPAR)) { | 595 | if (firmware_has_feature(FW_FEATURE_LPAR)) { |
601 | if (firmware_has_feature(FW_FEATURE_MULTITCE)) { | 596 | if (firmware_has_feature(FW_FEATURE_MULTITCE)) { |