]> git.hungrycats.org Git - linux/commitdiff
ppc64: only calculate local when we need it, from paulus
authorAnton Blanchard <anton@samba.org>
Thu, 19 Sep 2002 20:28:58 +0000 (06:28 +1000)
committerAnton Blanchard <anton@samba.org>
Thu, 19 Sep 2002 20:28:58 +0000 (06:28 +1000)
include/asm-ppc64/tlb.h

index 40ecc89519cf939a2cc90e408532cbe428e78a32..b44c7a071892ddaf57edc769db4a390f68032f1a 100644 (file)
@@ -54,16 +54,17 @@ static inline void __tlb_remove_tlb_entry(mmu_gather_t *tlb, pte_t *ptep,
        if (pte_val(*ptep) & _PAGE_HASHPTE) {
                pte = __pte(pte_update(ptep, _PAGE_HPTEFLAGS, 0));
                if (pte_val(pte) & _PAGE_HASHPTE) {
-                       int local = 0;
-
-                       if (tlb->mm->cpu_vm_mask == (1 << cpu))
-                               local = 1;
 
                        batch->pte[i] = pte;
                        batch->addr[i] = address;
                        i++;
 
                        if (i == PPC64_TLB_BATCH_NR) {
+                               int local = 0;
+
+                               if (tlb->mm->cpu_vm_mask == (1 << cpu))
+                                       local = 1;
+
                                flush_hash_range(tlb->mm->context, i, local);
                                i = 0;
                        }