Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98154
b: refs/heads/master
c: c9c5023
h: refs/heads/master
v: v3
  • Loading branch information
Ralf Baechle committed Jun 16, 2008
1 parent 8f602bc commit 75593d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: 0c3bd83b0974238a5808d342663c6407512564d0
refs/heads/master: c9c5023d83df5dc7d58830a63fd0e082120f00e3
7 changes: 5 additions & 2 deletions trunk/arch/mips/mm/c-r4k.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ static inline void local_r4k_flush_cache_page(void *args)
struct page *page = pfn_to_page(fcp_args->pfn);
int exec = vma->vm_flags & VM_EXEC;
struct mm_struct *mm = vma->vm_mm;
int map_coherent = 0;
pgd_t *pgdp;
pud_t *pudp;
pmd_t *pmdp;
Expand Down Expand Up @@ -479,7 +480,9 @@ static inline void local_r4k_flush_cache_page(void *args)
* Use kmap_coherent or kmap_atomic to do flushes for
* another ASID than the current one.
*/
if (cpu_has_dc_aliases)
map_coherent = (cpu_has_dc_aliases &&
page_mapped(page) && !Page_dcache_dirty(page));
if (map_coherent)
vaddr = kmap_coherent(page, addr);
else
vaddr = kmap_atomic(page, KM_USER0);
Expand All @@ -502,7 +505,7 @@ static inline void local_r4k_flush_cache_page(void *args)
}

if (vaddr) {
if (cpu_has_dc_aliases)
if (map_coherent)
kunmap_coherent();
else
kunmap_atomic(vaddr, KM_USER0);
Expand Down

0 comments on commit 75593d9

Please sign in to comment.