All of lore.kernel.org
 help / color / mirror / Atom feed
From: Magnus Lindholm <linmag7@gmail.com>
To: sparclinux@vger.kernel.org
Cc: davem@davemloft.net, andreas@gaisler.com,
	linux-kernel@vger.kernel.org, sam@ravnborg.org,
	glaubitz@physik.fu-berlin.de, Magnus Lindholm <linmag7@gmail.com>
Subject: [PATCH v2 0/6] sparc32: replace sp_banks with memblock
Date: Sun, 30 Aug 2026 14:06:39 +0200	[thread overview]
Message-ID: <20260830120742.20950-1-linmag7@gmail.com> (raw)

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 the sparc32 phys_base and Viking fixes.
setup_memory() preserves relocated-kernel handling by removing RAM below
the physical address to which PAGE_OFFSET maps.

Link: https://lore.kernel.org/sparclinux/20260816075141.3489194-1-linmag7@gmail.com/T/#t

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) CPUSs.

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. This tightens LEON's _pfn_valid() upper bound
  from all memory to the lowmem limit, with no functional change because
  LEON does not use highmem.

Suggested-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://lore.kernel.org/r/20260817153237.GA702187@ravnborg.org

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/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   |   2 +-
 arch/sparc/kernel/setup_32.c        | 115 ++++++++++---------
 arch/sparc/mm/init_32.c             | 167 +---------------------------
 arch/sparc/mm/srmmu.c               |  67 ++++-------
 arch/sparc/prom/memory.c            |  51 ++-------
 8 files changed, 100 insertions(+), 323 deletions(-)


base-commit: e6de5705a9f0d81f67bdb2917108784b5839cecd
-- 
2.43.0

             reply	other threads:[~2026-08-30 12:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-30 12:06 Magnus Lindholm [this message]
2026-08-30 12:06 ` [PATCH v2 1/6] sparc32: use memblock when mapping the kernel Magnus Lindholm
2026-08-30 12:06 ` [PATCH v2 2/6] sparc32: use memblock to find available system memory Magnus Lindholm
2026-08-30 12:06 ` [PATCH v2 3/6] sparc32: populate memblock from the PROM memory map Magnus Lindholm
2026-08-30 12:06 ` [PATCH v2 4/6] sparc32: drop unused valid address bitmap Magnus Lindholm
2026-08-30 17:22   ` Sam Ravnborg
2026-08-30 12:06 ` [PATCH v2 5/6] sparc32: move early memory setup to setup_arch Magnus Lindholm
2026-08-30 18:19   ` Sam Ravnborg
2026-09-01 13:54     ` Magnus Lindholm
2026-08-30 12:06 ` [PATCH v2 6/6] sparc32: drop sp_banks Magnus Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260830120742.20950-1-linmag7@gmail.com \
    --to=linmag7@gmail.com \
    --cc=andreas@gaisler.com \
    --cc=davem@davemloft.net \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.