aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-10-11 19:02:34 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:32:42 -0400
commit6ec25809c143d875ed17b2e85d1dd894a1f4aba4 (patch)
tree59634cf8209c68d8741aba08dee6378c85bbb477 /arch/mips/mm
parent8f91ed6c2fec8cb746e4dc86a79247162b4c5a7a (diff)
Rename page argument of flush_cache_page to something more descriptive.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm')
-rw-r--r--arch/mips/mm/c-r4k.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index 31f080b5f44c..38223b44d962 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -368,14 +368,14 @@ static void r4k_flush_cache_mm(struct mm_struct *mm)
368 368
369struct flush_cache_page_args { 369struct flush_cache_page_args {
370 struct vm_area_struct *vma; 370 struct vm_area_struct *vma;
371 unsigned long page; 371 unsigned long addr;
372}; 372};
373 373
374static inline void local_r4k_flush_cache_page(void *args) 374static inline void local_r4k_flush_cache_page(void *args)
375{ 375{
376 struct flush_cache_page_args *fcp_args = args; 376 struct flush_cache_page_args *fcp_args = args;
377 struct vm_area_struct *vma = fcp_args->vma; 377 struct vm_area_struct *vma = fcp_args->vma;
378 unsigned long page = fcp_args->page; 378 unsigned long addr = fcp_args->addr;
379 int exec = vma->vm_flags & VM_EXEC; 379 int exec = vma->vm_flags & VM_EXEC;
380 struct mm_struct *mm = vma->vm_mm; 380 struct mm_struct *mm = vma->vm_mm;
381 pgd_t *pgdp; 381 pgd_t *pgdp;
@@ -390,11 +390,11 @@ static inline void local_r4k_flush_cache_page(void *args)
390 if (cpu_context(smp_processor_id(), mm) == 0) 390 if (cpu_context(smp_processor_id(), mm) == 0)
391 return; 391 return;
392 392
393 page &= PAGE_MASK; 393 addr &= PAGE_MASK;
394 pgdp = pgd_offset(mm, page); 394 pgdp = pgd_offset(mm, addr);
395 pudp = pud_offset(pgdp, page); 395 pudp = pud_offset(pgdp, addr);
396 pmdp = pmd_offset(pudp, page); 396 pmdp = pmd_offset(pudp, addr);
397 ptep = pte_offset(pmdp, page); 397 ptep = pte_offset(pmdp, addr);
398 398
399 /* 399 /*
400 * If the page isn't marked valid, the page cannot possibly be 400 * If the page isn't marked valid, the page cannot possibly be
@@ -411,12 +411,12 @@ static inline void local_r4k_flush_cache_page(void *args)
411 */ 411 */
412 if ((mm == current->active_mm) && (pte_val(*ptep) & _PAGE_VALID)) { 412 if ((mm == current->active_mm) && (pte_val(*ptep) & _PAGE_VALID)) {
413 if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) { 413 if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) {
414 r4k_blast_dcache_page(page); 414 r4k_blast_dcache_page(addr);
415 if (exec && !cpu_icache_snoops_remote_store) 415 if (exec && !cpu_icache_snoops_remote_store)
416 r4k_blast_scache_page(page); 416 r4k_blast_scache_page(addr);
417 } 417 }
418 if (exec) 418 if (exec)
419 r4k_blast_icache_page(page); 419 r4k_blast_icache_page(addr);
420 420
421 return; 421 return;
422 } 422 }
@@ -425,11 +425,11 @@ static inline void local_r4k_flush_cache_page(void *args)
425 * Do indexed flush, too much work to get the (possible) TLB refills 425 * Do indexed flush, too much work to get the (possible) TLB refills
426 * to work correctly. 426 * to work correctly.
427 */ 427 */
428 page = INDEX_BASE + (page & (dcache_size - 1)); 428 addr = INDEX_BASE + (addr & (dcache_size - 1));
429 if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) { 429 if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) {
430 r4k_blast_dcache_page_indexed(page); 430 r4k_blast_dcache_page_indexed(addr);
431 if (exec && !cpu_icache_snoops_remote_store) 431 if (exec && !cpu_icache_snoops_remote_store)
432 r4k_blast_scache_page_indexed(page); 432 r4k_blast_scache_page_indexed(addr);
433 } 433 }
434 if (exec) { 434 if (exec) {
435 if (cpu_has_vtag_icache) { 435 if (cpu_has_vtag_icache) {
@@ -438,16 +438,17 @@ static inline void local_r4k_flush_cache_page(void *args)
438 if (cpu_context(cpu, mm) != 0) 438 if (cpu_context(cpu, mm) != 0)
439 drop_mmu_context(mm, cpu); 439 drop_mmu_context(mm, cpu);
440 } else 440 } else
441 r4k_blast_icache_page_indexed(page); 441 r4k_blast_icache_page_indexed(addr);
442 } 442 }
443} 443}
444 444
445static void r4k_flush_cache_page(struct vm_area_struct *vma, unsigned long page, unsigned long pfn) 445static void r4k_flush_cache_page(struct vm_area_struct *vma,
446 unsigned long addr, unsigned long pfn)
446{ 447{
447 struct flush_cache_page_args args; 448 struct flush_cache_page_args args;
448 449
449 args.vma = vma; 450 args.vma = vma;
450 args.page = page; 451 args.addr = addr;
451 452
452 on_each_cpu(local_r4k_flush_cache_page, &args, 1, 1); 453 on_each_cpu(local_r4k_flush_cache_page, &args, 1, 1);
453} 454}