memblock: simplify several early memory allocation
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest6 patches 2 repliesIn review
- v36 patches 1 replySuperseded
- v26 patches 14 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 5 patches | 6 replies | Superseded |
Changes in v4 from the cover letter
* rebased on the current upstream
* added conversion of s390 node data allocation
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | powerpc: prefer memblock APIs returning virtual addressarch/ arch/ arch/ +6 more | +51 | 2 replies | |
| 2/6 | microblaze: prefer memblock API returning virtual addressarch/ | +3 | 0 replies | |
| 3/6 | sh: prefer memblock APIs returning virtual addressarch/ arch/ | +7 | 0 replies | |
| 4/6 | openrisc: simplify pte_alloc_one_kernel()arch/ | +4 | 0 replies | |
| 5/6 | arch: simplify several early memory allocationsarch/ arch/ arch/ +7 more | +18 | 0 replies | |
| 6/6 | arm, s390, unicore32: remove oneliner wrappers for memblock_alloc()arch/ arch/ arch/ | +8 | 0 replies |
Reviews trailers per patch
1 of 6 patches has a Reviewed-by or Acked-by.
| Patch | Michal Simek | Stafford Horne |
|---|---|---|
| 1/6 | ||
| 2/6 | T-b | |
| 3/6 | ||
| 4/6 | A-b | |
| 5/6 | ||
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/6] memblock: simplify several early memory allocation
Hi,
These patches simplify some of the early memory allocations by replacing usage of older memblock APIs with newer and shinier ones.
Quite a few places in the arch/ code allocated memory using a memblock API that returns a physical address of the allocated area, then converted this physical address to a virtual one and then used memset(0) to clear the allocated range.
More recent memblock APIs do all the three steps in one call and their usage simplifies the code.
It's important to note that regardless of API used, the core allocation is nearly identical for any set of memblock allocators: first it tries to find a free memory with all the constraints specified by the caller and then falls back to the allocation with some or all constraints disabled.
The first three patches perform the conversion of call sites that have exact requirements for the node and the possible memory range.
The fourth patch is a bit one-off as it simplifies openrisc's implementation of pte_alloc_one_kernel(), and not only the memblock usage.
The fifth patch takes care of simpler cases when the allocation can be satisfied with a simple call to memblock_alloc().
The sixth patch removes one-liner wrappers for memblock_alloc on arm and unicore32, as suggested by Christoph.
v4:
* rebased on the current upstream
* added conversion of s390 node data allocation
v3:
* added Tested-by from Michal Simek for microblaze changes
* updated powerpc changes as per Michael Ellerman comments:
- use allocations that clear memory in alloc_paca_data() and alloc_stack()
- ensure the replacement is equivalent to old API
v2:
* added Ack from Stafford Horne for openrisc changes
* entirely drop early_alloc wrappers on arm and unicore32, as per Christoph Hellwig
Mike Rapoport (6):
powerpc: prefer memblock APIs returning virtual address
microblaze: prefer memblock API returning virtual address
sh: prefer memblock APIs returning virtual address
openrisc: simplify pte_alloc_one_kernel()
arch: simplify several early memory allocations
arm, s390, unicore32: remove oneliner wrappers for memblock_alloc()
arch/arm/mm/mmu.c | 13 +++---------- arch/c6x/mm/dma-coherent.c | 9 ++------- arch/microblaze/mm/init.c | 5 +++-- arch/nds32/mm/init.c | 12 ++++-------- arch/openrisc/mm/ioremap.c | 11 ++++------- arch/powerpc/kernel/paca.c | 16 ++++++---------- arch/powerpc/kernel/setup-common.c | 4 ++-- arch/powerpc/kernel/setup_64.c | 24 ++++++++++-------------- arch/powerpc/mm/hash_utils_64.c | 6 +++--- arch/powerpc/mm/pgtable-book3e.c | 8 ++------ arch/powerpc/mm/pgtable-book3s64.c | 5 +---- arch/powerpc/mm/pgtable-radix.c | 25 +++++++------------------ arch/powerpc/mm/ppc_mmu_32.c | 3 +-- arch/powerpc/platforms/pasemi/iommu.c | 5 +++-- arch/powerpc/platforms/powernv/opal.c | 3 +-- arch/powerpc/platforms/pseries/setup.c | 18 ++++++++++++++---- arch/powerpc/sysdev/dart_iommu.c | 7 +++++-- arch/s390/numa/numa.c | 14 +------------- arch/sh/mm/init.c | 18 +++++------------- arch/sh/mm/numa.c | 5 ++--- arch/sparc/kernel/prom_64.c | 7 ++----- arch/sparc/mm/init_64.c | 9 +++------ arch/unicore32/mm/mmu.c | 14 ++++---------- 23 files changed, 88 insertions(+), 153 deletions(-)
Signature · 7 lines
2.7.4 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel