From: Paul Mackerras Date: Thu, 29 Sep 2005 03:13:36 +0000 (+1000) Subject: Merge by hand from Linus' tree. X-Git-Tag: v2.6.15-rc1~59^2~237 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab11d1ea281e85895369ef57c5259ad8a432fabb;p=linux-2.6 Merge by hand from Linus' tree. Signed-off-by: Paul Mackerras --- ab11d1ea281e85895369ef57c5259ad8a432fabb diff --cc arch/ppc64/mm/hash_native.c index 874cf96938,bfd385b771..174d14576c --- a/arch/ppc64/mm/hash_native.c +++ b/arch/ppc64/mm/hash_native.c @@@ -348,8 -349,13 +348,7 @@@ static void native_flush_hash_range(uns j = 0; for (i = 0; i < number; i++) { - if (batch->addr[i] < KERNELBASE) - vsid = get_vsid(context, batch->addr[i]); - else - vsid = get_kernel_vsid(batch->addr[i]); - - va = (vsid << 28) | (batch->addr[i] & 0x0fffffff); - batch->vaddr[j] = va; + va = batch->vaddr[j]; - large = pte_huge(batch->pte[i]); if (large) vpn = va >> HPAGE_SHIFT; else diff --cc arch/ppc64/mm/tlb.c index 31afd95bf8,21fbffb23a..09ab81a10f --- a/arch/ppc64/mm/tlb.c +++ b/arch/ppc64/mm/tlb.c @@@ -141,19 -143,19 +141,21 @@@ void hpte_update(struct mm_struct *mm, * up scanning and resetting referenced bits then our batch context * will change mid stream. */ - if (unlikely(i != 0 && mm != batch->mm)) { - if (i != 0 && (context != batch->context || - batch->large != pte_huge(pte))) { ++ if (i != 0 && (mm != batch->mm || batch->large != pte_huge(pte))) { flush_tlb_pending(); i = 0; } - if (i == 0) - + if (i == 0) { - batch->context = context; batch->mm = mm; + batch->large = pte_huge(pte); + } + if (addr < KERNELBASE) { + vsid = get_vsid(mm->context.id, addr); + WARN_ON(vsid == 0); + } else + vsid = get_kernel_vsid(addr); + batch->vaddr[i] = (vsid << 28 ) | (addr & 0x0fffffff); batch->pte[i] = __pte(pte); - batch->addr[i] = addr; batch->index = ++i; if (i >= PPC64_TLB_BATCH_NR) flush_tlb_pending(); diff --cc include/asm-ppc64/tlbflush.h index 800bc0010c,74271d7c1d..626f505c6e --- a/include/asm-ppc64/tlbflush.h +++ b/include/asm-ppc64/tlbflush.h @@@ -20,9 -20,12 +20,10 @@@ struct mm_struct; struct ppc64_tlb_batch { unsigned long index; - unsigned long context; struct mm_struct *mm; pte_t pte[PPC64_TLB_BATCH_NR]; - unsigned long addr[PPC64_TLB_BATCH_NR]; unsigned long vaddr[PPC64_TLB_BATCH_NR]; + unsigned int large; }; DECLARE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch);