--- arch/x86/kernel/Makefile_64 | 2 include/linux/kernel.h | 1 kernel/exit.c | 1 kernel/sched.c | 63 ------------------------- mm/memory.c | 108 -------------------------------------------- 5 files changed, 175 deletions(-) Index: b/mm/memory.c =================================================================== --- a/mm/memory.c +++ b/mm/memory.c @@ -50,7 +50,6 @@ #include #include #include -#include #include #include @@ -2799,110 +2798,3 @@ int access_process_vm(struct task_struct return buf - old_buf; } - -#ifdef CONFIG_IPIPE - -static inline int ipipe_pin_pte_range(struct mm_struct *mm, pmd_t *pmd, - struct vm_area_struct *vma, - unsigned long addr, unsigned long end) -{ - spinlock_t *ptl; - pte_t *pte; - - do { - pte = pte_offset_map_lock(mm, pmd, addr, &ptl); - if (!pte) - continue; - - if (!pte_present(*pte)) { - pte_unmap_unlock(pte, ptl); - continue; - } - - if (do_wp_page(mm, vma, addr, pte, pmd, ptl, *pte) == VM_FAULT_OOM) - return -ENOMEM; - } while (addr += PAGE_SIZE, addr != end); - return 0; -} - -static inline int ipipe_pin_pmd_range(struct mm_struct *mm, pud_t *pud, - struct vm_area_struct *vma, - unsigned long addr, unsigned long end) -{ - unsigned long next; - pmd_t *pmd; - - pmd = pmd_offset(pud, addr); - do { - next = pmd_addr_end(addr, end); - if (pmd_none_or_clear_bad(pmd)) - continue; - if (ipipe_pin_pte_range(mm, pmd, vma, addr, next)) - return -ENOMEM; - } while (pmd++, addr = next, addr != end); - return 0; -} - -static inline int ipipe_pin_pud_range(struct mm_struct *mm, pgd_t *pgd, - struct vm_area_struct *vma, - unsigned long addr, unsigned long end) -{ - unsigned long next; - pud_t *pud; - - pud = pud_offset(pgd, addr); - do { - next = pud_addr_end(addr, end); - if (pud_none_or_clear_bad(pud)) - continue; - if (ipipe_pin_pmd_range(mm, pud, vma, addr, next)) - return -ENOMEM; - } while (pud++, addr = next, addr != end); - return 0; -} - -int ipipe_disable_ondemand_mappings(struct task_struct *tsk) -{ - unsigned long addr, next, end; - struct vm_area_struct *vma; - struct mm_struct *mm; - int result = 0; - pgd_t *pgd; - - mm = get_task_mm(tsk); - if (!mm) - return -EPERM; - - down_write(&mm->mmap_sem); - if (mm->def_flags & VM_PINNED) - goto done_mm; - - for (vma = mm->mmap; vma; vma = vma->vm_next) { - if (!is_cow_mapping(vma->vm_flags)) - continue; - - addr = vma->vm_start; - end = vma->vm_end; - - pgd = pgd_offset(mm, addr); - do { - next = pgd_addr_end(addr, end); - if (pgd_none_or_clear_bad(pgd)) - continue; - if (ipipe_pin_pud_range(mm, pgd, vma, addr, next)) { - result = -ENOMEM; - goto done_mm; - } - } while (pgd++, addr = next, addr != end); - } - mm->def_flags |= VM_PINNED; - - done_mm: - up_write(&mm->mmap_sem); - mmput(mm); - return result; -} - -EXPORT_SYMBOL(ipipe_disable_ondemand_mappings); - -#endif Index: b/arch/x86/kernel/Makefile_64 =================================================================== --- a/arch/x86/kernel/Makefile_64 +++ b/arch/x86/kernel/Makefile_64 @@ -35,8 +35,6 @@ obj-$(CONFIG_X86_PM_TIMER) += pmtimer_64 obj-$(CONFIG_X86_VSMP) += vsmp_64.o obj-$(CONFIG_K8_NB) += k8.o obj-$(CONFIG_AUDIT) += audit_64.o -obj-$(CONFIG_IPIPE) += ipipe.o -obj-$(CONFIG_IPIPE_TRACE_MCOUNT) += mcount_64.o obj-$(CONFIG_MODULES) += module_64.o obj-$(CONFIG_PCI) += early-quirks.o Index: b/include/linux/kernel.h =================================================================== --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -14,7 +14,6 @@ #include #include #include -#include #include #include Index: b/kernel/exit.c =================================================================== --- a/kernel/exit.c +++ b/kernel/exit.c @@ -994,7 +994,6 @@ fastcall NORET_TYPE void do_exit(long co if (group_dead) acct_process(); - ipipe_exit_notify(tsk); exit_sem(tsk); __exit_files(tsk); __exit_fs(tsk); Index: b/kernel/sched.c =================================================================== --- a/kernel/sched.c +++ b/kernel/sched.c @@ -7419,66 +7419,3 @@ struct cgroup_subsys cpuacct_subsys = { .subsys_id = cpuacct_subsys_id, }; #endif /* CONFIG_CGROUP_CPUACCT */ - -#ifdef CONFIG_IPIPE - -int ipipe_setscheduler_root (struct task_struct *p, int policy, int prio) -{ - int oldprio, on_rq, running; - unsigned long flags; - struct rq *rq; - - spin_lock_irqsave(&p->pi_lock, flags); - rq = __task_rq_lock(p); - update_rq_clock(rq); - on_rq = p->se.on_rq; - running = task_running(rq, p); - - if (on_rq) { - deactivate_task(rq, p, 0); - if (running) - p->sched_class->put_prev_task(rq, p); - } - - oldprio = p->prio; - __setscheduler(rq, p, policy, prio); - ipipe_setsched_notify(p); - - if (on_rq) { - if (running) - p->sched_class->set_curr_task(rq); - activate_task(rq, p, 0); - - if (running) { - if (p->prio > oldprio) - resched_task(rq->curr); - } else { - check_preempt_curr(rq, p); - } - } - __task_rq_unlock(rq); - spin_unlock_irqrestore(&p->pi_lock, flags); - - rt_mutex_adjust_pi(p); - - return 0; -} - -EXPORT_SYMBOL(ipipe_setscheduler_root); - -int ipipe_reenter_root (struct task_struct *prev, int policy, int prio) -{ - finish_task_switch(this_rq(), prev); - - (void)reacquire_kernel_lock(current); - preempt_enable_no_resched(); - - if (current->policy != policy || current->rt_priority != prio) - return ipipe_setscheduler_root(current, policy, prio); - - return 0; -} - -EXPORT_SYMBOL(ipipe_reenter_root); - -#endif /* CONFIG_IPIPE */