Commit 731ecea3 authored by Christophe Leroy's avatar Christophe Leroy Committed by Richard Weinberger
Browse files

mm: Remove arch_remap() and mm-arch-hooks.h



powerpc was the last provider of arch_remap() and the last
user of mm-arch-hooks.h.

Since commit 526a9c4a ("powerpc/vdso: Provide vdso_remap()"),
arch_remap() hence mm-arch-hooks.h are not used anymore.

Remove them.

Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 3a5f4154
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@ generic-y += irq_regs.h
generic-y += irq_work.h
generic-y += kdebug.h
generic-y += mcs_spinlock.h
generic-y += mm-arch-hooks.h
generic-y += mmiowb.h
generic-y += module.lds.h
generic-y += param.h
+0 −1
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ mandatory-y += kprobes.h
mandatory-y += linkage.h
mandatory-y += local.h
mandatory-y += local64.h
mandatory-y += mm-arch-hooks.h
mandatory-y += mmiowb.h
mandatory-y += mmu.h
mandatory-y += mmu_context.h
+0 −16
Original line number Diff line number Diff line
/*
 * Architecture specific mm hooks
 */

#ifndef _ASM_GENERIC_MM_ARCH_HOOKS_H
#define _ASM_GENERIC_MM_ARCH_HOOKS_H

/*
 * This file should be included through arch/../include/asm/Kbuild for
 * the architecture which doesn't need specific mm hooks.
 *
 * In that case, the generic hooks defined in include/linux/mm-arch-hooks.h
 * are used.
 */

#endif /* _ASM_GENERIC_MM_ARCH_HOOKS_H */

include/linux/mm-arch-hooks.h

deleted100644 → 0
+0 −22
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Generic mm no-op hooks.
 *
 * Copyright (C) 2015, IBM Corporation
 * Author: Laurent Dufour <ldufour@linux.vnet.ibm.com>
 */
#ifndef _LINUX_MM_ARCH_HOOKS_H
#define _LINUX_MM_ARCH_HOOKS_H

#include <asm/mm-arch-hooks.h>

#ifndef arch_remap
static inline void arch_remap(struct mm_struct *mm,
			      unsigned long old_start, unsigned long old_end,
			      unsigned long new_start, unsigned long new_end)
{
}
#define arch_remap arch_remap
#endif

#endif /* _LINUX_MM_ARCH_HOOKS_H */
+0 −3
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include <linux/syscalls.h>
#include <linux/mmu_notifier.h>
#include <linux/uaccess.h>
#include <linux/mm-arch-hooks.h>
#include <linux/userfaultfd_k.h>

#include <asm/cacheflush.h>
@@ -562,8 +561,6 @@ static unsigned long move_vma(struct vm_area_struct *vma,
		new_addr = err;
	} else {
		mremap_userfaultfd_prep(new_vma, uf);
		arch_remap(mm, old_addr, old_addr + old_len,
			   new_addr, new_addr + new_len);
	}

	/* Conceal VM_ACCOUNT so old reservation is not undone */