introduce generic pte_{alloc,free}_one[_kernel]
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest14 patches 0 repliesNew
- v115 patches 13 repliesSuperseded
Changes in v2 from the cover letter
* rebase on the current upstream
* fix copy-paste error in the description of pte_free()
* fix changelog for MIPS to match actual changes
* drop powerpc changes
* add Acked/Reviewed tags
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | asm-generic, x86: introduce generic pte_{alloc,free}_one[_kernel]arch/ arch/ include/ | +115 | 0 replies | |
| 2/14 | alpha: switch to generic version of pte allocationarch/ | +3 | 0 replies | |
| 3/14 | arm: switch to generic version of pte allocationarch/ arch/ | +14 | 0 replies | |
| 4/14 | arm64: switch to generic version of pte allocationarch/ arch/ arch/ +1 more | +17 | 0 replies | |
| 5/14 | csky: switch to generic version of pte allocationarch/ | +3 | 0 replies | |
| 6/14 | hexagon: switch to generic version of pte allocationarch/ | +2 | 0 replies | |
| 7/14 | m68k: sun3: switch to generic version of pte allocationarch/ | +2 | 0 replies | |
| 8/14 | mips: switch to generic version of pte allocationarch/ | +2 | 0 replies | |
| 9/14 | nds32: switch to generic version of pte allocationarch/ | +4 | 0 replies | |
| 10/14 | nios2: switch to generic version of pte allocationarch/ | +2 | 0 replies | |
| 11/14 | parisc: switch to generic version of pte allocationarch/ | +2 | 0 replies | |
| 12/14 | riscv: switch to generic version of pte allocationarch/ | +2 | 0 replies | |
| 13/14 | um: switch to generic version of pte allocationarch/ arch/ | +2 | 0 replies | |
| 14/14 | unicore32: switch to generic version of pte allocationarch/ | +8 | 0 replies |
Reviews trailers per patch
4 of 14 patches have a Reviewed-by or Acked-by.
| Patch | Guo Ren | Paul Burton | Palmer Dabbelt | Anton Ivanov |
|---|---|---|---|---|
| 1/14 | ||||
| 2/14 | ||||
| 3/14 | ||||
| 4/14 | ||||
| 5/14 | A-b | |||
| 6/14 | ||||
| 7/14 | ||||
| 8/14 | A-b | |||
| 9/14 | ||||
| 10/14 | ||||
| 11/14 | ||||
| 12/14 | R-b | |||
| 13/14 | R-b A-b | |||
| 14/14 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v2 00/14] introduce generic pte_{alloc,free}_one[_kernel]
Hi,
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.
v2 changes:
* rebase on the current upstream
* fix copy-paste error in the description of pte_free()
* fix changelog for MIPS to match actual changes
* drop powerpc changes
* add Acked/Reviewed tags
[1] https://lore.kernel.org/lkml/[email protected]
Mike Rapoport (14):
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
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 | 47 +++------------ arch/arm64/mm/mmu.c | 2 +- arch/arm64/mm/pgd.c | 9 ++- 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/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 +- 21 files changed, 178 insertions(+), 466 deletions(-)
Signature · 1 line
2.7.4