Skip to content

Commit 1a84291

Browse files
committed
mm: remove blackfin MPU support
The CONFIG_MPU option was only defined on blackfin, and that architecture is now being removed, so the respective code can be simplified. A lot of other microcontrollers have an MPU, but I suspect that if we want to bring that support back, we'd do it differently anyway. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent e05a959 commit 1a84291

2 files changed

Lines changed: 0 additions & 24 deletions

File tree

‎kernel/module.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,10 +2181,6 @@ static void free_module(struct module *mod)
21812181
/* Finally, free the core (containing the module structure) */
21822182
disable_ro_nx(&mod->core_layout);
21832183
module_memfree(mod->core_layout.base);
2184-
2185-
#ifdef CONFIG_MPU
2186-
update_protections(current->mm);
2187-
#endif
21882184
}
21892185

21902186
void *__symbol_get(const char *symbol)

‎mm/nommu.c‎

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -662,22 +662,6 @@ static void put_nommu_region(struct vm_region *region)
662662
__put_nommu_region(region);
663663
}
664664

665-
/*
666-
* update protection on a vma
667-
*/
668-
static void protect_vma(struct vm_area_struct *vma, unsigned long flags)
669-
{
670-
#ifdef CONFIG_MPU
671-
struct mm_struct *mm = vma->vm_mm;
672-
long start = vma->vm_start & PAGE_MASK;
673-
while (start < vma->vm_end) {
674-
protect_page(mm, start, flags);
675-
start += PAGE_SIZE;
676-
}
677-
update_protections(mm);
678-
#endif
679-
}
680-
681665
/*
682666
* add a VMA into a process's mm_struct in the appropriate place in the list
683667
* and tree and add to the address space's page tree also if not an anonymous
@@ -695,8 +679,6 @@ static void add_vma_to_mm(struct mm_struct *mm, struct vm_area_struct *vma)
695679
mm->map_count++;
696680
vma->vm_mm = mm;
697681

698-
protect_vma(vma, vma->vm_flags);
699-
700682
/* add the VMA to the mapping */
701683
if (vma->vm_file) {
702684
mapping = vma->vm_file->f_mapping;
@@ -757,8 +739,6 @@ static void delete_vma_from_mm(struct vm_area_struct *vma)
757739
struct mm_struct *mm = vma->vm_mm;
758740
struct task_struct *curr = current;
759741

760-
protect_vma(vma, 0);
761-
762742
mm->map_count--;
763743
for (i = 0; i < VMACACHE_SIZE; i++) {
764744
/* if the vma is cached, invalidate the entire cache */

0 commit comments

Comments
 (0)