Skip to content

sparc32: replace sp_banks with memblock

Magnus Lindholm lkml sparclinux 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest6 patches 1 replyIn review
  2. v46 patches 2 repliesSuperseded
  3. v36 patches 5 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v26 patches3 repliesSuperseded
v15 patches4 repliesSuperseded

Changes in v5 from the cover letter

- Rebase onto Andreas Larsson's for-next branch, resolving the patch 5 conflict and preserving the updated phys_base handling, including the sun4m/sun4d probe restriction and diagnostics, from the relocation fixes.
- Retain Sam's Reviewed-by tags on all six patches.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6sparc32: use memblock when mapping the kernelarch/sparc/mm/srmmu.c+21 -260 replies
2/6sparc32: use memblock to find available system memoryarch/sparc/mm/srmmu.c+1 -130 replies
3/6sparc32: populate memblock from the PROM memory maparch/sparc/mm/init_32.c arch/sparc/prom/memory.c+6 -00 replies
4/6sparc32: drop unused valid address bitmaparch/sparc/mm/init_32.c+0 -360 replies
5/6sparc32: move early memory setup to setup_archarch/sparc/include/asm/highmem.h arch/sparc/include/asm/leon.h arch/sparc/include/asm/pgtable_32.h +5 more+72 -1950 replies
6/6sparc32: drop sp_banksarch/sparc/include/asm/page_32.h arch/sparc/mm/init_32.c arch/sparc/prom/memory.c+6 -600 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSam RavnborgAndreas Larsson
SeriesR-b T-b
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/6] sparc32: replace sp_banks with memblock

Replace the sparc32-private sp_banks memory description with memblock.

The first two patches convert the SRMMU consumers that already run after bootmem_init() has populated memblock. The third patch moves memblock population to prom_meminit() and applies the mem= limit there. Patch 4 removes an unused address bitmap before patch 5 moves the early memory setup into setup_32.c. Patch 6 removes the now-unused sp_banks array.

This work is based on an earlier eight-patch series by Sam Ravnborg. Patch 2 directly carries over Sam's memblock sizing conversion. The series has otherwise been substantially reorganized and reworked for the current kernel. It retains the sparc32 mem= command-line option by using memblock_enforce_memory_limit() and uses memblock's exclusive range-end semantics throughout.

The series applies on top of Andreas Larsson's for-next branch at 22a749706e3b (sparc64: decide the TSB huge-page window fixup before the bank switch), which includes the sparc32 relocation and Viking fixes. setup_memory() preserves the sun4m/sun4d PAGE_OFFSET probe and diagnostics from that branch, removing RAM below the mapped physical address using memblock instead of trimming sp_banks.

The v1 series was boot tested on a Sun SPARCstation 20 with dual SuperSPARC-II CPUs (SM71).
The v2 series was boot tested on a Sun SPARCstation 20 with dual ROSS HyperSPARC (RT626) CPUs.
The v3 series was cross-compiled with the SPARCstation 20 and LEON configurations as well as boot tested on a Sun SPARCstation 20 with dual ROSS HyperSPARC (RT626) CPUs.
The v4 series was cross-compiled with the SPARCstation 20 SMP configuration and a sparc32_defconfig-derived LEON configuration, both with HIGHMEM enabled. Boot tested on a SPARCstation 20 SMP (ROSS).
The v5 series was cross-compiled with the SPARCstation 20 SMP and LEON configurations, both with HIGHMEM enabled. Boot tested on a SPARCstation 20 SMP (ROSS).

Changes in v5:
- Rebase onto Andreas Larsson's for-next branch, resolving the patch 5 conflict and preserving the updated phys_base handling, including the sun4m/sun4d probe restriction and diagnostics, from the relocation fixes.
- Retain Sam's Reviewed-by tags on all six patches.

Changes in v4:
- Use max_pfn in LEON's _pfn_valid() check, preserving the bounds of last_valid_pfn instead of restricting the check to lowmem, as requested by Andreas Larsson.
- Correct the description: LEON systems can use highmem.
- Carry Sam's Reviewed-by tag on patch 5; all six patches now retain his review tags.
- Rebase onto Linux 7.3-rc1 plus the three prerequisite patches; adjust patch 6's context without changing its code changes.

Changes in v3:
- Add Sam's Reviewed-by tag to patch 4.
- Initialize max_pfn in patch 5 and use it as the highmem zone limit.
- Use PHYS_PFN() instead of open-coded PAGE_SHIFT conversions in patch 5.
- Remove the obsolete highstart_pfn and highend_pfn declarations.
- Use the generic PFN limit declarations from linux/memblock.h.
- Document removal of the duplicate private HIGHMEM summary.

Changes in v2:
- Add Sam's Reviewed-by tags to patches 1-3 and 6. Patch 6 is the unchanged source change from patch 5 in v1, renumbered by the new patch.
- Drop the unused sparc_valid_addr_bitmap in a preparation patch.
- Use for_each_mem_pfn_range() and the standard max_low_pfn variable in the early memory setup. The change to LEON's PFN check made in v2 is corrected in v4 to preserve its original bounds.

Magnus Lindholm (6):
sparc32: use memblock when mapping the kernel
sparc32: use memblock to find available system memory
sparc32: populate memblock from the PROM memory map
sparc32: drop unused valid address bitmap
sparc32: move early memory setup to setup_arch
sparc32: drop sp_banks

 arch/sparc/include/asm/highmem.h    |   3 -
 arch/sparc/include/asm/leon.h       |   2 +-
 arch/sparc/include/asm/page_32.h    |  16 ---
 arch/sparc/include/asm/pgtable_32.h |   3 +-
 arch/sparc/include/asm/pgtsrmmu.h   |   1 -
 arch/sparc/kernel/setup_32.c        | 117 ++++++++++---------
 arch/sparc/mm/init_32.c             | 167 +---------------------------
 arch/sparc/mm/leon_mm.c             |   1 +
 arch/sparc/mm/srmmu.c               |  69 ++++--------
 arch/sparc/prom/memory.c            |  51 ++-------
 10 files changed, 103 insertions(+), 327 deletions(-)

base-commit: 22a749706e3b0f857d5169a61f2f86a160eb9abd

Signature · 1 line
2.43.0