summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-02-10 14:54:37 +0100
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 20:30:31 +0200
commit79acf83e509dd0ca3db6c747bf58931984abc6e3 (patch)
tree2c554b18a2e721e387959bbc3212ae72c57298f1 /arch
parentUpdate MIPS to use the 4-level pagetable code thereby getting rid of (diff)
downloadlinux-79acf83e509dd0ca3db6c747bf58931984abc6e3.tar.xz
linux-79acf83e509dd0ca3db6c747bf58931984abc6e3.zip
Moves a test which determines if we actually need to perform a
cacheflush to the right place. That's a bug which is harmless on UP but a severe bug on SMP. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/mm/c-r4k.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index b165b73e2583..429167321cfb 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -376,6 +376,13 @@ static inline void local_r4k_flush_cache_page(void *args)
pmd_t *pmdp;
pte_t *ptep;
+ /*
+ * If ownes no valid ASID yet, cannot possibly have gotten
+ * this page into the cache.
+ */
+ if (cpu_context(smp_processor_id(), vma->vm_mm) == 0)
+ return;
+
page &= PAGE_MASK;
pgdp = pgd_offset(mm, page);
pudp = pud_offset(pgdp, page);
@@ -432,13 +439,6 @@ static void r4k_flush_cache_page(struct vm_area_struct *vma, unsigned long page,
{
struct flush_cache_page_args args;
- /*
- * If ownes no valid ASID yet, cannot possibly have gotten
- * this page into the cache.
- */
- if (cpu_context(smp_processor_id(), vma->vm_mm) == 0)
- return;
-
args.vma = vma;
args.page = page;