diff options
Diffstat (limited to 'arch/powerpc/mm/mem.c')
-rw-r--r-- | arch/powerpc/mm/mem.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index d1c0758c5611..77b4637097e9 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -61,10 +61,6 @@ unsigned long memory_limit; | |||
61 | extern void hash_preload(struct mm_struct *mm, unsigned long ea, | 61 | extern void hash_preload(struct mm_struct *mm, unsigned long ea, |
62 | unsigned long access, unsigned long trap); | 62 | unsigned long access, unsigned long trap); |
63 | 63 | ||
64 | /* | ||
65 | * This is called by /dev/mem to know if a given address has to | ||
66 | * be mapped non-cacheable or not | ||
67 | */ | ||
68 | int page_is_ram(unsigned long pfn) | 64 | int page_is_ram(unsigned long pfn) |
69 | { | 65 | { |
70 | unsigned long paddr = (pfn << PAGE_SHIFT); | 66 | unsigned long paddr = (pfn << PAGE_SHIFT); |
@@ -490,19 +486,19 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, | |||
490 | !cpu_has_feature(CPU_FTR_NOEXECUTE) && | 486 | !cpu_has_feature(CPU_FTR_NOEXECUTE) && |
491 | pfn_valid(pfn)) { | 487 | pfn_valid(pfn)) { |
492 | struct page *page = pfn_to_page(pfn); | 488 | struct page *page = pfn_to_page(pfn); |
489 | #ifdef CONFIG_8xx | ||
490 | /* On 8xx, cache control instructions (particularly | ||
491 | * "dcbst" from flush_dcache_icache) fault as write | ||
492 | * operation if there is an unpopulated TLB entry | ||
493 | * for the address in question. To workaround that, | ||
494 | * we invalidate the TLB here, thus avoiding dcbst | ||
495 | * misbehaviour. | ||
496 | */ | ||
497 | _tlbie(address); | ||
498 | #endif | ||
493 | if (!PageReserved(page) | 499 | if (!PageReserved(page) |
494 | && !test_bit(PG_arch_1, &page->flags)) { | 500 | && !test_bit(PG_arch_1, &page->flags)) { |
495 | if (vma->vm_mm == current->active_mm) { | 501 | if (vma->vm_mm == current->active_mm) { |
496 | #ifdef CONFIG_8xx | ||
497 | /* On 8xx, cache control instructions (particularly | ||
498 | * "dcbst" from flush_dcache_icache) fault as write | ||
499 | * operation if there is an unpopulated TLB entry | ||
500 | * for the address in question. To workaround that, | ||
501 | * we invalidate the TLB here, thus avoiding dcbst | ||
502 | * misbehaviour. | ||
503 | */ | ||
504 | _tlbie(address); | ||
505 | #endif | ||
506 | __flush_dcache_icache((void *) address); | 502 | __flush_dcache_icache((void *) address); |
507 | } else | 503 | } else |
508 | flush_dcache_icache_page(page); | 504 | flush_dcache_icache_page(page); |