/linux-2.4.37.9/mm/ |
D | mmap.c | 154 struct mm_struct *mm = current->mm; in sys_brk() local 156 down_write(&mm->mmap_sem); in sys_brk() 158 if (brk < mm->end_code) in sys_brk() 161 oldbrk = PAGE_ALIGN(mm->brk); in sys_brk() 166 if (brk <= mm->brk) { in sys_brk() 167 if (!do_munmap(mm, newbrk, oldbrk-newbrk)) in sys_brk() 174 if (rlim < RLIM_INFINITY && brk - mm->start_data > rlim) in sys_brk() 178 if (find_vma_intersection(mm, oldbrk, newbrk+PAGE_SIZE)) in sys_brk() 189 mm->brk = brk; in sys_brk() 191 retval = mm->brk; in sys_brk() [all …]
|
D | mremap.c | 18 static inline pte_t *get_one_pte(struct mm_struct *mm, unsigned long addr) in get_one_pte() argument 24 pgd = pgd_offset(mm, addr); in get_one_pte() 49 static inline pte_t *alloc_one_pte(struct mm_struct *mm, unsigned long addr) in alloc_one_pte() argument 54 pmd = pmd_alloc(mm, pgd_offset(mm, addr), addr); in alloc_one_pte() 56 pte = pte_alloc(mm, pmd, addr); in alloc_one_pte() 60 static inline int copy_one_pte(struct mm_struct *mm, pte_t * src, pte_t * dst) in copy_one_pte() argument 77 static int move_one_page(struct mm_struct *mm, unsigned long old_addr, unsigned long new_addr) in move_one_page() argument 82 spin_lock(&mm->page_table_lock); in move_one_page() 83 src = get_one_pte(mm, old_addr); in move_one_page() 85 dst = alloc_one_pte(mm, new_addr); in move_one_page() [all …]
|
D | memory.c | 146 void clear_page_tables(struct mm_struct *mm, unsigned long first, int nr) in clear_page_tables() argument 148 pgd_t * page_dir = mm->pgd; in clear_page_tables() 150 spin_lock(&mm->page_table_lock); in clear_page_tables() 156 spin_unlock(&mm->page_table_lock); in clear_page_tables() 360 void zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long size) in zap_page_range() argument 367 dir = pgd_offset(mm, address); in zap_page_range() 378 spin_lock(&mm->page_table_lock); in zap_page_range() 379 flush_cache_range(mm, address, end); in zap_page_range() 380 tlb = tlb_gather_mmu(mm); in zap_page_range() 395 if (mm->rss > freed) in zap_page_range() [all …]
|
D | oom_kill.c | 62 if (!p->mm) in badness() 71 points = p->mm->total_vm; in badness() 166 struct mm_struct *mm; in oom_kill_task() local 169 mm = p->mm; in oom_kill_task() 170 if (mm) { in oom_kill_task() 172 if (atomic_read(&mm->mm_users)) in oom_kill_task() 173 atomic_inc(&mm->mm_users); in oom_kill_task() 175 mm = NULL; in oom_kill_task() 179 if (mm) in oom_kill_task() 181 return mm; in oom_kill_task() [all …]
|
/linux-2.4.37.9/include/asm-m68k/ |
D | mmu_context.h | 6 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu) in enter_lazy_tlb() argument 17 struct mm_struct *mm) in init_new_context() argument 19 mm->context = virt_to_phys(mm->pgd); in init_new_context() 23 #define destroy_context(mm) do { } while(0) argument 25 static inline void switch_mm_0230(struct mm_struct *mm) in switch_mm_0230() argument 28 0x80000000 | _PAGE_TABLE, mm->context in switch_mm_0230() 58 static inline void switch_mm_0460(struct mm_struct *mm) in switch_mm_0460() argument 66 asm volatile ("movec %0,%%urp" : : "r" (mm->context)); in switch_mm_0460() 107 extern unsigned long get_free_context(struct mm_struct *mm); 111 static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) in init_new_context() argument [all …]
|
/linux-2.4.37.9/include/asm-arm/proc-armo/ |
D | cache.h | 13 #define flush_cache_mm(mm) do { } while (0) argument 14 #define flush_cache_range(mm,start,end) do { } while (0) argument 40 #define flush_tlb_mm(mm) memc_update_mm(mm) argument 41 #define flush_tlb_range(mm,start,end) \ argument 42 do { memc_update_mm(mm); (void)(start); (void)(end); } while (0) 54 if (!p->mm) in memc_update_all() 56 cpu_memc_update_all(p->mm->pgd); in memc_update_all() 61 static inline void memc_update_mm(struct mm_struct *mm) in memc_update_mm() argument 63 cpu_memc_update_all(mm->pgd); in memc_update_mm() 65 if (mm == current->active_mm) in memc_update_mm() [all …]
|
/linux-2.4.37.9/include/asm-sparc/ |
D | pgalloc.h | 20 #define local_flush_cache_mm(mm) BTFIXUP_CALL(local_flush_cache_mm)(mm) argument 21 #define local_flush_cache_range(mm,start,end) BTFIXUP_CALL(local_flush_cache_range)(mm,start,end) argument 30 #define local_flush_tlb_mm(mm) BTFIXUP_CALL(local_flush_tlb_mm)(mm) argument 31 #define local_flush_tlb_range(mm,start,end) BTFIXUP_CALL(local_flush_tlb_range)(mm,start,end) argument 38 #define local_flush_sig_insns(mm,insn_addr) BTFIXUP_CALL(local_flush_sig_insns)(mm,insn_addr) argument 41 extern void smp_flush_cache_mm(struct mm_struct *mm); 42 extern void smp_flush_cache_range(struct mm_struct *mm, 48 extern void smp_flush_tlb_mm(struct mm_struct *mm); 49 extern void smp_flush_tlb_range(struct mm_struct *mm, 52 extern void smp_flush_tlb_page(struct vm_area_struct *mm, unsigned long page); [all …]
|
/linux-2.4.37.9/arch/sparc/kernel/ |
D | smp.c | 152 void smp_flush_cache_mm(struct mm_struct *mm) in smp_flush_cache_mm() argument 154 if(mm->context != NO_CONTEXT) { in smp_flush_cache_mm() 155 if(mm->cpu_vm_mask != (1 << smp_processor_id())) in smp_flush_cache_mm() 156 xc1((smpfunc_t) BTFIXUP_CALL(local_flush_cache_mm), (unsigned long) mm); in smp_flush_cache_mm() 157 local_flush_cache_mm(mm); in smp_flush_cache_mm() 161 void smp_flush_tlb_mm(struct mm_struct *mm) in smp_flush_tlb_mm() argument 163 if(mm->context != NO_CONTEXT) { in smp_flush_tlb_mm() 164 if(mm->cpu_vm_mask != (1 << smp_processor_id())) { in smp_flush_tlb_mm() 165 xc1((smpfunc_t) BTFIXUP_CALL(local_flush_tlb_mm), (unsigned long) mm); in smp_flush_tlb_mm() 166 if(atomic_read(&mm->mm_users) == 1 && current->active_mm == mm) in smp_flush_tlb_mm() [all …]
|
/linux-2.4.37.9/include/asm-alpha/ |
D | pgalloc.h | 16 #define flush_cache_mm(mm) do { } while (0) argument 17 #define flush_cache_range(mm, start, end) do { } while (0) argument 48 ev4_flush_tlb_current(struct mm_struct *mm) in ev4_flush_tlb_current() argument 50 __load_new_mm_context(mm); in ev4_flush_tlb_current() 55 ev5_flush_tlb_current(struct mm_struct *mm) in ev5_flush_tlb_current() argument 57 __load_new_mm_context(mm); in ev5_flush_tlb_current() 61 flush_tlb_other(struct mm_struct *mm) in flush_tlb_other() argument 63 long * mmc = &mm->context[smp_processor_id()]; in flush_tlb_other() 85 struct mm_struct *mm = vma->vm_mm; in flush_icache_user_range() local 86 if (current->active_mm == mm) in flush_icache_user_range() [all …]
|
/linux-2.4.37.9/include/asm-sparc64/ |
D | mmu_context.h | 30 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu) in enter_lazy_tlb() argument 44 extern void get_new_mmu_context(struct mm_struct *mm); 110 static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *ts… in switch_mm() argument 114 spin_lock(&mm->page_table_lock); in switch_mm() 115 if (CTX_VALID(mm->context)) in switch_mm() 120 if (!ctx_valid || (old_mm != mm)) { in switch_mm() 122 get_new_mmu_context(mm); in switch_mm() 124 load_secondary_context(mm); in switch_mm() 125 reload_tlbmiss_state(tsk, mm); in switch_mm() 137 if (!ctx_valid || !(mm->cpu_vm_mask & vm_mask)) { in switch_mm() [all …]
|
/linux-2.4.37.9/fs/proc/ |
D | array.c | 183 static inline char * task_mem(struct mm_struct *mm, char *buffer) in task_mem() argument 189 down_read(&mm->mmap_sem); in task_mem() 190 for (vma = mm->mmap; vma; vma = vma->vm_next) { in task_mem() 215 mm->total_vm << (PAGE_SHIFT-10), in task_mem() 216 mm->locked_vm << (PAGE_SHIFT-10), in task_mem() 217 mm->rss << (PAGE_SHIFT-10), in task_mem() 220 up_read(&mm->mmap_sem); in task_mem() 283 struct mm_struct *mm; in proc_pid_status() local 288 mm = task->mm; in proc_pid_status() 289 if(mm) in proc_pid_status() [all …]
|
/linux-2.4.37.9/include/asm-parisc/ |
D | pgalloc.h | 35 #define flush_cache_mm(mm) flush_cache_all() argument 37 #define flush_cache_mm(mm) flush_cache_all_local() argument 73 flush_cache_range(struct mm_struct *mm, unsigned long start, unsigned long end) in flush_cache_range() argument 77 if (!mm->context) { in flush_cache_range() 83 if (mm->context == sr3) { in flush_cache_range() 162 static inline void flush_tlb_mm(struct mm_struct *mm) in flush_tlb_mm() argument 164 if (mm == &init_mm) BUG(); /* Should never happen */ in flush_tlb_mm() 169 if (mm) { in flush_tlb_mm() 170 if (mm->context != 0) in flush_tlb_mm() 171 free_sid(mm->context); in flush_tlb_mm() [all …]
|
/linux-2.4.37.9/arch/i386/kernel/ |
D | ldt.c | 23 static void flush_ldt(void *mm) in flush_ldt() argument 59 if (current->mm->cpu_vm_mask != (1<<smp_processor_id())) in alloc_ldt() 89 int init_new_context(struct task_struct *tsk, struct mm_struct *mm) in init_new_context() argument 94 init_MUTEX(&mm->context.sem); in init_new_context() 95 mm->context.size = 0; in init_new_context() 96 old_mm = current->mm; in init_new_context() 99 retval = copy_ldt(&mm->context, &old_mm->context); in init_new_context() 110 void destroy_context(struct mm_struct *mm) in destroy_context() argument 112 if (mm->context.size) { in destroy_context() 113 if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE) in destroy_context() [all …]
|
/linux-2.4.37.9/include/asm-ia64/ |
D | pgalloc.h | 38 pgd_alloc_one_fast (struct mm_struct *mm) in pgd_alloc_one_fast() argument 52 pgd_alloc (struct mm_struct *mm) in pgd_alloc() argument 55 pgd_t *pgd = pgd_alloc_one_fast(mm); in pgd_alloc() 74 pgd_populate (struct mm_struct *mm, pgd_t *pgd_entry, pmd_t *pmd) in pgd_populate() argument 81 pmd_alloc_one_fast (struct mm_struct *mm, unsigned long addr) in pmd_alloc_one_fast() argument 94 pmd_alloc_one (struct mm_struct *mm, unsigned long addr) in pmd_alloc_one() argument 112 pmd_populate (struct mm_struct *mm, pmd_t *pmd_entry, pte_t *pte) in pmd_populate() argument 118 pte_alloc_one_fast (struct mm_struct *mm, unsigned long addr) in pte_alloc_one_fast() argument 132 pte_alloc_one (struct mm_struct *mm, unsigned long addr) in pte_alloc_one() argument 164 extern void smp_flush_tlb_mm (struct mm_struct *mm); [all …]
|
/linux-2.4.37.9/include/asm-ppc/ |
D | mmu_context.h | 51 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu) in enter_lazy_tlb() argument 113 static inline void get_mmu_context(struct mm_struct *mm) in get_mmu_context() argument 117 if (mm->context != NO_CONTEXT) in get_mmu_context() 130 mm->context = ctx; in get_mmu_context() 132 context_mm[ctx] = mm; in get_mmu_context() 139 #define init_new_context(tsk,mm) (((mm)->context = NO_CONTEXT), 0) argument 144 static inline void destroy_context(struct mm_struct *mm) in destroy_context() argument 146 if (mm->context != NO_CONTEXT) { in destroy_context() 147 clear_bit(mm->context, context_map); in destroy_context() 148 mm->context = NO_CONTEXT; in destroy_context() [all …]
|
/linux-2.4.37.9/kernel/ |
D | fork.c | 145 static inline int dup_mmap(struct mm_struct * mm) in dup_mmap() argument 150 flush_cache_mm(current->mm); in dup_mmap() 151 mm->locked_vm = 0; in dup_mmap() 152 mm->mmap = NULL; in dup_mmap() 153 mm->mmap_cache = NULL; in dup_mmap() 154 mm->map_count = 0; in dup_mmap() 155 mm->rss = 0; in dup_mmap() 156 mm->cpu_vm_mask = 0; in dup_mmap() 157 mm->swap_address = 0; in dup_mmap() 158 pprev = &mm->mmap; in dup_mmap() [all …]
|
/linux-2.4.37.9/arch/sh/mm/ |
D | fault.c | 47 vma = find_vma(current->mm, start); in __verify_write() 62 if (handle_mm_fault(current->mm, vma, start, 1) <= 0) in __verify_write() 97 struct mm_struct *mm; in do_page_fault() local 108 mm = tsk->mm; in do_page_fault() 114 if (in_interrupt() || !mm) in do_page_fault() 117 down_read(&mm->mmap_sem); in do_page_fault() 119 vma = find_vma(mm, address); in do_page_fault() 147 switch (handle_mm_fault(mm, vma, address, writeaccess)) { in do_page_fault() 160 up_read(&mm->mmap_sem); in do_page_fault() 168 up_read(&mm->mmap_sem); in do_page_fault() [all …]
|
/linux-2.4.37.9/include/asm-sh64/ |
D | mmu_context.h | 54 get_new_mmu_context(struct mm_struct *mm) in get_new_mmu_context() argument 73 mm->context = mc; in get_new_mmu_context() 80 get_mmu_context(struct mm_struct *mm) in get_mmu_context() argument 82 if (mm) { in get_mmu_context() 86 if ((mm->context ^ mc) & MMU_CONTEXT_VERSION_MASK) in get_mmu_context() 87 get_new_mmu_context(mm); in get_mmu_context() 96 struct mm_struct *mm) in init_new_context() argument 98 mm->context = NO_CONTEXT; in init_new_context() 106 static __inline__ void destroy_context(struct mm_struct *mm) in destroy_context() argument 108 extern void flush_tlb_mm(struct mm_struct *mm); in destroy_context() [all …]
|
/linux-2.4.37.9/arch/cris/mm/ |
D | tlb.c | 84 flush_tlb_mm(struct mm_struct *mm) in flush_tlb_mm() argument 87 int page_id = mm->context; in flush_tlb_mm() 90 D(printk("tlb: flush mm context %d (%p)\n", page_id, mm)); in flush_tlb_mm() 123 struct mm_struct *mm = vma->vm_mm; in flush_tlb_page() local 124 int page_id = mm->context; in flush_tlb_page() 128 D(printk("tlb: flush page %p in context %d (%p)\n", addr, page_id, mm)); in flush_tlb_page() 162 flush_tlb_range(struct mm_struct *mm, in flush_tlb_range() argument 166 int page_id = mm->context; in flush_tlb_range() 171 start, end, page_id, mm)); in flush_tlb_range() 231 init_new_context(struct task_struct *tsk, struct mm_struct *mm) in init_new_context() argument [all …]
|
/linux-2.4.37.9/arch/mips64/kernel/ |
D | smp.c | 201 static void flush_tlb_mm_ipi(void *mm) in flush_tlb_mm_ipi() argument 203 local_flush_tlb_mm((struct mm_struct *)mm); in flush_tlb_mm_ipi() 219 void flush_tlb_mm(struct mm_struct *mm) in flush_tlb_mm() argument 221 if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) { in flush_tlb_mm() 222 smp_call_function(flush_tlb_mm_ipi, (void *)mm, 1, 1); in flush_tlb_mm() 227 cpu_context(i, mm) = 0; in flush_tlb_mm() 229 local_flush_tlb_mm(mm); in flush_tlb_mm() 233 struct mm_struct *mm; member 243 local_flush_tlb_range(fd->mm, fd->addr1, fd->addr2); in flush_tlb_range_ipi() 246 void flush_tlb_range(struct mm_struct *mm, unsigned long start, unsigned long end) in flush_tlb_range() argument [all …]
|
/linux-2.4.37.9/arch/mips/kernel/ |
D | smp.c | 201 static void flush_tlb_mm_ipi(void *mm) in flush_tlb_mm_ipi() argument 203 local_flush_tlb_mm((struct mm_struct *)mm); in flush_tlb_mm_ipi() 219 void flush_tlb_mm(struct mm_struct *mm) in flush_tlb_mm() argument 221 if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) { in flush_tlb_mm() 222 smp_call_function(flush_tlb_mm_ipi, (void *)mm, 1, 1); in flush_tlb_mm() 227 cpu_context(i, mm) = 0; in flush_tlb_mm() 229 local_flush_tlb_mm(mm); in flush_tlb_mm() 233 struct mm_struct *mm; member 243 local_flush_tlb_range(fd->mm, fd->addr1, fd->addr2); in flush_tlb_range_ipi() 246 void flush_tlb_range(struct mm_struct *mm, unsigned long start, unsigned long end) in flush_tlb_range() argument [all …]
|
/linux-2.4.37.9/include/asm-mips/ |
D | mmu_context.h | 34 #define cpu_context(cpu, mm) ((mm)->context[cpu]) argument 35 #define cpu_asid(cpu, mm) (cpu_context((cpu), (mm)) & ASID_MASK) argument 55 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu) in enter_lazy_tlb() argument 67 get_new_mmu_context(struct mm_struct *mm, unsigned long cpu) in get_new_mmu_context() argument 77 cpu_context(cpu, mm) = asid_cache(cpu) = asid; in get_new_mmu_context() 85 init_new_context(struct task_struct *tsk, struct mm_struct *mm) in init_new_context() argument 90 cpu_context(i, mm) = 0; in init_new_context() 122 static inline void destroy_context(struct mm_struct *mm) in destroy_context() argument 156 drop_mmu_context(struct mm_struct *mm, unsigned cpu) in drop_mmu_context() argument 162 if (test_bit(cpu, &mm->cpu_vm_mask)) { in drop_mmu_context() [all …]
|
/linux-2.4.37.9/include/asm-mips64/ |
D | mmu_context.h | 34 #define cpu_context(cpu, mm) ((mm)->context[cpu]) argument 35 #define cpu_asid(cpu, mm) (cpu_context((cpu), (mm)) & ASID_MASK) argument 55 static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu) in enter_lazy_tlb() argument 67 get_new_mmu_context(struct mm_struct *mm, unsigned long cpu) in get_new_mmu_context() argument 77 cpu_context(cpu, mm) = asid_cache(cpu) = asid; in get_new_mmu_context() 85 init_new_context(struct task_struct *tsk, struct mm_struct *mm) in init_new_context() argument 90 cpu_context(i, mm) = 0; in init_new_context() 122 static inline void destroy_context(struct mm_struct *mm) in destroy_context() argument 156 drop_mmu_context(struct mm_struct *mm, unsigned cpu) in drop_mmu_context() argument 162 if (test_bit(cpu, &mm->cpu_vm_mask)) { in drop_mmu_context() [all …]
|
/linux-2.4.37.9/arch/arm/mm/ |
D | fault-common.c | 50 void show_pte(struct mm_struct *mm, unsigned long addr) in show_pte() argument 54 if (!mm) in show_pte() 55 mm = &init_mm; in show_pte() 57 printk(KERN_ALERT "mm = %p pgd = %p\n", mm, mm->pgd); in show_pte() 62 pgd_t pg, *pgd = pgd_offset(mm, addr); in show_pte() 125 __do_kernel_fault(struct mm_struct *mm, unsigned long addr, int error_code, in __do_kernel_fault() argument 150 show_pte(mm, addr); in __do_kernel_fault() 183 do_bad_area(struct task_struct *tsk, struct mm_struct *mm, unsigned long addr, in do_bad_area() argument 193 __do_kernel_fault(mm, addr, error_code, regs); in do_bad_area() 197 __do_page_fault(struct mm_struct *mm, unsigned long addr, int error_code, in __do_page_fault() argument [all …]
|
/linux-2.4.37.9/include/asm-s390/ |
D | pgalloc.h | 57 extern __inline__ pgd_t *pgd_alloc(struct mm_struct *mm) in pgd_alloc() argument 86 #define pmd_alloc_one_fast(mm, address) ({ BUG(); ((pmd_t *)1); }) argument 87 #define pmd_alloc_one(mm,address) ({ BUG(); ((pmd_t *)2); }) argument 91 #define pgd_populate(mm, pmd, pte) BUG() argument 93 extern inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) in pmd_populate() argument 104 extern inline pte_t * pte_alloc_one(struct mm_struct *mm, unsigned long vmaddr) in pte_alloc_one() argument 118 pte_alloc_one_fast(struct mm_struct *mm, unsigned long address) in pte_alloc_one_fast() argument 192 static inline void flush_tlb_mm(struct mm_struct *mm) in flush_tlb_mm() argument 201 static inline void flush_tlb_range(struct mm_struct *mm, in flush_tlb_range() argument 240 static inline void __flush_tlb_mm(struct mm_struct * mm) in __flush_tlb_mm() argument [all …]
|