diff options
Diffstat (limited to 'arch/ppc/mm/init.c')
-rw-r--r-- | arch/ppc/mm/init.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index 99b48abd3296..45f0782059f1 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c | |||
@@ -597,21 +597,20 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, | |||
597 | 597 | ||
598 | if (pfn_valid(pfn)) { | 598 | if (pfn_valid(pfn)) { |
599 | struct page *page = pfn_to_page(pfn); | 599 | struct page *page = pfn_to_page(pfn); |
600 | if (!PageReserved(page) | ||
601 | && !test_bit(PG_arch_1, &page->flags)) { | ||
602 | if (vma->vm_mm == current->active_mm) { | ||
603 | #ifdef CONFIG_8xx | 600 | #ifdef CONFIG_8xx |
604 | /* On 8xx, cache control instructions (particularly | 601 | /* On 8xx, the TLB handlers work in 2 stages: |
605 | * "dcbst" from flush_dcache_icache) fault as write | 602 | * First, a zeroed entry is loaded by TLBMiss handler, |
606 | * operation if there is an unpopulated TLB entry | 603 | * which causes the TLBError handler to be triggered. |
607 | * for the address in question. To workaround that, | 604 | * That means the zeroed TLB has to be invalidated |
608 | * we invalidate the TLB here, thus avoiding dcbst | 605 | * whenever a page miss occurs. |
609 | * misbehaviour. | 606 | */ |
610 | */ | 607 | _tlbie(address); |
611 | _tlbie(address); | ||
612 | #endif | 608 | #endif |
609 | if (!PageReserved(page) | ||
610 | && !test_bit(PG_arch_1, &page->flags)) { | ||
611 | if (vma->vm_mm == current->active_mm) | ||
613 | __flush_dcache_icache((void *) address); | 612 | __flush_dcache_icache((void *) address); |
614 | } else | 613 | else |
615 | flush_dcache_icache_page(page); | 614 | flush_dcache_icache_page(page); |
616 | set_bit(PG_arch_1, &page->flags); | 615 | set_bit(PG_arch_1, &page->flags); |
617 | } | 616 | } |