forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/arch/sh/mm/cache-sh4.c
....@@ -16,7 +16,6 @@
1616 #include <linux/mutex.h>
1717 #include <linux/fs.h>
1818 #include <linux/highmem.h>
19
-#include <asm/pgtable.h>
2019 #include <asm/mmu_context.h>
2120 #include <asm/cache_insns.h>
2221 #include <asm/cacheflush.h>
....@@ -183,7 +182,7 @@
183182 * accessed with (hence cache set) is in accord with the physical
184183 * address (i.e. tag). It's no different here.
185184 *
186
- * Caller takes mm->mmap_sem.
185
+ * Caller takes mm->mmap_lock.
187186 */
188187 static void sh4_flush_cache_mm(void *arg)
189188 {
....@@ -208,8 +207,6 @@
208207 struct page *page;
209208 unsigned long address, pfn, phys;
210209 int map_coherent = 0;
211
- pgd_t *pgd;
212
- pud_t *pud;
213210 pmd_t *pmd;
214211 pte_t *pte;
215212 void *vaddr;
....@@ -223,9 +220,7 @@
223220 if (cpu_context(smp_processor_id(), vma->vm_mm) == NO_CONTEXT)
224221 return;
225222
226
- pgd = pgd_offset(vma->vm_mm, address);
227
- pud = pud_offset(pgd, address);
228
- pmd = pmd_offset(pud, address);
223
+ pmd = pmd_off(vma->vm_mm, address);
229224 pte = pte_offset_kernel(pmd, address);
230225
231226 /* If the page isn't present, there is nothing to do here. */