Lines Matching refs:mm
71 #define FLUSH_BEGIN(mm) argument
74 #define FLUSH_BEGIN(mm) if ((mm)->context != NO_CONTEXT) { argument
124 void pmd_populate(struct mm_struct *mm, pmd_t *pmdp, struct page *ptep) in pmd_populate() argument
342 pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) in pte_alloc_one() argument
347 if ((pte = (unsigned long)pte_alloc_one_kernel(mm, address)) == 0) in pte_alloc_one()
357 void pte_free(struct mm_struct *mm, pgtable_t pte) in pte_free() argument
404 static inline void alloc_context(struct mm_struct *old_mm, struct mm_struct *mm) in alloc_context() argument
412 mm->context = ctxp->ctx_number; in alloc_context()
413 ctxp->ctx_mm = mm; in alloc_context()
426 ctxp->ctx_mm = mm; in alloc_context()
427 mm->context = ctxp->ctx_number; in alloc_context()
460 void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, in switch_mm() argument
465 if (mm->context == NO_CONTEXT) { in switch_mm()
467 alloc_context(old_mm, mm); in switch_mm()
469 srmmu_ctxd_set(&srmmu_context_table[mm->context], mm->pgd); in switch_mm()
478 srmmu_set_context(mm->context); in switch_mm()
544 extern void tsunami_flush_cache_mm(struct mm_struct *mm);
549 extern void tsunami_flush_sig_insns(struct mm_struct *mm, unsigned long insn_addr);
551 extern void tsunami_flush_tlb_mm(struct mm_struct *mm);
558 extern void swift_flush_cache_mm(struct mm_struct *mm);
564 extern void swift_flush_sig_insns(struct mm_struct *mm, unsigned long insn_addr);
566 extern void swift_flush_tlb_mm(struct mm_struct *mm);
610 extern void viking_flush_cache_mm(struct mm_struct *mm);
616 extern void viking_flush_sig_insns(struct mm_struct *mm, unsigned long addr);
620 extern void viking_flush_tlb_mm(struct mm_struct *mm);
626 extern void sun4dsmp_flush_tlb_mm(struct mm_struct *mm);
634 extern void hypersparc_flush_cache_mm(struct mm_struct *mm);
639 extern void hypersparc_flush_sig_insns(struct mm_struct *mm, unsigned long insn_addr);
641 extern void hypersparc_flush_tlb_mm(struct mm_struct *mm);
983 int init_new_context(struct task_struct *tsk, struct mm_struct *mm) in init_new_context() argument
985 mm->context = NO_CONTEXT; in init_new_context()
989 void destroy_context(struct mm_struct *mm) in destroy_context() argument
993 if (mm->context != NO_CONTEXT) { in destroy_context()
994 flush_cache_mm(mm); in destroy_context()
995 srmmu_ctxd_set(&srmmu_context_table[mm->context], srmmu_swapper_pg_dir); in destroy_context()
996 flush_tlb_mm(mm); in destroy_context()
998 free_context(mm->context); in destroy_context()
1000 mm->context = NO_CONTEXT; in destroy_context()
1222 static void turbosparc_flush_cache_mm(struct mm_struct *mm) in turbosparc_flush_cache_mm() argument
1224 FLUSH_BEGIN(mm) in turbosparc_flush_cache_mm()
1260 static void turbosparc_flush_sig_insns(struct mm_struct *mm, unsigned long insn_addr) in turbosparc_flush_sig_insns() argument
1274 static void turbosparc_flush_tlb_mm(struct mm_struct *mm) in turbosparc_flush_tlb_mm() argument
1276 FLUSH_BEGIN(mm) in turbosparc_flush_tlb_mm()
1640 static void smp_flush_cache_mm(struct mm_struct *mm) in smp_flush_cache_mm() argument
1642 if (mm->context != NO_CONTEXT) { in smp_flush_cache_mm()
1644 cpumask_copy(&cpu_mask, mm_cpumask(mm)); in smp_flush_cache_mm()
1647 xc1((smpfunc_t) local_ops->cache_mm, (unsigned long) mm); in smp_flush_cache_mm()
1648 local_ops->cache_mm(mm); in smp_flush_cache_mm()
1652 static void smp_flush_tlb_mm(struct mm_struct *mm) in smp_flush_tlb_mm() argument
1654 if (mm->context != NO_CONTEXT) { in smp_flush_tlb_mm()
1656 cpumask_copy(&cpu_mask, mm_cpumask(mm)); in smp_flush_tlb_mm()
1659 xc1((smpfunc_t) local_ops->tlb_mm, (unsigned long) mm); in smp_flush_tlb_mm()
1660 if (atomic_read(&mm->mm_users) == 1 && current->active_mm == mm) in smp_flush_tlb_mm()
1661 cpumask_copy(mm_cpumask(mm), in smp_flush_tlb_mm()
1664 local_ops->tlb_mm(mm); in smp_flush_tlb_mm()
1672 struct mm_struct *mm = vma->vm_mm; in smp_flush_cache_range() local
1674 if (mm->context != NO_CONTEXT) { in smp_flush_cache_range()
1676 cpumask_copy(&cpu_mask, mm_cpumask(mm)); in smp_flush_cache_range()
1689 struct mm_struct *mm = vma->vm_mm; in smp_flush_tlb_range() local
1691 if (mm->context != NO_CONTEXT) { in smp_flush_tlb_range()
1693 cpumask_copy(&cpu_mask, mm_cpumask(mm)); in smp_flush_tlb_range()
1704 struct mm_struct *mm = vma->vm_mm; in smp_flush_cache_page() local
1706 if (mm->context != NO_CONTEXT) { in smp_flush_cache_page()
1708 cpumask_copy(&cpu_mask, mm_cpumask(mm)); in smp_flush_cache_page()
1719 struct mm_struct *mm = vma->vm_mm; in smp_flush_tlb_page() local
1721 if (mm->context != NO_CONTEXT) { in smp_flush_tlb_page()
1723 cpumask_copy(&cpu_mask, mm_cpumask(mm)); in smp_flush_tlb_page()
1746 static void smp_flush_sig_insns(struct mm_struct *mm, unsigned long insn_addr) in smp_flush_sig_insns() argument
1749 cpumask_copy(&cpu_mask, mm_cpumask(mm)); in smp_flush_sig_insns()
1753 (unsigned long) mm, insn_addr); in smp_flush_sig_insns()
1754 local_ops->sig_insns(mm, insn_addr); in smp_flush_sig_insns()