[PATCH] mm: remove kern_addr_valid() completely
Michael Ellerman
mpe at ellerman.id.au
Tue Oct 18 20:45:46 AEDT 2022
Kefeng Wang <wangkefeng.wang at huawei.com> writes:
> Most architectures(except arm64/x86/sparc) simply return 1 for
> kern_addr_valid(), which is only used in read_kcore(), and it
> calls copy_from_kernel_nofault() which could check whether the
> address is a valid kernel address, so no need kern_addr_valid(),
> let's remove unneeded kern_addr_valid() completely.
>
> Signed-off-by: Kefeng Wang <wangkefeng.wang at huawei.com>
> ---
> arch/alpha/include/asm/pgtable.h | 2 -
> arch/arc/include/asm/pgtable-bits-arcv2.h | 2 -
> arch/arm/include/asm/pgtable-nommu.h | 2 -
> arch/arm/include/asm/pgtable.h | 4 --
> arch/arm64/include/asm/pgtable.h | 2 -
> arch/arm64/mm/mmu.c | 47 -----------------------
> arch/arm64/mm/pageattr.c | 3 +-
> arch/csky/include/asm/pgtable.h | 3 --
> arch/hexagon/include/asm/page.h | 7 ----
> arch/ia64/include/asm/pgtable.h | 16 --------
> arch/loongarch/include/asm/pgtable.h | 2 -
> arch/m68k/include/asm/pgtable_mm.h | 2 -
> arch/m68k/include/asm/pgtable_no.h | 1 -
> arch/microblaze/include/asm/pgtable.h | 3 --
> arch/mips/include/asm/pgtable.h | 2 -
> arch/nios2/include/asm/pgtable.h | 2 -
> arch/openrisc/include/asm/pgtable.h | 2 -
> arch/parisc/include/asm/pgtable.h | 15 --------
> arch/powerpc/include/asm/pgtable.h | 7 ----
Acked-by: Michael Ellerman <mpe at ellerman.id.au> (powerpc)
cheers
More information about the Linuxppc-dev
mailing list