]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/platforms/pseries/iommu.c
Merge tag 'powerpc-3.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
[karo-tx-linux.git] / arch / powerpc / platforms / pseries / iommu.c
index 3e5bfdafee63f350793d89d53a5d88fcf9870e18..1d3d52dc3ff31ed6ce0ab9b554c45c1233d0f039 100644 (file)
@@ -199,7 +199,7 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
 
        local_irq_save(flags);  /* to protect tcep and the page behind it */
 
-       tcep = __get_cpu_var(tce_page);
+       tcep = __this_cpu_read(tce_page);
 
        /* This is safe to do since interrupts are off when we're called
         * from iommu_alloc{,_sg}()
@@ -212,7 +212,7 @@ static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
                        return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr,
                                            direction, attrs);
                }
-               __get_cpu_var(tce_page) = tcep;
+               __this_cpu_write(tce_page, tcep);
        }
 
        rpn = __pa(uaddr) >> TCE_SHIFT;
@@ -398,7 +398,7 @@ static int tce_setrange_multi_pSeriesLP(unsigned long start_pfn,
        long l, limit;
 
        local_irq_disable();    /* to protect tcep and the page behind it */
-       tcep = __get_cpu_var(tce_page);
+       tcep = __this_cpu_read(tce_page);
 
        if (!tcep) {
                tcep = (__be64 *)__get_free_page(GFP_ATOMIC);
@@ -406,7 +406,7 @@ static int tce_setrange_multi_pSeriesLP(unsigned long start_pfn,
                        local_irq_enable();
                        return -ENOMEM;
                }
-               __get_cpu_var(tce_page) = tcep;
+               __this_cpu_write(tce_page, tcep);
        }
 
        proto_tce = TCE_PCI_READ | TCE_PCI_WRITE;
@@ -574,8 +574,7 @@ static void pci_dma_bus_setup_pSeries(struct pci_bus *bus)
        while (isa_dn && isa_dn != dn)
                isa_dn = isa_dn->parent;
 
-       if (isa_dn_orig)
-               of_node_put(isa_dn_orig);
+       of_node_put(isa_dn_orig);
 
        /* Count number of direct PCI children of the PHB. */
        for (children = 0, tmp = dn->child; tmp; tmp = tmp->sibling)