1
0
Fork 0
alistair23-linux/arch/nds32/include/asm
Mike Rapoport f52a8e1a67 nds32: switch to generic version of pte allocation
The nds32 implementation of pte_alloc_one_kernel() differs from the
generic in the use of __GFP_RETRY_MAYFAIL flag, which is removed after the
conversion.

The nds32 version of pte_alloc_one() missed the call to
pgtable_page_ctor() and also used __GFP_RETRY_MAYFAIL.  Switching it to
use generic __pte_alloc_one() for the PTE page allocation ensures that
page table constructor is run and the user page tables are allocated with
__GFP_ACCOUNT.

The conversion to the generic version of pte_free_kernel() removes the
NULL check for pte.

The pte_free() version on nds32 is identical to the generic one and can be
simply dropped.

Link: http://lkml.kernel.org/r/1557296232-15361-10-git-send-email-rppt@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greentime Hu <green.hu@gmail.com>
Cc: Guan Xuetao <gxt@pku.edu.cn>
Cc: Guo Ren <guoren@kernel.org>
Cc: Guo Ren <ren_guo@c-sky.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Sam Creasey <sammy@sammy.net>
Cc: Vincent Chen <deanbo422@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-07-12 11:05:45 -07:00
..
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
assembler.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
barrier.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
bitfield.h nds32: Avoid IEX status being incorrectly modified 2019-05-31 15:23:26 +08:00
cache.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
cache_info.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
cacheflush.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
current.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
delay.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
elf.h nds32 patches for 5.2-rc1 2019-05-17 10:17:29 -07:00
fixmap.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
fpu.h nds32: Avoid IEX status being incorrectly modified 2019-05-31 15:23:26 +08:00
fpuemu.h nds32: add new emulations for floating point instruction 2019-05-31 15:23:26 +08:00
ftrace.h nds32/ftrace: Support dynamic function tracer 2018-09-04 14:45:18 +08:00
futex.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
highmem.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
io.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
irqflags.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
l2_cache.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
linkage.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
memory.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
mmu.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
mmu_context.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
module.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
nds32.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
nds32_fpu_inst.h nds32: Support FP emulation 2018-11-22 18:13:21 +08:00
page.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
perf_event.h nds32: Perf porting 2018-11-06 18:01:40 +08:00
pgalloc.h nds32: switch to generic version of pte allocation 2019-07-12 11:05:45 -07:00
pgtable.h nds32 patches for 5.2-rc1 2019-05-17 10:17:29 -07:00
pmu.h nds32: Perf porting 2018-11-06 18:01:40 +08:00
proc-fns.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
processor.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
ptrace.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
sfp-machine.h nds32: Support FP emulation 2018-11-22 18:13:21 +08:00
shmparam.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
stacktrace.h nds32: Perf porting 2018-11-06 18:01:40 +08:00
string.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
suspend.h nds32: Power management for nds32 2018-11-06 18:01:41 +08:00
swab.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
syscall.h nds32 patches for 5.2-rc1 2019-05-17 10:17:29 -07:00
syscalls.h nds32: Avoid IEX status being incorrectly modified 2019-05-31 15:23:26 +08:00
thread_info.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
tlb.h nds32 patches for 5.2-rc1 2019-05-17 10:17:29 -07:00
tlbflush.h nds32 patches for 5.2-rc1 2019-05-17 10:17:29 -07:00
uaccess.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
unistd.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
vdso.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00
vdso_datapage.h nds32: Fix vDSO clock_getres() 2019-05-16 15:07:08 +08:00
vdso_timer_info.h nds32: Use the correct style for SPDX License Identifier 2019-05-07 17:52:09 +08:00