diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/iommu.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/iommu.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 3e5bfdafee63..1d3d52dc3ff3 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -199,7 +199,7 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
199 | 199 | ||
200 | local_irq_save(flags); /* to protect tcep and the page behind it */ | 200 | local_irq_save(flags); /* to protect tcep and the page behind it */ |
201 | 201 | ||
202 | tcep = __get_cpu_var(tce_page); | 202 | tcep = __this_cpu_read(tce_page); |
203 | 203 | ||
204 | /* This is safe to do since interrupts are off when we're called | 204 | /* This is safe to do since interrupts are off when we're called |
205 | * from iommu_alloc{,_sg}() | 205 | * from iommu_alloc{,_sg}() |
@@ -212,7 +212,7 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
212 | return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, | 212 | return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, |
213 | direction, attrs); | 213 | direction, attrs); |
214 | } | 214 | } |
215 | __get_cpu_var(tce_page) = tcep; | 215 | __this_cpu_write(tce_page, tcep); |
216 | } | 216 | } |
217 | 217 | ||
218 | rpn = __pa(uaddr) >> TCE_SHIFT; | 218 | rpn = __pa(uaddr) >> TCE_SHIFT; |
@@ -398,7 +398,7 @@ static int tce_setrange_multi_pSeriesLP(unsigned long start_pfn, | |||
398 | long l, limit; | 398 | long l, limit; |
399 | 399 | ||
400 | local_irq_disable(); /* to protect tcep and the page behind it */ | 400 | local_irq_disable(); /* to protect tcep and the page behind it */ |
401 | tcep = __get_cpu_var(tce_page); | 401 | tcep = __this_cpu_read(tce_page); |
402 | 402 | ||
403 | if (!tcep) { | 403 | if (!tcep) { |
404 | tcep = (__be64 *)__get_free_page(GFP_ATOMIC); | 404 | tcep = (__be64 *)__get_free_page(GFP_ATOMIC); |
@@ -406,7 +406,7 @@ static int tce_setrange_multi_pSeriesLP(unsigned long start_pfn, | |||
406 | local_irq_enable(); | 406 | local_irq_enable(); |
407 | return -ENOMEM; | 407 | return -ENOMEM; |
408 | } | 408 | } |
409 | __get_cpu_var(tce_page) = tcep; | 409 | __this_cpu_write(tce_page, tcep); |
410 | } | 410 | } |
411 | 411 | ||
412 | proto_tce = TCE_PCI_READ | TCE_PCI_WRITE; | 412 | proto_tce = TCE_PCI_READ | TCE_PCI_WRITE; |
@@ -574,8 +574,7 @@ static void pci_dma_bus_setup_pSeries(struct pci_bus *bus) | |||
574 | while (isa_dn && isa_dn != dn) | 574 | while (isa_dn && isa_dn != dn) |
575 | isa_dn = isa_dn->parent; | 575 | isa_dn = isa_dn->parent; |
576 | 576 | ||
577 | if (isa_dn_orig) | 577 | of_node_put(isa_dn_orig); |
578 | of_node_put(isa_dn_orig); | ||
579 | 578 | ||
580 | /* Count number of direct PCI children of the PHB. */ | 579 | /* Count number of direct PCI children of the PHB. */ |
581 | for (children = 0, tmp = dn->child; tmp; tmp = tmp->sibling) | 580 | for (children = 0, tmp = dn->child; tmp; tmp = tmp->sibling) |