diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-20 00:12:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-20 00:12:00 -0500 |
commit | 4657190936883adb819f81957e33439d447c0035 (patch) | |
tree | 70342debfb779a8b10d2a8440c1ae99593806079 /arch/mips/mm/c-r4k.c | |
parent | 4a29cc2e503b33a1e96db4c3f9a94165f153f259 (diff) | |
parent | 9007c9a2b03ea325ee593a161dbf01dbb8222d7e (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] SB1: Check for -mno-sched-prolog if building corelis debug kernel.
[MIPS] Sibyte: Fix race in sb1250_gettimeoffset().
[MIPS] Sibyte: Fix interrupt timer off by one bug.
[MIPS] Sibyte: Fix M_SCD_TIMER_INIT and M_SCD_TIMER_CNT wrong field width.
[MIPS] Protect more of timer_interrupt() by xtime_lock.
[MIPS] Work around bad code generation for <asm/io.h>.
[MIPS] Simple patch to power off DBAU1200
[MIPS] Fix DBAu1550 software power off.
[MIPS] local_r4k_flush_cache_page fix
[MIPS] SB1: Fix interrupt disable hazard.
[MIPS] Get rid of the IP22-specific code in arclib.
Update MAINTAINERS entry for MIPS.
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: |