diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-03-20 04:48:50 -0500 | 
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-03-20 04:48:50 -0500 | 
| commit | 29b2548bf53ffb810394a2110161ef49f8e4780f (patch) | |
| tree | af0233def65a854dc95e5faca9645b30e88d45aa /arch/mips/mm/c-r4k.c | |
| parent | c39f5ebe0a542caab30c88e60623709c7bc6fe30 (diff) | |
| parent | 7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff) | |
Merge branch 'master'
Diffstat (limited to 'arch/mips/mm/c-r4k.c')
| -rw-r--r-- | arch/mips/mm/c-r4k.c | 13 | 
1 files changed, 9 insertions, 4 deletions
| diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 0668e9bfce41..9572ed44f0d5 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
| @@ -375,6 +375,7 @@ static void r4k_flush_cache_mm(struct mm_struct *mm) | |||
| 375 | struct flush_cache_page_args { | 375 | struct flush_cache_page_args { | 
| 376 | struct vm_area_struct *vma; | 376 | struct vm_area_struct *vma; | 
| 377 | unsigned long addr; | 377 | unsigned long addr; | 
| 378 | unsigned long pfn; | ||
| 378 | }; | 379 | }; | 
| 379 | 380 | ||
| 380 | static inline void local_r4k_flush_cache_page(void *args) | 381 | static inline void local_r4k_flush_cache_page(void *args) | 
| @@ -382,6 +383,7 @@ static inline void local_r4k_flush_cache_page(void *args) | |||
| 382 | struct flush_cache_page_args *fcp_args = args; | 383 | struct flush_cache_page_args *fcp_args = args; | 
| 383 | struct vm_area_struct *vma = fcp_args->vma; | 384 | struct vm_area_struct *vma = fcp_args->vma; | 
| 384 | unsigned long addr = fcp_args->addr; | 385 | unsigned long addr = fcp_args->addr; | 
| 386 | unsigned long paddr = fcp_args->pfn << PAGE_SHIFT; | ||
| 385 | int exec = vma->vm_flags & VM_EXEC; | 387 | int exec = vma->vm_flags & VM_EXEC; | 
| 386 | struct mm_struct *mm = vma->vm_mm; | 388 | struct mm_struct *mm = vma->vm_mm; | 
| 387 | pgd_t *pgdp; | 389 | pgd_t *pgdp; | 
| @@ -431,11 +433,12 @@ static inline void local_r4k_flush_cache_page(void *args) | |||
| 431 | * Do indexed flush, too much work to get the (possible) TLB refills | 433 | * Do indexed flush, too much work to get the (possible) TLB refills | 
| 432 | * to work correctly. | 434 | * to work correctly. | 
| 433 | */ | 435 | */ | 
| 434 | addr = INDEX_BASE + (addr & (dcache_size - 1)); | ||
| 435 | if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) { | 436 | if (cpu_has_dc_aliases || (exec && !cpu_has_ic_fills_f_dc)) { | 
| 436 | r4k_blast_dcache_page_indexed(addr); | 437 | r4k_blast_dcache_page_indexed(cpu_has_pindexed_dcache ? | 
| 437 | if (exec && !cpu_icache_snoops_remote_store) | 438 | paddr : addr); | 
| 438 | r4k_blast_scache_page_indexed(addr); | 439 | if (exec && !cpu_icache_snoops_remote_store) { | 
| 440 | r4k_blast_scache_page_indexed(paddr); | ||
| 441 | } | ||
| 439 | } | 442 | } | 
| 440 | if (exec) { | 443 | if (exec) { | 
| 441 | if (cpu_has_vtag_icache) { | 444 | if (cpu_has_vtag_icache) { | 
| @@ -455,6 +458,7 @@ static void r4k_flush_cache_page(struct vm_area_struct *vma, | |||
| 455 | 458 | ||
| 456 | args.vma = vma; | 459 | args.vma = vma; | 
| 457 | args.addr = addr; | 460 | args.addr = addr; | 
| 461 | args.pfn = pfn; | ||
| 458 | 462 | ||
| 459 | on_each_cpu(local_r4k_flush_cache_page, &args, 1, 1); | 463 | on_each_cpu(local_r4k_flush_cache_page, &args, 1, 1); | 
| 460 | } | 464 | } | 
| @@ -956,6 +960,7 @@ static void __init probe_pcache(void) | |||
| 956 | switch (c->cputype) { | 960 | switch (c->cputype) { | 
| 957 | case CPU_20KC: | 961 | case CPU_20KC: | 
| 958 | case CPU_25KF: | 962 | case CPU_25KF: | 
| 963 | c->dcache.flags |= MIPS_CACHE_PINDEX; | ||
| 959 | case CPU_R10000: | 964 | case CPU_R10000: | 
| 960 | case CPU_R12000: | 965 | case CPU_R12000: | 
| 961 | case CPU_SB1: | 966 | case CPU_SB1: | 
