Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9398
b: refs/heads/master
c: 0f9578b
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Linus Torvalds committed Sep 28, 2005
1 parent 430ff15 commit 4edd5a0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 485ef69edefd7fc7f351c94d0d77b3ed8a242f7b
refs/heads/master: 0f9578b70a9f112bfb541e1d5ab486a376e64503
5 changes: 2 additions & 3 deletions trunk/arch/ppc64/mm/hash_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ static void native_flush_hash_range(unsigned long context,
hpte_t *hptep;
unsigned long hpte_v;
struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch);
unsigned long large;
unsigned long large = batch->large;

local_irq_save(flags);

Expand All @@ -356,7 +356,6 @@ static void native_flush_hash_range(unsigned long context,

va = (vsid << 28) | (batch->addr[i] & 0x0fffffff);
batch->vaddr[j] = va;
large = pte_huge(batch->pte[i]);
if (large)
vpn = va >> HPAGE_SHIFT;
else
Expand Down Expand Up @@ -406,7 +405,7 @@ static void native_flush_hash_range(unsigned long context,
asm volatile("ptesync":::"memory");

for (i = 0; i < j; i++)
__tlbie(batch->vaddr[i], 0);
__tlbie(batch->vaddr[i], large);

asm volatile("eieio; tlbsync; ptesync":::"memory");

Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/ppc64/mm/tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,16 @@ void hpte_update(struct mm_struct *mm, unsigned long addr,
* up scanning and resetting referenced bits then our batch context
* will change mid stream.
*/
if (unlikely(i != 0 && context != batch->context)) {
if (i != 0 && (context != batch->context ||
batch->large != pte_huge(pte))) {
flush_tlb_pending();
i = 0;
}

if (i == 0) {
batch->context = context;
batch->mm = mm;
batch->large = pte_huge(pte);
}
batch->pte[i] = __pte(pte);
batch->addr[i] = addr;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-ppc64/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ struct ppc64_tlb_batch {
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);

Expand Down

0 comments on commit 4edd5a0

Please sign in to comment.