linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/15] introduce generic pte_{alloc,free}_one[_kernel]
@ 2019-05-02 15:28 Mike Rapoport
  2019-05-02 15:28 ` [PATCH 01/15] asm-generic, x86: " Mike Rapoport
                   ` (14 more replies)
  0 siblings, 15 replies; 29+ messages in thread
From: Mike Rapoport @ 2019-05-02 15:28 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Arnd Bergmann, Catalin Marinas, Geert Uytterhoeven, Greentime Hu,
	Guan Xuetao, Guo Ren, Helge Deller, Ley Foon Tan, Matthew Wilcox,
	Matt Turner, Michael Ellerman, Michal Hocko, Palmer Dabbelt,
	Paul Burton, Richard Kuo, Richard Weinberger, Russell King,
	Sam Creasey, x86, linux-alpha, linux-arch, linux-arm-kernel,
	linux-hexagon, linux-kernel, linux-m68k, linux-mips,
	linux-parisc, linuxppc-dev, linux-riscv, linux-um, nios2-dev,
	Mike Rapoport

Hi,

I've tried to trim down the recipients list, but it's still quite long, so
sorry for the spam.

Many architectures have similar, if not identical implementation of
pte_alloc_one_kernel(), pte_alloc_one(), pte_free_kernel() and pte_free().

A while ago Anshuman suggested to introduce a common definition of
GFP_PGTABLE and during the discussion it was suggested to rather
consolidate the allocators.

These patches introduce generic version of PTE allocation and free and
enable their use on several architectures.

The conversion introduces some changes for some of the architectures.
Here's the executive summary and the details are described at each patch.

* Most architectures do not set __GFP_ACCOUNT for the user page tables.
Switch to the generic functions is "spreading that goodness to all other
architectures"
* arm, arm64 and unicore32 used to check if the pte is not NULL before
freeing its memory in pte_free_kernel(). It's dropped during the
conversion as it seems superfluous.
* x86 used to BUG_ON() is pte was not page aligned duirng
pte_free_kernel(), the generic version simply frees the memory without any
checks.

This set only performs the straightforward conversion, the architectures
with different logic in pte_alloc_one() and pte_alloc_one_kernel() are not
touched, as well as architectures that have custom page table allocators.

[1] https://lore.kernel.org/lkml/1547619692-7946-1-git-send-email-anshuman.khandual@arm.com

 asm-generic, x86: introduce generic pte_{alloc,free}_one[_kernel]

Mike Rapoport (15):
  asm-generic, x86: introduce generic pte_{alloc,free}_one[_kernel]
  alpha: switch to generic version of pte allocation
  arm: switch to generic version of pte allocation
  arm64: switch to generic version of pte allocation
  csky: switch to generic version of pte allocation
  hexagon: switch to generic version of pte allocation
  m68k: sun3: switch to generic version of pte allocation
  mips: switch to generic version of pte allocation
  nds32: switch to generic version of pte allocation
  nios2: switch to generic version of pte allocation
  parisc: switch to generic version of pte allocation
  powerpc/nohash/64: switch to generic version of pte allocation
  riscv: switch to generic version of pte allocation
  um: switch to generic version of pte allocation
  unicore32: switch to generic version of pte allocation

 arch/alpha/include/asm/pgalloc.h             |  40 +---------
 arch/arm/include/asm/pgalloc.h               |  41 ++++------
 arch/arm/mm/mmu.c                            |   2 +-
 arch/arm64/include/asm/pgalloc.h             |  43 +----------
 arch/arm64/mm/mmu.c                          |   2 +-
 arch/arm64/mm/pgd.c                          |   4 +-
 arch/csky/include/asm/pgalloc.h              |  30 +-------
 arch/hexagon/include/asm/pgalloc.h           |  34 +--------
 arch/m68k/include/asm/sun3_pgalloc.h         |  41 +---------
 arch/mips/include/asm/pgalloc.h              |  33 +--------
 arch/nds32/include/asm/pgalloc.h             |  31 +-------
 arch/nios2/include/asm/pgalloc.h             |  37 +--------
 arch/parisc/include/asm/pgalloc.h            |  33 +--------
 arch/powerpc/include/asm/nohash/64/pgalloc.h |  35 +--------
 arch/riscv/include/asm/pgalloc.h             |  29 +-------
 arch/um/include/asm/pgalloc.h                |  16 +---
 arch/um/kernel/mem.c                         |  22 ------
 arch/unicore32/include/asm/pgalloc.h         |  36 ++-------
 arch/x86/include/asm/pgalloc.h               |  19 +----
 arch/x86/mm/pgtable.c                        |  33 +++------
 include/asm-generic/pgalloc.h                | 107 ++++++++++++++++++++++++++-
 virt/kvm/arm/mmu.c                           |   2 +-
 22 files changed, 171 insertions(+), 499 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2019-05-07  6:49 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-02 15:28 [PATCH 00/15] introduce generic pte_{alloc,free}_one[_kernel] Mike Rapoport
2019-05-02 15:28 ` [PATCH 01/15] asm-generic, x86: " Mike Rapoport
2019-05-02 19:03   ` Paul Burton
2019-05-05  6:15     ` Mike Rapoport
2019-05-02 15:28 ` [PATCH 02/15] alpha: switch to generic version of pte allocation Mike Rapoport
2019-05-02 15:28 ` [PATCH 03/15] arm: " Mike Rapoport
2019-05-02 15:28 ` [PATCH 04/15] arm64: " Mike Rapoport
2019-05-03 10:05   ` Mark Rutland
2019-05-05  6:19     ` Mike Rapoport
2019-05-02 15:28 ` [PATCH 05/15] csky: " Mike Rapoport
2019-05-03 16:03   ` Guo Ren
2019-05-03 16:18     ` Guo Ren
2019-05-02 15:28 ` [PATCH 06/15] hexagon: " Mike Rapoport
2019-05-02 15:28 ` [PATCH 07/15] m68k: sun3: " Mike Rapoport
2019-05-02 15:28 ` [PATCH 08/15] mips: " Mike Rapoport
2019-05-02 19:09   ` Paul Burton
2019-05-05  6:17     ` Mike Rapoport
2019-05-02 15:28 ` [PATCH 09/15] nds32: " Mike Rapoport
2019-05-07  6:49   ` Greentime Hu
2019-05-02 15:28 ` [PATCH 10/15] nios2: " Mike Rapoport
2019-05-02 15:28 ` [PATCH 11/15] parisc: " Mike Rapoport
2019-05-02 15:28 ` [PATCH 12/15] powerpc/nohash/64: " Mike Rapoport
2019-05-02 16:56   ` Christophe Leroy
2019-05-05  6:23     ` Mike Rapoport
2019-05-02 15:28 ` [PATCH 13/15] riscv: " Mike Rapoport
2019-05-06 18:25   ` Palmer Dabbelt
2019-05-02 15:28 ` [PATCH 14/15] um: " Mike Rapoport
2019-05-03 13:28   ` Anton Ivanov
2019-05-02 15:28 ` [PATCH 15/15] unicore32: " Mike Rapoport

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).