diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/iommu.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/iommu.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 176f1f39d2d..9a12908510f 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -135,9 +135,10 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
135 | u64 rpn; | 135 | u64 rpn; |
136 | long l, limit; | 136 | long l, limit; |
137 | 137 | ||
138 | if (npages == 1) | 138 | if (npages == 1) { |
139 | return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, | 139 | tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, direction); |
140 | direction); | 140 | return; |
141 | } | ||
141 | 142 | ||
142 | tcep = __get_cpu_var(tce_page); | 143 | tcep = __get_cpu_var(tce_page); |
143 | 144 | ||
@@ -147,9 +148,11 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
147 | if (!tcep) { | 148 | if (!tcep) { |
148 | tcep = (u64 *)__get_free_page(GFP_ATOMIC); | 149 | tcep = (u64 *)__get_free_page(GFP_ATOMIC); |
149 | /* If allocation fails, fall back to the loop implementation */ | 150 | /* If allocation fails, fall back to the loop implementation */ |
150 | if (!tcep) | 151 | if (!tcep) { |
151 | return tce_build_pSeriesLP(tbl, tcenum, npages, | 152 | tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, |
152 | uaddr, direction); | 153 | direction); |
154 | return; | ||
155 | } | ||
153 | __get_cpu_var(tce_page) = tcep; | 156 | __get_cpu_var(tce_page) = tcep; |
154 | } | 157 | } |
155 | 158 | ||