From: Michael Schmitz <schmitzmic@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Mike Rapoport <rppt@kernel.org>
Cc: linux-m68k@lists.linux-m68k.org
Subject: Re: [PATCH v2 13/13] arch, mm: make releasing of memory to page allocator more explicit
Date: Fri, 14 Mar 2025 07:31:52 +1300 [thread overview]
Message-ID: <ea797cf9-99b7-434a-91e2-41dc1aa4c131@gmail.com> (raw)
In-Reply-To: <CAMuHMdWtHqpPHQV+qnEpPe-7pE9uw9tD+qypRVeXYGiXNfhBjA@mail.gmail.com>
Hi Geert,
On 14/03/25 04:51, Geert Uytterhoeven wrote:
> Hi Mike,
>
> On Thu, 13 Mar 2025 at 16:35, Mike Rapoport <rppt@kernel.org> wrote:
>> On Thu, Mar 13, 2025 at 04:19:10PM +0100, Geert Uytterhoeven wrote:
>>> On Thu, 13 Mar 2025 at 14:53, Mike Rapoport <rppt@kernel.org> wrote:
>>>> From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
>>>>
>>>> The point where the memory is released from memblock to the buddy allocator
>>>> is hidden inside arch-specific mem_init()s and the call to
>>>> memblock_free_all() is needlessly duplicated in every artiste cure and
>>>> after introduction of arch_mm_preinit() hook, mem_init() implementation on
>>>> many architecture only contains the call to memblock_free_all().
>>>>
>>>> Pull memblock_free_all() call into mm_core_init() and drop mem_init() on
>>>> relevant architectures to make it more explicit where the free memory is
>>>> released from memblock to the buddy allocator and to reduce code
>>>> duplication in architecture specific code.
>>>>
>>>> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> # x86
>>>> Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
>>>> arch/m68k/mm/init.c | 2 --
>>> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k
>> Thanks :)
>>
>> While working on this I was wondering if init_pointer_tables() can be moved
>> from mem_init() to motorola::paging_init(). It seems to me that it can, but
>> I wasn't sure enough so I left it there for now.
> Oh, that would be nice, as it would allow us to get rid of the ugly
> #ifdef, and (in the context of this series) of our own mem_init().
> It looked promising at first, but crashed later (on ARAnyM):
>
> VFS: Mounted root (ext3 filesystem) readonly on device 8:1.
> devtmpfs: mounted
> Unable to handle kernel access at virtual address (ptrval)
> Oops: 00000000
> Modules linked in:
> PC: [<0001273b>] xdnrm_dn+0xf/0x10
> SR: 2208 SP: (ptrval) a2: 01030000
> d0: 00000097 d1: ffffffff d2: 00000001 d3: 00563000
> d4: 0055f924 d5: 00421b56 a0: 0102e000 a1: 0102e000
> Process swapper (pid: 1, task=(ptrval))
> Frame format=7 eff addr=00ffee01 ssw=0545 faddr=00ffee01
What's at that address? The 14 MB ST-RAM ought to end at 0xe00000 (which
would have been left unmapped if FastRAM is in use). MMIO area starts at
0xff0000 but base addresses there are 0xff8xxx, 0xffaxxx or 0xfffxxx
from what I've found.
Cheers,
Michael
> wb 1 stat/addr/data: 0000 00000000 00000000
> wb 2 stat/addr/data: 0000 00000000 00000000
> wb 3 stat/addr/data: 0000 00ffee01 00000000
> push data: 00000000 00000000 00000000 00000000
> Stack from 0102ffb6:
> 00000042 4e9a005f 4bd80042 4e720000 a5240000 00000000 00000000 00000000
> 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 00002000 00000000
> Call Trace: [<00002000>] _start+0x0/0x6
>
> Code: ac08 9000 07ec e800 0800 0267 0408 d000 <07ec> ee01 43ff 1808
> ee00 04ff 2108 ae00 07ff 1908 ae00 02ff 2420 5fe9 ee00 02ff
> Disabling lock debugging due to kernel taint
> Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
> ---[ end Kernel panic - not syncing: Attempted to kill init!
> exitcode=0x0000000b ]---
>
> Gr{oetje,eeting}s,
>
> Geert
>
next prev parent reply other threads:[~2025-03-13 18:31 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 13:49 [PATCH v2 00/13] arch, mm: reduce code duplication in mem_init() Mike Rapoport
2025-03-13 13:49 ` [PATCH v2 01/13] arm: mem_init: use memblock_phys_free() to free DMA memory on SA1111 Mike Rapoport
2025-03-13 13:49 ` [PATCH v2 02/13] csky: move setup_initrd() to setup.c Mike Rapoport
2025-03-13 13:49 ` [PATCH v2 03/13] hexagon: move initialization of init_mm.context init to paging_init() Mike Rapoport
2025-03-13 13:49 ` [PATCH v2 04/13] MIPS: consolidate mem_init() for NUMA machines Mike Rapoport
2025-03-13 13:49 ` [PATCH v2 05/13] MIPS: make setup_zero_pages() use memblock Mike Rapoport
2025-03-13 13:49 ` [PATCH v2 06/13] nios2: move pr_debug() about memory start and end to setup_arch() Mike Rapoport
2025-03-17 12:40 ` Dinh Nguyen
2025-03-13 13:49 ` [PATCH v2 07/13] s390: make setup_zero_pages() use memblock Mike Rapoport
2025-03-13 13:49 ` [PATCH v2 08/13] xtensa: split out printing of virtual memory layout to a function Mike Rapoport
2025-03-13 17:14 ` Max Filippov
2025-03-13 13:49 ` [PATCH v2 09/13] arch, mm: set max_mapnr when allocating memory map for FLATMEM Mike Rapoport
2025-03-14 9:25 ` Christophe Leroy
2025-04-08 5:48 ` Christophe Leroy
2025-03-13 13:50 ` [PATCH v2 10/13] arch, mm: set high_memory in free_area_init() Mike Rapoport
2025-05-16 15:28 ` Pratyush Yadav
2025-05-16 17:01 ` Mike Rapoport
2025-05-19 15:54 ` Alexandre Ghiti
2025-05-19 17:19 ` Mike Rapoport
2025-03-13 13:50 ` [PATCH v2 11/13] arch, mm: streamline HIGHMEM freeing Mike Rapoport
2025-03-13 13:50 ` [PATCH v2 12/13] arch, mm: introduce arch_mm_preinit Mike Rapoport
2025-03-13 13:50 ` [PATCH v2 13/13] arch, mm: make releasing of memory to page allocator more explicit Mike Rapoport
2025-03-13 15:19 ` Geert Uytterhoeven
2025-03-13 15:34 ` Mike Rapoport
2025-03-13 15:51 ` Geert Uytterhoeven
2025-03-13 15:56 ` Geert Uytterhoeven
2025-03-13 16:39 ` Mike Rapoport
2025-03-13 18:31 ` Michael Schmitz [this message]
2025-03-14 8:51 ` Geert Uytterhoeven
2025-03-14 9:06 ` Michael Schmitz
2025-03-14 9:13 ` Geert Uytterhoeven
2025-03-13 16:39 ` [PATCH v2 00/13] arch, mm: reduce code duplication in mem_init() Mark Brown
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=ea797cf9-99b7-434a-91e2-41dc1aa4c131@gmail.com \
--to=schmitzmic@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=rppt@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 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).